[dpdk-stable] patch 'net/qede: fix RSS configuration as per new allocation method' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Fri Nov 22 15:41:27 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/29/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/d7e289a330488f425b35c529905b2eeec08594f8

Thanks.

Kevin.

---
>From d7e289a330488f425b35c529905b2eeec08594f8 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh at marvell.com>
Date: Thu, 12 Sep 2019 08:24:14 -0700
Subject: [PATCH] net/qede: fix RSS configuration as per new allocation method

[ upstream commit 235cbe4c22728dd70cd9f1fed4b7910d2e07983e ]

With old design, RETA was configured in round-robin fashion since
queue allocation was distributed across both engines alternately.
Now, we need to configure RETA symmetrically on both engines since
both engines have same number of queues.

Fixes: 2af14ca79c0a ("net/qede: support 100G")

Signed-off-by: Shahed Shaikh <shshaikh at marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 110 ++++++++-------------------------
 1 file changed, 27 insertions(+), 83 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index de8e26f51..493d0bce0 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1962,6 +1962,5 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	uint64_t hf = rss_conf->rss_hf;
 	uint8_t len = rss_conf->rss_key_len;
-	uint8_t idx;
-	uint8_t i;
+	uint8_t idx, i, j, fpidx;
 	int rc;
 
@@ -1997,12 +1996,16 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	rss_params.rss_table_size_log = 7;
 	vport_update_params.vport_id = 0;
-	/* pass the L2 handles instead of qids */
-	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
-		idx = i % QEDE_RSS_COUNT(eth_dev);
-		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;
-	}
-	vport_update_params.rss_params = &rss_params;
 
 	for_each_hwfn(edev, i) {
+		/* pass the L2 handles instead of qids */
+		for (j = 0 ; j < ECORE_RSS_IND_TABLE_SIZE ; j++) {
+			idx = j % QEDE_RSS_COUNT(eth_dev);
+			fpidx = idx * edev->num_hwfns + i;
+			rss_params.rss_ind_table[j] =
+				qdev->fp_array[fpidx].rxq->handle;
+		}
+
+		vport_update_params.rss_params = &rss_params;
+
 		p_hwfn = &edev->hwfns[i];
 		vport_update_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
@@ -2056,59 +2059,4 @@ static int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
 }
 
-static bool qede_update_rss_parm_cmt(struct ecore_dev *edev,
-				    struct ecore_rss_params *rss)
-{
-	int i, fn;
-	bool rss_mode = 1; /* enable */
-	struct ecore_queue_cid *cid;
-	struct ecore_rss_params *t_rss;
-
-	/* In regular scenario, we'd simply need to take input handlers.
-	 * But in CMT, we'd have to split the handlers according to the
-	 * engine they were configured on. We'd then have to understand
-	 * whether RSS is really required, since 2-queues on CMT doesn't
-	 * require RSS.
-	 */
-
-	/* CMT should be round-robin */
-	for (i = 0; i < ECORE_RSS_IND_TABLE_SIZE; i++) {
-		cid = rss->rss_ind_table[i];
-
-		if (cid->p_owner == ECORE_LEADING_HWFN(edev))
-			t_rss = &rss[0];
-		else
-			t_rss = &rss[1];
-
-		t_rss->rss_ind_table[i / edev->num_hwfns] = cid;
-	}
-
-	t_rss = &rss[1];
-	t_rss->update_rss_ind_table = 1;
-	t_rss->rss_table_size_log = 7;
-	t_rss->update_rss_config = 1;
-
-	/* Make sure RSS is actually required */
-	for_each_hwfn(edev, fn) {
-		for (i = 1; i < ECORE_RSS_IND_TABLE_SIZE / edev->num_hwfns;
-		     i++) {
-			if (rss[fn].rss_ind_table[i] !=
-			    rss[fn].rss_ind_table[0])
-				break;
-		}
-
-		if (i == ECORE_RSS_IND_TABLE_SIZE / edev->num_hwfns) {
-			DP_INFO(edev,
-				"CMT - 1 queue per-hwfn; Disabling RSS\n");
-			rss_mode = 0;
-			goto out;
-		}
-	}
-
-out:
-	t_rss->rss_enable = rss_mode;
-
-	return rss_mode;
-}
-
 int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
 			 struct rte_eth_rss_reta_entry64 *reta_conf,
