Skip to contentSkip to conversation

i40e: Do not allow use more TC queue pairs than MSI-X vectors exist

PATCH New Alice Michael 2 participants 2 messages Dec 29, 2017 – Jan 5, 2018

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

PATCH 3/14 i40e: Do not allow use more TC queue pairs than MSI-X vectors exist

From: Pawe? Jab?o?ski <[email protected]>

This patch suppresses the message about invalid TC mapping and wrong selected TX queue. The root cause of this bug was setting too many TC queue pairs on huge multiprocessor machines. When quantity of the TC queue pairs is exceeding MSI-X vectors count then TX queue number can be selected beyond actual TX queues amount.

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +4 -0
index 14e4a2b..ea8be7c 100644
@@ -1811,6 +1811,10 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
 	num_tc_qps = qcount / numtc;
 	num_tc_qps = min_t(int, num_tc_qps, i40e_pf_get_max_q_per_tc(pf));
 
+	/* Do not allow use more TC queue pairs than MSI-X vectors exist */
+	if (pf->flags & I40E_FLAG_MSIX_ENABLED)
+		num_tc_qps = min_t(int, num_tc_qps, pf->num_lan_msix);
+
 	/* Setup queue offset/count for all TCs for given VSI */
 	for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
 		/* See if the given TC is enabled for the given VSI */
Signature · 1 line
2.9.5
#1 lore raw

PATCH 3/14 i40e: Do not allow use more TC queue pairs than MSI-X vectors exist

Quoted 18 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Friday, December 29, 2017 5:49 AM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Cc: Jablonski, Pawel <[email protected]>
Subject: [Intel-wired-lan] [next PATCH S85-V1 03/14] i40e: Do not allow use more TC queue pairs than MSI-X vectors exist

From: Pawe? Jab?o?ski <[email protected]>

This patch suppresses the message about invalid TC mapping and wrong selected TX queue. The root cause of this bug was setting too many TC queue pairs on huge multiprocessor machines. When quantity of the TC queue pairs is exceeding MSI-X vectors count then TX queue number can be selected beyond actual TX queues amount.

Quoted 4 lines
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
 1 file changed, 4 insertions(+)