net/bnxt: fix VNIC config error in port start
PATCH 1/1 net/bnxt: fix VNIC config error in port start
During port stop/start sequence the Thor FW is returning an error. This is because we are deriving incorrect active Rx ring and using that wrong information in the bnxt_vnic_rss_cfg HWRM command.
Fix it by using the rx_queue_state from eth_dev.
Fixes 0105ea1296c91 ("net/bnxt: support runtime queue setup")
Signed-off-by Ajit Khaparde <[email protected]>
Reviewed-by Somnath Kotur <[email protected]>
--- drivers/net/bnxt/bnxt_hwrm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +2 -1
@@ -5078,6 +5078,7 @@ static int bnxt_vnic_rss_configure_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic) { struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr; +uint8_t *rxq_state = bp->eth_dev->data->rx_queue_state;struct hwrm_vnic_rss_cfg_input req = {.req_type =0 };struct bnxt_rx_queue **rxqs = bp->rx_queues;uint16_t *ring_tbl = vnic->rss_table;
@@ -5111,7 +5112,7 @@ bnxt_vnic_rss_configure_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)/* Find next active ring. */ for (cnt =0 ; cnt < max_rings; cnt++) { -if (rxqs[k]->rx_started) +if (rxq_state[k] !=RTE_ETH_QUEUE_STATE_STOPPED )break ;if (++k == max_rings) k =0 ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
Quoted 5 lines · Ajit Khaparde
During port stop/start sequence the Thor FW is returning an error. This is because we are deriving incorrect active Rx ring and using that wrong information in the
bnxt_vnic_rss_cfgHWRM command.
Quoted 7 lines
Fix it by using the
rx_queue_statefrometh_dev.Fixes 0105ea1296c91 ("net/bnxt: support runtime queue setup")Signed-off-by Ajit Khaparde <[email protected]>Reviewed-by Somnath Kotur <[email protected]>
Patch applied to dpdk-next-net-brcm.
Quoted 28 lines
--- drivers/net/bnxt/bnxt_hwrm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/bnxt/bnxt_hwrm.c +2
-2@@ -5078,6 +5078,7 @@ static int bnxt_vnic_rss_configure_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic) { struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr; +uint8_t *rxq_state = bp->eth_dev->data->rx_queue_state;struct hwrm_vnic_rss_cfg_input req = {.req_type =0 };struct bnxt_rx_queue **rxqs = bp->rx_queues;uint16_t *ring_tbl = vnic->rss_table;@@ -5111,7 +5112,7 @@ bnxt_vnic_rss_configure_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)/* Find next active ring. */ for (cnt =0 ; cnt < max_rings; cnt++) { -if (rxqs[k]->rx_started) +if (rxq_state[k] !=RTE_ETH_QUEUE_STATE_STOPPED )break ;if (++k == max_rings) k =0 ; --2.21.1 (Apple Git-122.3)