bnx2x: Fix PF-VF communication over multi-cos queues.

PF driver doesn't enable tx-switching for all cos queues/clients,
which causes packets drop from PF to VF. Fix this by enabling
tx-switching on all cos queues/clients.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Manish Chopra 2019-11-04 21:51:11 -08:00 committed by David S. Miller
parent 069e47823f
commit dc5a3d79c3

View File

@ -2397,10 +2397,15 @@ static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable)
/* send the ramrod on all the queues of the PF */
for_each_eth_queue(bp, i) {
struct bnx2x_fastpath *fp = &bp->fp[i];
int tx_idx;
/* Set the appropriate Queue object */
q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj;
for (tx_idx = FIRST_TX_COS_INDEX;
tx_idx < fp->max_cos; tx_idx++) {
q_params.params.update.cid_index = tx_idx;
/* Update the Queue state */
rc = bnx2x_queue_state_change(bp, &q_params);
if (rc) {
@ -2408,6 +2413,7 @@ static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable)
return rc;
}
}
}
DP(BNX2X_MSG_IOV, "%s Tx Switching\n", enable ? "Enabled" : "Disabled");
return 0;