Skip to contentSkip to conversation

i40e: Fix ADq rate limiting for PF

PATCH In review Sokolowski, Jan 2 participants 2 messages Aug 9, 2022 – Sep 1, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: Fix ADq rate limiting for PF

From: Przemyslaw Patynowski <[email protected]>

Fix HW rate limiting for ADq.
Fallback to kernel queue selection for ADq, as it is network stack that decides which queue to use for transmit with ADq configured. Reset PF after creation of VMDq2 VSIs required for ADq, as to reprogram TX queue contexts in i40e_configure_tx_ring. Without this patch PF would limit TX rate only according to TC0.

Fixes a9ce82f744dc ("i40e: Enable 'channel' mode in mqprio for TC configs")
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +3 -0
index 9f1d5de7bf16..10c1e1ea83a1 100644
@@ -6659,6 +6659,9 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
 			vsi->tc_seid_map[i] = ch->seid;
 		}
 	}
+
+	/* reset to reconfigure TX queue contexts */
+	i40e_do_reset(vsi->back, I40E_PF_RESET_FLAG, true);
 	return ret;
 
 err_free:
drivers/net/ethernet/intel/i40e/i40e_txrx.c +2 -1
index d4226161a3ef..69e67eb6aea7 100644
@@ -3688,7 +3688,8 @@ u16 i40e_lan_select_queue(struct net_device *netdev,
 	u8 prio;
 
 	/* is DCB enabled at all? */
-	if (vsi->tc_config.numtc == 1)
+	if (vsi->tc_config.numtc == 1 ||
+	    i40e_is_tc_mqprio_enabled(vsi->back))
 		return netdev_pick_tx(netdev, skb, sb_dev);
 
 	prio = skb->priority;
Signature · 6 lines
2.31.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw
Quoted 19 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Sokolowski, Jan
Sent: Tuesday, August 9, 2022 2:28 PM
To: [email protected]
Cc: Patynowski, PrzemyslawX <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix ADq rate limiting for PF

From: Przemyslaw Patynowski <[email protected]>

Fix HW rate limiting for ADq.
Fallback to kernel queue selection for ADq, as it is network stack that decides which queue to use for transmit with ADq configured.
Reset PF after creation of VMDq2 VSIs required for ADq, as to reprogram TX queue contexts in i40e_configure_tx_ring.
Without this patch PF would limit TX rate only according to TC0.

Quoted 9 lines
Fixes a9ce82f744dc ("i40e: Enable 'channel' mode in mqprio for TC configs")
Signed-off-by Przemyslaw Patynowski

<[email protected]>

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan