aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnxt/bnxt_vnic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnxt/bnxt_vnic.c')
-rw-r--r--drivers/net/bnxt/bnxt_vnic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 1b5f54c4..33fdde2f 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -175,7 +175,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
struct rte_pci_device *pdev = bp->pdev;
const struct rte_memzone *mz;
char mz_name[RTE_MEMZONE_NAMESIZE];
- uint16_t entry_length = RTE_CACHE_LINE_ROUNDUP(
+ uint32_t entry_length = RTE_CACHE_LINE_ROUNDUP(
HW_HASH_INDEX_SIZE * sizeof(*vnic->rss_table) +
HW_HASH_KEY_SIZE);
uint16_t max_vnics;
@@ -229,6 +229,9 @@ void bnxt_free_vnic_mem(struct bnxt *bp)
struct bnxt_vnic_info *vnic;
uint16_t max_vnics, i;
+ if (bp->vnic_info == NULL)
+ return;
+
if (BNXT_PF(bp)) {
struct bnxt_pf_info *pf = &bp->pf;