Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bnxt/if_bnxt.c
Context not available. | |||||
* iflib shared context | * iflib shared context | ||||
*/ | */ | ||||
#define BNXT_DRIVER_VERSION "1.0.0.1" | #define BNXT_DRIVER_VERSION "1.0.0.2" | ||||
char bnxt_driver_version[] = BNXT_DRIVER_VERSION; | char bnxt_driver_version[] = BNXT_DRIVER_VERSION; | ||||
extern struct if_txrx bnxt_txrx; | extern struct if_txrx bnxt_txrx; | ||||
static struct if_shared_ctx bnxt_sctx_init = { | static struct if_shared_ctx bnxt_sctx_init = { | ||||
Context not available. | |||||
if (rc) | if (rc) | ||||
goto failed; | goto failed; | ||||
/* Get the current configuration of this function */ | |||||
rc = bnxt_hwrm_func_qcfg(softc); | |||||
if (rc) { | |||||
device_printf(softc->dev, "attach: hwrm func qcfg failed\n"); | |||||
goto failed; | |||||
} | |||||
iflib_set_mac(ctx, softc->func.mac_addr); | iflib_set_mac(ctx, softc->func.mac_addr); | ||||
scctx->isc_txrx = &bnxt_txrx; | scctx->isc_txrx = &bnxt_txrx; | ||||
Context not available. | |||||
scctx->isc_nrxd[1]; | scctx->isc_nrxd[1]; | ||||
scctx->isc_rxqsizes[2] = sizeof(struct rx_prod_pkt_bd) * | scctx->isc_rxqsizes[2] = sizeof(struct rx_prod_pkt_bd) * | ||||
scctx->isc_nrxd[2]; | scctx->isc_nrxd[2]; | ||||
scctx->isc_nrxqsets_max = min(pci_msix_count(softc->dev)-1, | scctx->isc_nrxqsets_max = min(pci_msix_count(softc->dev)-1, | ||||
softc->func.max_cp_rings - 1); | softc->fn_qcfg.alloc_completion_rings - 1); | ||||
scctx->isc_nrxqsets_max = min(scctx->isc_nrxqsets_max, | scctx->isc_nrxqsets_max = min(scctx->isc_nrxqsets_max, | ||||
softc->func.max_rx_rings); | softc->fn_qcfg.alloc_rx_rings); | ||||
scctx->isc_ntxqsets_max = min(softc->func.max_rx_rings, | scctx->isc_nrxqsets_max = min(scctx->isc_nrxqsets_max, | ||||
softc->func.max_cp_rings - scctx->isc_nrxqsets_max - 1); | softc->fn_qcfg.alloc_vnics); | ||||
scctx->isc_ntxqsets_max = min(softc->fn_qcfg.alloc_tx_rings, | |||||
softc->fn_qcfg.alloc_completion_rings - scctx->isc_nrxqsets_max - 1); | |||||
shurd: Why is making the max TX and max RX the same value desirable? Users can request that TX and RX… | |||||
Not Done Inline ActionsOnly reason based on my experience with other 10G/40G drivers is - having same number of Rx & Tx queues works well for features like "Queue pairing" etc.. bhargava.marreddy_broadcom.com: Only reason based on my experience with other 10G/40G drivers is - having same number of Rx &… | |||||
Done Inline ActionsBy default, iflib will allocate equal numbers of queues. This variable is intended to be the max supported by the hardware, not the suggested value. shurd: By default, iflib will allocate equal numbers of queues. This variable is intended to be the… | |||||
Not Done Inline ActionsUnderstood!! I'll do the change. bhargava.marreddy_broadcom.com: Understood!! I'll do the change. | |||||
scctx->isc_rss_table_size = HW_HASH_INDEX_SIZE; | scctx->isc_rss_table_size = HW_HASH_INDEX_SIZE; | ||||
scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; | scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; | ||||
Context not available. |
Why is making the max TX and max RX the same value desirable? Users can request that TX and RX have different nrxqs via the dev.bnxt.X..iflib.override_qs_enable sysctl.
If a VF is allocated a small number of one ring type, but a large number of the other, this will result in not being able to use the allocated resources.