Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58b35c92 authored by Manish Chopra's avatar Manish Chopra Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit dc5a3d79c345871439ffe72550b604fcde9770e1 ]

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: default avatarManish Chopra <manishc@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b5421330
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -2394,10 +2394,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) {
@@ -2405,6 +2410,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;