patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: Huisong Li <lihuisong@huawei.com>
Cc: Dongdong Liu <liudongdong3@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: remove useless code when destroy valid RSS rule' has been queued to stable release 20.11.8
Date: Thu, 23 Feb 2023 09:36:48 +0000	[thread overview]
Message-ID: <20230223093715.3926893-44-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com>

Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/23. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b3663385a2aeff0fee1fe9bfed703c657eb29705

Thanks.

Luca Boccassi

---
From b3663385a2aeff0fee1fe9bfed703c657eb29705 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:57 +0800
Subject: [PATCH] net/hns3: remove useless code when destroy valid RSS rule

[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]

When all rules are flushed the hw::rss_info::conf::func set to
RTE_ETH_HASH_FUNCTION_MAX and hw::rss_info::conf::queue set to NULL
which indicates no flow rules is issued.
See: commit eb158fc756a5 ("net/hns3: fix config when creating RSS rule
after flush").

Actually, the way determining whether there are rules has been changed
by walking the flow RSS list.
See: commit 705a50800334 ("net/hns3: fix RSS filter restore").

In addition, the rte_flow_action_rss from user isn't saved to 'conf' in
hw->rss_info now. So this code can be removed.

Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")
Fixes: 705a50800334 ("net/hns3: fix RSS filter restore")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 0e0cf418ee..f6de004fbc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1258,19 +1258,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 	bool rss_key_is_same;
 	bool func_is_same;
 
-	/*
-	 * When user flush all RSS rule, RSS func is set invalid with
-	 * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
-	 * flushed, any validate RSS func is different with it before
-	 * flushed. Others, when user create an action RSS with RSS func
-	 * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
-	 * between continuous RSS flow.
-	 */
-	if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
-		func_is_same = false;
-	else
-		func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
-				(comp->func == with->func) : true;
+	func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
+			(comp->func == with->func) : true;
 
 	if (with->key_len == 0 || with->key == NULL)
 		rss_key_is_same = 1;
@@ -1501,7 +1490,6 @@ static int
 hns3_config_rss_filter(struct hns3_hw *hw,
 		       const struct hns3_rss_conf *conf, bool add)
 {
-	struct hns3_rss_conf *rss_info;
 	uint64_t flow_types;
 	uint16_t num;
 	int ret;
@@ -1528,7 +1516,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
 
-	rss_info = &hw->rss_info;
 	if (!add) {
 		if (!conf->valid)
 			return 0;
@@ -1539,15 +1526,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 			return ret;
 		}
 
-		if (rss_flow_conf.queue_num) {
-			/*
-			 * Due the content of queue pointer have been reset to
-			 * 0, the rss_info->conf.queue should be set to NULL
-			 */
-			rss_info->conf.queue = NULL;
-			rss_info->conf.queue_num = 0;
-		}
-
 		return 0;
 	}
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:29.993376016 +0000
+++ 0044-net-hns3-remove-useless-code-when-destroy-valid-RSS-.patch	2023-02-23 09:36:28.274170824 +0000
@@ -1 +1 @@
-From 546031ba551485c3e3aa57c3698975c2852cbef1 Mon Sep 17 00:00:00 2001
+From b3663385a2aeff0fee1fe9bfed703c657eb29705 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 4cca675c53..3809fcc2d7 100644
+index 0e0cf418ee..f6de004fbc 100644
@@ -33 +34 @@
-@@ -1279,19 +1279,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1258,19 +1258,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -55 +56 @@
-@@ -1533,7 +1522,6 @@ static int
+@@ -1501,7 +1490,6 @@ static int
@@ -63 +64 @@
-@@ -1560,7 +1548,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1528,7 +1516,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
@@ -71 +72 @@
-@@ -1571,15 +1558,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
+@@ -1539,15 +1526,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,

  parent reply	other threads:[~2023-02-23  9:39 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  9:36 patch 'eal/windows: mark memory config as complete' " luca.boccassi
2023-02-23  9:36 ` patch 'kni: fix build on RHEL 9.1' " luca.boccassi
2023-02-23  9:36 ` patch 'doc: fix dependency setup in l2fwd-cat example guide' " luca.boccassi
2023-02-23  9:36 ` patch 'devtools: fix escaped space in grep pattern' " luca.boccassi
2023-02-23  9:36 ` patch 'app/crypto-perf: fix number of segments' " luca.boccassi
2023-02-23  9:36 ` patch 'eventdev/eth_tx: fix devices loop' " luca.boccassi
2023-02-23  9:36 ` patch 'crypto/qat: fix stream cipher direction' " luca.boccassi
2023-02-23  9:36 ` patch 'fbarray: fix metadata dump' " luca.boccassi
2023-02-23  9:36 ` patch 'graph: fix node shrink' " luca.boccassi
2023-02-23  9:36 ` patch 'net/nfp: fix firmware name derived from PCI name' " luca.boccassi
2023-02-23  9:36 ` patch 'app/testpmd: fix interactive mode with no ports' " luca.boccassi
2023-02-23  9:36 ` patch 'examples/qos_sched: fix debug mode' " luca.boccassi
2023-02-23  9:36 ` patch 'build: fix dependencies lookup' " luca.boccassi
2023-02-23  9:36 ` patch 'vdpa/ifc: fix argument compatibility check' " luca.boccassi
2023-02-23  9:36 ` patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix net header settings in datapath' " luca.boccassi
2023-02-23  9:36 ` patch 'app/bbdev: add allocation checks' " luca.boccassi
2023-02-23  9:36 ` patch 'baseband/acc: fix memory leak on acc100 close' " luca.boccassi
2023-02-23  9:36 ` patch 'baseband/acc: fix acc100 iteration counter in TB' " luca.boccassi
2023-02-23  9:36 ` patch 'crypto/ccp: remove some printf' " luca.boccassi
2023-02-23  9:36 ` patch 'test/crypto: add missing MAC-I to PDCP vectors' " luca.boccassi
2023-02-23  9:36 ` patch 'compressdev: fix end of driver list' " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix Tx queue stats after queue stop and start' " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix Rx " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix RSS hash in mbuf' " luca.boccassi
2023-02-23  9:36 ` patch 'mem: fix hugepage info mapping' " luca.boccassi
2023-02-23  9:36 ` patch 'raw/ifpga/base: fix init with multi-process' " luca.boccassi
2023-02-23  9:36 ` patch 'telemetry: fix repeat display when callback don't init dict' " luca.boccassi
2023-02-23  9:36 ` patch 'test/mbuf: fix mbuf reset test' " luca.boccassi
2023-02-23  9:36 ` patch 'eventdev/timer: fix overflow' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: decrease log level for unimplemented requests' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix possible FD leaks' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix possible FD leaks on truncation' " luca.boccassi
2023-02-23  9:36 ` patch 'net/virtio-user: fix device starting failure handling' " luca.boccassi
2023-02-23  9:36 ` patch 'app/testpmd: fix forwarding stats for Tx dropped' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix default signal quality value for KX/KX4' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix packet type to parse from offload flags' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix interrupt loss' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix log about indirection table size' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: refactor set RSS hash algorithm and key interface' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix RSS key size compatibility' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix clearing RSS configuration' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: use RSS filter list to check duplicated rule' " luca.boccassi
2023-02-23  9:36 ` luca.boccassi [this message]
2023-02-23  9:36 ` patch 'net/hns3: fix warning on flush or destroy " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix config struct used for conversion' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix duplicate RSS rule check' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: extract common functions to set Rx/Tx' " luca.boccassi
2023-02-23  9:36 ` patch 'net/sfc: enforce fate action in transfer flow rules' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix Rx buffer size in config register' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: fix flow sample with ConnectX-5' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: fix error CQE dumping for vectorized Rx' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: ignore non-critical syndromes for Rx queue' " luca.boccassi
2023-02-23  9:36 ` patch 'net/i40e: reduce interrupt interval in multi-driver mode' " luca.boccassi
2023-02-23  9:36 ` patch 'net/ixgbe: fix firmware version consistency' " luca.boccassi
2023-02-23  9:37 ` patch 'net/iavf: add lock for VF commands' " luca.boccassi
2023-02-23  9:37 ` patch 'net/i40e: fix validation of flow transfer attribute' " luca.boccassi
2023-02-23  9:37 ` patch 'net/ice: " luca.boccassi
2023-02-23  9:37 ` patch 'net/iavf: protect insertion in flow list' " luca.boccassi
2023-02-23  9:37 ` patch 'net/ixgbe: enable IPv6 mask in flow rules' " luca.boccassi
2023-02-23  9:37 ` patch 'app/compress-perf: fix some typos' " luca.boccassi
2023-02-23  9:37 ` patch 'app/compress-perf: fix testing single operation' " luca.boccassi
2023-02-23  9:37 ` patch 'net/bnxt: fix link state change interrupt config' " luca.boccassi
2023-02-23  9:37 ` patch 'app/testpmd: fix crash on cleanup' " luca.boccassi
2023-02-23  9:37 ` patch 'eal/freebsd: fix lock in alarm callback' " luca.boccassi
2023-02-23  9:37 ` patch 'reorder: invalidate buffer from ready queue in drain' " luca.boccassi
2023-02-23  9:37 ` patch 'test/reorder: fix double free of drained buffers' " luca.boccassi
2023-02-23  9:37 ` patch 'build: fix toolchain definition' " luca.boccassi
2023-02-23  9:37 ` patch 'eal: use same atomic intrinsics for GCC and clang' " luca.boccassi
2023-02-23  9:37 ` patch 'examples/cmdline: fix build with GCC 12' " luca.boccassi
2023-02-23  9:37 ` patch 'examples/qos_sched: fix Tx port config when link down' " luca.boccassi
2023-03-15 22:45   ` patch 'eal/windows: fix pedantic build' " luca.boccassi
2023-03-15 22:45     ` patch 'doc: fix reference to event timer header' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: fix crash for non supported HARQ length' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: extend HARQ tolerance' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: remove check for invalid opaque data' " luca.boccassi
2023-03-15 22:45     ` patch 'vhost: fix OOB access for invalid vhost ID' " luca.boccassi
2023-03-16  9:27       ` Luca Boccassi
2023-03-16  9:56         ` David Marchand
2023-03-16 10:30           ` Kevin Traynor
2023-03-16 10:36             ` Luca Boccassi
2023-03-16 10:50               ` David Marchand
2023-03-15 22:45     ` patch 'Revert "vhost: fix OOB access for invalid vhost ID"' " luca.boccassi
2023-03-15 22:45     ` patch 'net/virtio: deduce IP length for TSO checksum' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix Tx preparation in checksum engine' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix packet count in IEEE 1588 " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix packet transmission in noisy VNF " luca.boccassi
2023-03-15 22:46     ` patch 'net/nfp: fix getting RSS configuration' " luca.boccassi
2023-03-15 22:46     ` patch 'net/ixgbe: fix IPv6 mask in flow director' " luca.boccassi
2023-03-15 22:46     ` patch 'net/i40e: revert link status check on device start' " luca.boccassi
2023-03-15 22:46     ` patch 'net/nfp: fix MTU configuration order' " luca.boccassi
2023-03-15 22:46     ` patch 'kvargs: add API documentation for process callback' " luca.boccassi
2023-03-15 22:46     ` patch 'compressdev: fix empty devargs parsing' " luca.boccassi
2023-03-15 22:46     ` patch 'cryptodev: " luca.boccassi
2023-03-15 22:46     ` patch 'net/virtio: " luca.boccassi
2023-03-15 22:46     ` patch 'raw/skeleton: " luca.boccassi
2023-03-15 22:46     ` patch 'kni: fix possible starvation when mbufs are exhausted' " luca.boccassi
2023-03-15 22:46     ` patch 'cmdline: handle EOF as quit' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: cleanup cleanly from signal' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: fix possible truncation of hash key when config' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: fix possible truncation of redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report hash key' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report hash types' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting hash algorithm' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting hash key' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting RSS types' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting and clearing RSS rule' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use new RSS rule to configure hardware' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: save hash algo to RSS filter list node' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: allow adding queue buffer size hash rule' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate flow RSS config from RSS conf' " luca.boccassi
2023-03-15 22:46     ` patch 'app/crypto-perf: fix test file memory leak' " luca.boccassi
2023-03-15 22:46     ` patch 'app/flow-perf: fix division or module by zero' " luca.boccassi
2023-03-22  0:41       ` patch 'raw/skeleton: fix selftest' " luca.boccassi
2023-03-22  0:41         ` patch 'ring: silence GCC 12 warnings' " luca.boccassi
2023-03-22  0:41         ` patch 'reorder: fix sequence number mbuf field register' " luca.boccassi
2023-03-22  0:41         ` patch 'test: fix segment length in packet generator' " luca.boccassi
2023-03-22  0:41         ` patch 'test/mbuf: fix test with mbuf debug enabled' " luca.boccassi
2023-03-22  0:41         ` patch 'app/testpmd: cleanup cleanly from signal' " luca.boccassi
2023-03-22  0:41         ` patch 'app/testpmd: fix interactive mode on Windows' " luca.boccassi
2023-03-22  0:41         ` patch 'app/compress-perf: fix remaining data for ops' " luca.boccassi
2023-03-22  0:41         ` patch 'app/bbdev: check statistics failure' " luca.boccassi
2023-03-22  0:41         ` patch 'net/vhost: add missing newline in logs' " luca.boccassi
2023-03-22  0:41         ` patch 'net/virtio: remove address width limit for modern devices' " luca.boccassi
2023-03-22  0:41         ` patch 'net/e1000: fix saving of stripped VLAN TCI' " luca.boccassi
2023-03-22  0:41         ` patch 'net/i40e: fix MAC loopback on X722' " luca.boccassi
2023-03-22  0:41         ` patch 'net/iavf: fix device stop during reset' " luca.boccassi
2023-03-22  0:41         ` patch 'net/mlx5: fix hairpin Tx queue reference count' " luca.boccassi
2023-03-22  0:41         ` patch 'common/mlx5: use just sufficient barrier for Arm' " luca.boccassi
2023-03-22  0:41         ` patch 'bus/ifpga: fix devargs handling' " luca.boccassi
2023-03-22  0:41         ` patch 'net/ipn3ke: fix thread exit' " luca.boccassi
2023-03-22  0:41         ` patch 'net/ipn3ke: fix representor name' " luca.boccassi
2023-03-29  1:04           ` patch 'examples/qos_sched: fix config entries in wrong sections' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix build with GCC 12 and ASan' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix CQE dump for Tx' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix sysfs port name translation' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: fix code blocks in cryptodev guide' " luca.boccassi
2023-03-29  1:04             ` patch 'test/crypto: fix statistics error messages' " luca.boccassi
2023-03-29  1:04             ` patch 'pdump: fix build with GCC 12' " luca.boccassi
2023-03-29  1:04             ` patch 'acl: fix crash on PPC64 with GCC 11' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: fix pipeline example path in user guide' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: add Linux capability to access physical addresses' " luca.boccassi

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=20230223093715.3926893-44-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=lihuisong@huawei.com \
    --cc=liudongdong3@huawei.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).