net/bnxt: fix queue stop operation
When there are no active Rx queues(i.e when all queues have been
stopped), clear the RSS redirection table of the VNIC on Thor.
Fixes: 9b63c6fd70
("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
This commit is contained in:
parent
04689bdb65
commit
3e6fae2b65
@ -6262,3 +6262,26 @@ int bnxt_hwrm_config_host_mtu(struct bnxt *bp)
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
|
||||||
|
{
|
||||||
|
struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
|
||||||
|
struct hwrm_vnic_rss_cfg_input req = {0};
|
||||||
|
int nr_ctxs = vnic->num_lb_ctxts;
|
||||||
|
int i, rc = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < nr_ctxs; i++) {
|
||||||
|
HWRM_PREP(&req, HWRM_VNIC_RSS_CFG, BNXT_USE_CHIMP_MB);
|
||||||
|
|
||||||
|
req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_grp_ids[i]);
|
||||||
|
req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
|
||||||
|
|
||||||
|
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
|
||||||
|
|
||||||
|
HWRM_CHECK_RESULT();
|
||||||
|
HWRM_UNLOCK();
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
@ -310,4 +310,5 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
|
|||||||
void bnxt_free_hwrm_tx_ring(struct bnxt *bp, int queue_index);
|
void bnxt_free_hwrm_tx_ring(struct bnxt *bp, int queue_index);
|
||||||
int bnxt_alloc_hwrm_tx_ring(struct bnxt *bp, int queue_index);
|
int bnxt_alloc_hwrm_tx_ring(struct bnxt *bp, int queue_index);
|
||||||
int bnxt_hwrm_config_host_mtu(struct bnxt *bp);
|
int bnxt_hwrm_config_host_mtu(struct bnxt *bp);
|
||||||
|
int bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
|
||||||
#endif
|
#endif
|
||||||
|
@ -574,6 +574,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
|
|||||||
if (active_queue_cnt == 0) {
|
if (active_queue_cnt == 0) {
|
||||||
uint16_t saved_mru = vnic->mru;
|
uint16_t saved_mru = vnic->mru;
|
||||||
|
|
||||||
|
/* clear RSS setting on vnic. */
|
||||||
|
bnxt_vnic_rss_clear_p5(bp, vnic);
|
||||||
|
|
||||||
vnic->mru = 0;
|
vnic->mru = 0;
|
||||||
/* Reconfigure default receive ring and MRU. */
|
/* Reconfigure default receive ring and MRU. */
|
||||||
bnxt_hwrm_vnic_cfg(bp, vnic);
|
bnxt_hwrm_vnic_cfg(bp, vnic);
|
||||||
|
Loading…
Reference in New Issue
Block a user