Skip to contentSkip to conversation

net/cpfl: fix RSS lookup table configuration

PATCH Applied [email protected] 3 participants 3 messages Jul 3, 2023 – Jul 4, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/cpfl: fix RSS lookup table configuration

From: Beilei Xing <[email protected]>

Ethdev Rx queues includes normal data queues and hairpin queues, RSS should direct traffic only to the normal data queues.

Fixes fda03330fcaa ("net/cpfl: support hairpin queue configuration")
---
 drivers/net/cpfl/cpfl_ethdev.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
drivers/net/cpfl/cpfl_ethdev.c +22 -0
index 9755ffe508..c4ca9343c3 100644
@@ -817,6 +817,24 @@ cpfl_rxq_hairpin_mz_bind(struct rte_eth_dev *dev)
 	}
 }
 
+static int
+cpfl_rss_lut_config(struct cpfl_vport *cpfl_vport, uint16_t nb_q)
+{
+	struct idpf_vport *vport = &cpfl_vport->base;
+	uint16_t lut_size = vport->rss_lut_size;
+	uint16_t i;
+	int ret;
+
+	for (i = 0; i < lut_size; i++)
+		vport->rss_lut[i] = i % nb_q;
+
+	ret = idpf_vc_rss_lut_set(vport);
+	if (ret)
+		PMD_INIT_LOG(ERR, "Failed to configure RSS lut");
+
+	return ret;
+}
+
 static int
 cpfl_start_queues(struct rte_eth_dev *dev)
 {
@@ -951,6 +969,10 @@ cpfl_start_queues(struct rte_eth_dev *dev)
 		}
 	}
 
+	/* re-configure RSS lut if there's hairpin queue */
+	if (cpfl_vport->nb_p2p_rxq > 0)
+		err = cpfl_rss_lut_config(cpfl_vport, cpfl_vport->nb_data_rxq);
+
 	return err;
 }
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Monday, July 3, 2023 7:28 PM
To: Wu, Jingjing <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>
Subject: [PATCH] net/cpfl: fix RSS lookup table configuration

Quoted 8 lines

From: Beilei Xing <[email protected]>

Ethdev Rx queues includes normal data queues and hairpin queues, RSS should direct traffic only to the normal data queues.

Fixes fda03330fcaa ("net/cpfl: support hairpin queue configuration")
Applied
#2 lore raw
Quoted 20 lines

-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Monday, July 3, 2023 3:33 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] net/cpfl: fix RSS lookup table configuration

Quoted 9 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Monday, July 3, 2023 7:28 PM
To: Wu, Jingjing <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>
Subject: [PATCH] net/cpfl: fix RSS lookup table configuration

From: Beilei Xing <[email protected]>

Quoted 8 lines
Quoted 6 lines

Ethdev Rx queues includes normal data queues and hairpin queues, RSS should direct traffic only to the normal data queues.

Fixes fda03330fcaa ("net/cpfl: support hairpin queue configuration")

Applied to dpdk-next-net-intel.

Thanks
Qi