From: Lance Richardson Date: Mon, 4 Nov 2019 20:27:44 +0000 (-0500) Subject: net/bnxt: fix RSS table update for start/stop Rx queue X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=34a068411a8bed590141e24e2d3f3d04c989301a;p=dpdk.git net/bnxt: fix RSS table update for start/stop Rx queue A previous commit made updating of the RSS table when a receive queue is stopped/started conditional on vnic->rx_queue_cnt being nonzero. This count is only nonzero for dynamically created VNICs, so the RSS table was not being updated in the normal path. Fix by restoring the original logic. Also ensure that vnic->rx_queue_cnt is initialized to zero when reinitializing the VNIC array. Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC") Signed-off-by: Lance Richardson Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 6420281d34..ab889c10e1 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -466,8 +466,7 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) } PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n", vnic->rx_queue_cnt); - if (vnic->rx_queue_cnt > 1) - rc = bnxt_vnic_rss_configure(bp, vnic); + rc = bnxt_vnic_rss_configure(bp, vnic); } if (rc == 0) @@ -522,8 +521,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) vnic->fw_grp_ids[rx_queue_id] = INVALID_HW_RING_ID; PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n", vnic->rx_queue_cnt); - if (vnic->rx_queue_cnt > 1) - rc = bnxt_vnic_rss_configure(bp, vnic); + rc = bnxt_vnic_rss_configure(bp, vnic); } if (rc == 0) diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c index 412a53dc07..52a4badfca 100644 --- a/drivers/net/bnxt/bnxt_vnic.c +++ b/drivers/net/bnxt/bnxt_vnic.c @@ -51,6 +51,7 @@ static void bnxt_init_vnics(struct bnxt *bp) vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE; vnic->hash_mode = HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT; + vnic->rx_queue_cnt = 0; STAILQ_INIT(&vnic->filter); STAILQ_INIT(&vnic->flow_list);