]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bnx2x: Fix PF-VF communication over multi-cos queues.
authorManish Chopra <manishc@marvell.com>
Tue, 5 Nov 2019 05:51:11 +0000 (21:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 02:25:14 +0000 (18:25 -0800)
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>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index 0edbb0a76847260314c8568d13eeca0d1b554b96..5097a44686b39aa3af21fedfc0ecc7e103717079 100644 (file)
@@ -2397,15 +2397,21 @@ 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;
 
-               /* Update the Queue state */
-               rc = bnx2x_queue_state_change(bp, &q_params);
-               if (rc) {
-                       BNX2X_ERR("Failed to configure Tx switching\n");
-                       return rc;
+               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) {
+                               BNX2X_ERR("Failed to configure Tx switching\n");
+                               return rc;
+                       }
                }
        }