diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-29 19:00:48 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-08-29 19:00:53 +0100 |
commit | cf8d7fb48307479d0f6c8d16a17332fdf9be0fb3 (patch) | |
tree | a073dec0d3c8f5fb6d023b2e8e2e004fdf83bd14 /drivers/net/bnxt/bnxt_ethdev.c | |
parent | 5e15744b6ce0be444d1820387f54424343b728f6 (diff) | |
parent | 8e6d9d118f6105a3627b64a7949e1fb0b145879e (diff) |
Merge tag 'upstream/16.11.8' into 16.11.x
Upstream version 16.11.8
Change-Id: I35e67795fa6968463a7d15c9cd198c178323e92b
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/bnxt/bnxt_ethdev.c')
-rw-r--r-- | drivers/net/bnxt/bnxt_ethdev.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 3a0b1ce4..44bf6ba9 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -137,6 +137,7 @@ static struct rte_pci_id bnxt_pci_id_map[] = { ETH_RSS_NONFRAG_IPV6_UDP) static void bnxt_print_link_info(struct rte_eth_dev *eth_dev); +static int bnxt_dev_uninit(struct rte_eth_dev *eth_dev); /***********************/ @@ -222,6 +223,17 @@ static int bnxt_init_chip(struct bnxt *bp) /* VNIC configuration */ for (i = 0; i < bp->nr_vnics; i++) { struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; + uint32_t size = sizeof(*vnic->fw_grp_ids) * bp->max_ring_grps; + + vnic->fw_grp_ids = rte_zmalloc("vnic_fw_grp_ids", size, 0); + if (!vnic->fw_grp_ids) { + RTE_LOG(ERR, PMD, + "Failed to alloc %d bytes for group ids\n", + size); + rc = -ENOMEM; + goto err_out; + } + memset(vnic->fw_grp_ids, -1, size); rc = bnxt_hwrm_vnic_alloc(bp, vnic); if (rc) { @@ -347,12 +359,12 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, dev_info->max_rx_queues = bp->pf.max_rx_rings; dev_info->max_tx_queues = bp->pf.max_tx_rings; dev_info->max_vfs = bp->pf.active_vfs; - dev_info->reta_size = bp->pf.max_rsscos_ctx; + dev_info->reta_size = HW_HASH_INDEX_SIZE; max_vnics = bp->pf.max_vnics; } else { dev_info->max_rx_queues = bp->vf.max_rx_rings; dev_info->max_tx_queues = bp->vf.max_tx_rings; - dev_info->reta_size = bp->vf.max_rsscos_ctx; + dev_info->reta_size = HW_HASH_INDEX_SIZE; max_vnics = bp->vf.max_vnics; } @@ -575,6 +587,8 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) rte_free(bp->grp_info); bp->grp_info = NULL; } + + bnxt_dev_uninit(eth_dev); } static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, |