summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLance Richardson <lance.richardson@broadcom.com>2019-10-03 20:49:00 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:32 +0200
commit74721ba062a84a951cb7d3201d61988b7ec54045 (patch)
tree35511d0364a18dcf57bc6b66595992eb43e6919b /drivers/net
parent683e5cf79249d2628b7370beb7e39e040f5ec356 (diff)
downloaddpdk-74721ba062a84a951cb7d3201d61988b7ec54045.zip
dpdk-74721ba062a84a951cb7d3201d61988b7ec54045.tar.gz
dpdk-74721ba062a84a951cb7d3201d61988b7ec54045.tar.xz
net/bnxt: fix stats context calculation
The required number of statistics contexts is computed as the sum of the number of receive and transmit rings plus one for the async completion ring. A statistics context is not actually required for the async completion ring, so remove it from the calculation. Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events") Cc: stable@dpdk.org Signed-off-by: Lance Richardson <lance.richardson@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b5211ae..1e65c3b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -851,9 +851,7 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
req.num_tx_rings = rte_cpu_to_le_16(bp->tx_nr_rings);
req.num_rx_rings = rte_cpu_to_le_16(bp->rx_nr_rings *
AGG_RING_MULTIPLIER);
- req.num_stat_ctxs = rte_cpu_to_le_16(bp->rx_nr_rings +
- bp->tx_nr_rings +
- BNXT_NUM_ASYNC_CPR(bp));
+ req.num_stat_ctxs = rte_cpu_to_le_16(bp->rx_nr_rings + bp->tx_nr_rings);
req.num_cmpl_rings = rte_cpu_to_le_16(bp->rx_nr_rings +
bp->tx_nr_rings +
BNXT_NUM_ASYNC_CPR(bp));