patch 'net/i40e: remove duplicate code' has been queued to stable release 22.11.8
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Feb 17 18:04:37 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.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/19/25. 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/af5c1efdef046a38adadeeb0ce3b72d32e491253
Thanks.
Luca Boccassi
---
>From af5c1efdef046a38adadeeb0ce3b72d32e491253 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 5 Feb 2025 08:23:06 -0800
Subject: [PATCH] net/i40e: remove duplicate code
[ upstream commit 8c085f702ac3074d20e51ee691b0bc967919c43e ]
There are two branches in the cascading if/else that have same
condition and code; remove one. Update the code to follow DPDK
style where all statements in if should have brackets if any
leg requires them.
Link: https://pvs-studio.com/en/blog/posts/cpp/1183/
Fixes: 2ab5c84605f0 ("net/i40e: fix ESP flow creation")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/i40e/i40e_fdir.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index afcaa593eb..1f48a63323 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -599,18 +599,16 @@ i40e_flow_fdir_fill_eth_ip_head(struct i40e_pf *pf,
} else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4_UDP) {
len = fill_ip4_head(fdir_input, raw_pkt, IPPROTO_UDP,
len, ether_type);
- } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV4_UDP) {
- len = fill_ip4_head(fdir_input, raw_pkt, IPPROTO_UDP,
- len, ether_type);
- } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6)
+ } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6) {
len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_ESP,
len, ether_type);
- else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6_UDP)
+ } else if (cus_pctype->index == I40E_CUSTOMIZED_ESP_IPV6_UDP) {
len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_UDP,
len, ether_type);
- else if (cus_pctype->index == I40E_CUSTOMIZED_IPV6_L2TPV3)
+ } else if (cus_pctype->index == I40E_CUSTOMIZED_IPV6_L2TPV3) {
len = fill_ip6_head(fdir_input, raw_pkt, IPPROTO_L2TP,
len, ether_type);
+ }
} else {
PMD_DRV_LOG(ERR, "unknown pctype %u.", fdir_input->pctype);
return -1;
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-17 16:13:19.097732625 +0000
+++ 0064-net-i40e-remove-duplicate-code.patch 2025-02-17 16:13:16.862441592 +0000
@@ -1 +1 @@
-From 8c085f702ac3074d20e51ee691b0bc967919c43e Mon Sep 17 00:00:00 2001
+From af5c1efdef046a38adadeeb0ce3b72d32e491253 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c085f702ac3074d20e51ee691b0bc967919c43e ]
+
@@ -17 +19 @@
- drivers/net/intel/i40e/i40e_fdir.c | 10 ++++------
+ drivers/net/i40e/i40e_fdir.c | 10 ++++------
@@ -20,4 +22,4 @@
-diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c
-index 349627a2ed..94e3ab44e3 100644
---- a/drivers/net/intel/i40e/i40e_fdir.c
-+++ b/drivers/net/intel/i40e/i40e_fdir.c
+diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
+index afcaa593eb..1f48a63323 100644
+--- a/drivers/net/i40e/i40e_fdir.c
++++ b/drivers/net/i40e/i40e_fdir.c
More information about the stable
mailing list