Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bnxt/if_bnxt.c
Context not available. | |||||
softc->rx_rings[i].vaddr = vaddrs[i * nrxqs + 1]; | softc->rx_rings[i].vaddr = vaddrs[i * nrxqs + 1]; | ||||
softc->rx_rings[i].paddr = paddrs[i * nrxqs + 1]; | softc->rx_rings[i].paddr = paddrs[i * nrxqs + 1]; | ||||
/* Allocate the TPA start buffer */ | |||||
softc->rx_rings[i].tpa_start = malloc(sizeof(struct bnxt_full_tpa_start) * | |||||
(RX_TPA_START_CMPL_AGG_ID_MASK >> RX_TPA_START_CMPL_AGG_ID_SFT), | |||||
M_DEVBUF, M_NOWAIT | M_ZERO); | |||||
if (softc->rx_rings[i].tpa_start == NULL) { | |||||
rc = -ENOMEM; | |||||
device_printf(softc->dev, | |||||
"Unable to allocate space for TPA\n"); | |||||
goto tpa_alloc_fail; | |||||
} | |||||
/* Allocate the AG ring */ | /* Allocate the AG ring */ | ||||
softc->ag_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; | softc->ag_rings[i].phys_id = (uint16_t)HWRM_NA_SIGNATURE; | ||||
softc->ag_rings[i].softc = softc; | softc->ag_rings[i].softc = softc; | ||||
shurd: Why isn't i already this value, and if it isn't, why isn't the same thing needed below for line… | |||||
Context not available. | |||||
iflib_dma_free(&softc->vnic_info.rss_hash_key_tbl); | iflib_dma_free(&softc->vnic_info.rss_hash_key_tbl); | ||||
rss_hash_alloc_fail: | rss_hash_alloc_fail: | ||||
iflib_dma_free(&softc->vnic_info.mc_list); | iflib_dma_free(&softc->vnic_info.mc_list); | ||||
tpa_alloc_fail: | |||||
mc_list_alloc_fail: | mc_list_alloc_fail: | ||||
for (i = i - 1; i >= 0; i--) | |||||
free(softc->rx_rings[i].tpa_start, M_DEVBUF); | |||||
iflib_dma_free(&softc->rx_stats); | iflib_dma_free(&softc->rx_stats); | ||||
hw_stats_alloc_fail: | hw_stats_alloc_fail: | ||||
free(softc->grp_info, M_DEVBUF); | free(softc->grp_info, M_DEVBUF); | ||||
Context not available. | |||||
if (rc) | if (rc) | ||||
goto dma_fail; | goto dma_fail; | ||||
/* Allocate the TPA start buffer */ | |||||
softc->tpa_start = malloc(sizeof(struct bnxt_full_tpa_start) * | |||||
(RX_TPA_START_CMPL_AGG_ID_MASK >> RX_TPA_START_CMPL_AGG_ID_SFT), | |||||
M_DEVBUF, M_NOWAIT | M_ZERO); | |||||
if (softc->tpa_start == NULL) { | |||||
rc = ENOMEM; | |||||
device_printf(softc->dev, | |||||
"Unable to allocate space for TPA\n"); | |||||
goto tpa_failed; | |||||
} | |||||
/* Get firmware version and compare with driver */ | /* Get firmware version and compare with driver */ | ||||
softc->ver_info = malloc(sizeof(struct bnxt_ver_info), | softc->ver_info = malloc(sizeof(struct bnxt_ver_info), | ||||
Context not available. | |||||
ver_fail: | ver_fail: | ||||
free(softc->ver_info, M_DEVBUF); | free(softc->ver_info, M_DEVBUF); | ||||
ver_alloc_fail: | ver_alloc_fail: | ||||
free(softc->tpa_start, M_DEVBUF); | |||||
tpa_failed: | |||||
bnxt_free_hwrm_dma_mem(softc); | bnxt_free_hwrm_dma_mem(softc); | ||||
dma_fail: | dma_fail: | ||||
BNXT_HWRM_LOCK_DESTROY(softc); | BNXT_HWRM_LOCK_DESTROY(softc); | ||||
Context not available. | |||||
SLIST_FOREACH_SAFE(tag, &softc->vnic_info.vlan_tags, next, tmp) | SLIST_FOREACH_SAFE(tag, &softc->vnic_info.vlan_tags, next, tmp) | ||||
free(tag, M_DEVBUF); | free(tag, M_DEVBUF); | ||||
iflib_dma_free(&softc->def_cp_ring_mem); | iflib_dma_free(&softc->def_cp_ring_mem); | ||||
free(softc->tpa_start, M_DEVBUF); | for (i = 0; i < softc->nrxqsets; i++) | ||||
free(softc->rx_rings[i].tpa_start, M_DEVBUF); | |||||
free(softc->ver_info, M_DEVBUF); | free(softc->ver_info, M_DEVBUF); | ||||
free(softc->nvm_info, M_DEVBUF); | free(softc->nvm_info, M_DEVBUF); | ||||
Context not available. | |||||
if (rc) | if (rc) | ||||
goto fail; | goto fail; | ||||
Not Done Inline ActionsThis patch seems to be enabling TPA (hardware LRO). That's not listed in the review commit message. Is that something we want to indicate in this commit when it hits head? sbruno: This patch seems to be enabling TPA (hardware LRO). That's not listed in the review commit… | |||||
#ifdef notyet | /* | ||||
/* Enable LRO/TPA/GRO */ | * Enable LRO/TPA/GRO | ||||
* TBD: | |||||
* Enable / Disable HW_LRO based on | |||||
* ifconfig lro / ifconfig -lro setting | |||||
*/ | |||||
rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info, | rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info, | ||||
(if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? | (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? | ||||
HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0); | HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0); | ||||
if (rc) | if (rc) | ||||
goto fail; | goto fail; | ||||
#endif | |||||
for (i = 0; i < softc->ntxqsets; i++) { | for (i = 0; i < softc->ntxqsets; i++) { | ||||
/* Allocate the statistics context */ | /* Allocate the statistics context */ | ||||
Context not available. |
Why isn't i already this value, and if it isn't, why isn't the same thing needed below for line 561?