patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Shahed Shaikh <shshaikh@marvell.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/qede: fix RSS configuration as per new allocation method' has been queued to LTS release 18.11.6
Date: Fri, 22 Nov 2019 14:41:27 +0000	[thread overview]
Message-ID: <20191122144131.21231-41-ktraynor@redhat.com> (raw)
In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com>

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@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@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@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,


  parent reply	other threads:[~2019-11-22 14:43 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 14:40 [dpdk-stable] patch 'net/bonding: fix out of bound access in LACP mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix LACP fast queue Rx handler' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/bonding: fix unicast packets filtering' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: fix VF runtime queues RSS config' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'ethdev: fix doc reference to FDIR disabled mode' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/af_packet: fix stale sockets' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'app/testpmd: remove duplicated Rx offload commands' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/atlantic: remove double function declaration' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/mlx4: fix build on ppc64' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove memory barrier from NEON Rx' " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/i40e: remove compiler " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove memory " Kevin Traynor
2019-11-22 14:40 ` [dpdk-stable] patch 'net/ixgbe: remove redundant assignment' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/vmxnet3: remove IP checksum from capabilities' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ethdev: fix typos for ENOTSUP' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix queue interrupt for X552/557' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: enable new PF host mbox version' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/ixgbe: fix VF RSS offloads configuration' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/virtio: remove remaining simple Tx related stuff' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix typo in virtio in-order Rx function name' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix format in virtio guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'build: remove redundant libs from pkgconfig' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix meson build with custom dependency path' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx: fix build with make and recent gcc' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'test/interrupt: account for race with callback' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'bus/pci: fix Intel IOMMU sysfs access check' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix unchecked return value' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix access to freed packet' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'security: fix doxygen fields' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/qat: fix digest length in XCBC capability' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA table' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'crypto/octeontx: enable unbinding' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'doc: fix AESNI-GCM limitations in crypto guide' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'examples/fips_validation: fix null dereferences' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'cryptodev: fix initialization on multi-process' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'drivers/crypto: remove some invalid comments' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/i40e: downgrade error log' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/mlx5: fix Rx CQ doorbell synchronization on aarch64' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: refactor Rx and Tx queue setup' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix odd number of queues usage in 100G mode' " Kevin Traynor
2019-11-22 14:41 ` Kevin Traynor [this message]
2019-11-22 14:41 ` [dpdk-stable] patch 'net/qede: fix stats flow as per new allocation method' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'ci: add missing dependencies for documentation' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix i219 hang on reset/close' " Kevin Traynor
2019-11-22 14:41 ` [dpdk-stable] patch 'net/e1000: fix memory barrier usage in Tx' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122144131.21231-41-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=shshaikh@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).