From: Ajit Khaparde Date: Thu, 28 Sep 2017 21:43:25 +0000 (-0500) Subject: net/bnxt: fix calculation of number of pools X-Git-Tag: spdx-start~1871 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e28538f1620ea815e879df92d2a5c5dc8b4ec8d0;p=dpdk.git net/bnxt: fix calculation of number of pools The calculation for number of pools is wrong. We are wrongly overwriting the calculated value with ETH_64_POOLS. Accordingly fix the size of ff_pools array. Fix the log message as well. Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 405d94deb5..3579505094 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -217,7 +217,7 @@ struct bnxt { STAILQ_HEAD(, bnxt_filter_info) free_filter_list; /* VNIC pointer for flow filter (VMDq) pools */ -#define MAX_FF_POOLS ETH_64_POOLS +#define MAX_FF_POOLS 256 STAILQ_HEAD(, bnxt_vnic_info) ff_pool[MAX_FF_POOLS]; struct bnxt_irq *irq_tbl; diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index ef5e47d4ff..441e543ebf 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -125,8 +125,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp) RTE_MIN(bp->max_l2_ctx, RTE_MIN(bp->max_rsscos_ctx, ETH_64_POOLS))); RTE_LOG(ERR, PMD, - "VMDq pool not set, defaulted to 64\n"); - pools = ETH_64_POOLS; + "VMDq pool not set, defaulted to %d\n", pools); } nb_q_per_grp = bp->rx_cp_nr_rings / pools; start_grp_id = 0;