@@ -2119,6 +2067,6 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
 	struct ecore_sp_vport_update_params vport_update_params;
 	struct ecore_rss_params *params;
+	uint16_t i, j, idx, fid, shift;
 	struct ecore_hwfn *p_hwfn;
-	uint16_t i, idx, shift;
 	uint8_t entry;
 	int rc = 0;
@@ -2131,6 +2079,5 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
 
 	memset(&vport_update_params, 0, sizeof(vport_update_params));
-	params = rte_zmalloc("qede_rss", sizeof(*params) * edev->num_hwfns,
-			     RTE_CACHE_LINE_SIZE);
+	params = rte_zmalloc("qede_rss", sizeof(*params), RTE_CACHE_LINE_SIZE);
 	if (params == NULL) {
 		DP_ERR(edev, "failed to allocate memory\n");
@@ -2138,25 +2085,8 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
 	}
 
-	for (i = 0; i < reta_size; i++) {
-		idx = i / RTE_RETA_GROUP_SIZE;
-		shift = i % RTE_RETA_GROUP_SIZE;
-		if (reta_conf[idx].mask & (1ULL << shift)) {
-			entry = reta_conf[idx].reta[shift];
-			/* Pass rxq handles to ecore */
-			params->rss_ind_table[i] =
-					qdev->fp_array[entry].rxq->handle;
-			/* Update the local copy for RETA query command */
-			qdev->rss_ind_table[i] = entry;
-		}
-	}
-
 	params->update_rss_ind_table = 1;
 	params->rss_table_size_log = 7;
 	params->update_rss_config = 1;
 
-	/* Fix up RETA for CMT mode device */
-	if (ECORE_IS_CMT(edev))
-		qdev->rss_enable = qede_update_rss_parm_cmt(edev,
-							    params);
 	vport_update_params.vport_id = 0;
 	/* Use the current value of rss_enable */
@@ -2165,4 +2095,18 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
 
 	for_each_hwfn(edev, i) {
+		for (j = 0; j < reta_size; j++) {
+			idx = j / RTE_RETA_GROUP_SIZE;
+			shift = j % RTE_RETA_GROUP_SIZE;
+			if (reta_conf[idx].mask & (1ULL << shift)) {
+				entry = reta_conf[idx].reta[shift];
+				fid = entry * edev->num_hwfns + i;
+				/* Pass rxq handles to ecore */
+				params->rss_ind_table[j] =
+						qdev->fp_array[fid].rxq->handle;
+				/* Update the local copy for RETA query cmd */
+				qdev->rss_ind_table[j] = entry;
+			}
+		}
+
 		p_hwfn = &edev->hwfns[i];
 		vport_update_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-11-22 14:36:57.390510223 +0000
+++ 0041-net-qede-fix-RSS-configuration-as-per-new-allocation.patch	2019-11-22 14:36:55.224148709 +0000
@@ -1 +1 @@
-From 235cbe4c22728dd70cd9f1fed4b7910d2e07983e Mon Sep 17 00:00:00 2001
+From d7e289a330488f425b35c529905b2eeec08594f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 235cbe4c22728dd70cd9f1fed4b7910d2e07983e ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 308588cb8..8b75ca3a7 100644
+index de8e26f51..493d0bce0 100644
@@ -23 +24 @@
-@@ -1963,6 +1963,5 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
+@@ -1962,6 +1962,5 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
@@ -31 +32 @@
-@@ -1998,12 +1997,16 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
+@@ -1997,12 +1996,16 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
@@ -54 +55 @@
-@@ -2057,59 +2060,4 @@ static int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
+@@ -2056,59 +2059,4 @@ static int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
@@ -114 +115 @@
-@@ -2120,6 +2068,6 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+@@ -2119,6 +2067,6 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
@@ -122 +123 @@
-@@ -2132,6 +2080,5 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+@@ -2131,6 +2079,5 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
@@ -130 +131 @@
-@@ -2139,25 +2086,8 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+@@ -2138,25 +2085,8 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
@@ -156 +157 @@
-@@ -2166,4 +2096,18 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+@@ -2165,4 +2095,18 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,



More information about the stable mailing list