* patch 'ethdev: convert string initialization' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/fm10k/base: fix compilation warnings' " Xueming Li
` (83 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Xueming Li, Morten Brørup, Bruce Richardson,
Andrew Rybchenko, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=cf180e0602f78bf26fecef356f8359f4274fe61c
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From cf180e0602f78bf26fecef356f8359f4274fe61c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Thu, 3 Oct 2024 21:13:34 -0700
Subject: [PATCH] ethdev: convert string initialization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e0d947a1e6c2f80aa039a4f7082a8aa16797d8b9 ]
gcc 15 experimental [1], with -Wextra flag, gives warning in variable
initialization as string [2].
The warning has a point when initialized variable is intended to use as
string, since assignment is missing the required null terminator for
this case. But warning is useless for our usecase.
In this patch only updated a few instance to show the issue, there are
many instances to fix, if we prefer to go this way.
Other option is to disable warning but it can be useful for actual
string usecases, so I prefer to keep it.
Converted string initialization to array initialization.
[1]
gcc (GCC) 15.0.0 20241003 (experimental)
[2]
../lib/ethdev/rte_flow.h:906:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
906 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:907:36:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
907 | .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1009:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1009 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1012:25:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1012 | "\xff\xff\xff\xff\xff\xff\xff\xff"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/ethdev/rte_flow.h:1135:20:
error: initializer-string for array of ‘unsigned char’ is too long
[-Werror=unterminated-string-initialization]
1135 | .hdr.vni = "\xff\xff\xff",
| ^~~~~~~~~~~~~~
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
lib/ethdev/rte_flow.h | 44 ++++++++++++++++++++-----------------------
1 file changed, 20 insertions(+), 24 deletions(-)
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 4cdc1f1d8f..027f46b8b0 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -883,8 +883,8 @@ struct rte_flow_item_eth {
/** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
#ifndef __cplusplus
static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
- .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
+ .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
.hdr.ether_type = RTE_BE16(0x0000),
};
#endif
@@ -985,12 +985,10 @@ struct rte_flow_item_ipv6 {
#ifndef __cplusplus
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
.hdr = {
- .src_addr =
- "\xff\xff\xff\xff\xff\xff\xff\xff"
- "\xff\xff\xff\xff\xff\xff\xff\xff",
- .dst_addr =
- "\xff\xff\xff\xff\xff\xff\xff\xff"
- "\xff\xff\xff\xff\xff\xff\xff\xff",
+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
},
};
#endif
@@ -1107,7 +1105,7 @@ struct rte_flow_item_vxlan {
/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */
#ifndef __cplusplus
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = {
- .hdr.vni = "\xff\xff\xff",
+ .hdr.vni = { 0xff, 0xff, 0xff },
};
#endif
@@ -1160,7 +1158,7 @@ struct rte_flow_item_nvgre {
/** Default mask for RTE_FLOW_ITEM_TYPE_NVGRE. */
#ifndef __cplusplus
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask = {
- .tni = "\xff\xff\xff",
+ .tni = { 0xff, 0xff, 0xff },
};
#endif
@@ -1180,7 +1178,7 @@ struct rte_flow_item_mpls {
/** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
#ifndef __cplusplus
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
- .label_tc_s = "\xff\xff\xf0",
+ .label_tc_s = { 0xff, 0xff, 0xf0 },
};
#endif
@@ -1324,7 +1322,7 @@ struct rte_flow_item_geneve {
/** Default mask for RTE_FLOW_ITEM_TYPE_GENEVE. */
#ifndef __cplusplus
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask = {
- .vni = "\xff\xff\xff",
+ .vni = { 0xff, 0xff, 0xff },
};
#endif
@@ -1353,7 +1351,7 @@ struct rte_flow_item_vxlan_gpe {
/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. */
#ifndef __cplusplus
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask = {
- .hdr.vni = "\xff\xff\xff",
+ .hdr.vni = { 0xff, 0xff, 0xff },
};
#endif
@@ -1387,9 +1385,9 @@ struct rte_flow_item_arp_eth_ipv4 {
#ifndef __cplusplus
static const struct rte_flow_item_arp_eth_ipv4
rte_flow_item_arp_eth_ipv4_mask = {
- .hdr.arp_data.arp_sha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ .hdr.arp_data.arp_sha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
.hdr.arp_data.arp_sip = RTE_BE32(UINT32_MAX),
- .hdr.arp_data.arp_tha.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ .hdr.arp_data.arp_tha.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
.hdr.arp_data.arp_tip = RTE_BE32(UINT32_MAX),
};
#endif
@@ -1476,9 +1474,8 @@ struct rte_flow_item_icmp6_nd_ns {
#ifndef __cplusplus
static const
struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask = {
- .target_addr =
- "\xff\xff\xff\xff\xff\xff\xff\xff"
- "\xff\xff\xff\xff\xff\xff\xff\xff",
+ .target_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
};
#endif
@@ -1503,9 +1500,8 @@ struct rte_flow_item_icmp6_nd_na {
#ifndef __cplusplus
static const
struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask = {
- .target_addr =
- "\xff\xff\xff\xff\xff\xff\xff\xff"
- "\xff\xff\xff\xff\xff\xff\xff\xff",
+ .target_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
};
#endif
@@ -1554,7 +1550,7 @@ struct rte_flow_item_icmp6_nd_opt_sla_eth {
#ifndef __cplusplus
static const struct rte_flow_item_icmp6_nd_opt_sla_eth
rte_flow_item_icmp6_nd_opt_sla_eth_mask = {
- .sla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ .sla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
};
#endif
@@ -1579,7 +1575,7 @@ struct rte_flow_item_icmp6_nd_opt_tla_eth {
#ifndef __cplusplus
static const struct rte_flow_item_icmp6_nd_opt_tla_eth
rte_flow_item_icmp6_nd_opt_tla_eth_mask = {
- .tla.addr_bytes = "\xff\xff\xff\xff\xff\xff",
+ .tla.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
};
#endif
@@ -2042,7 +2038,7 @@ struct rte_flow_item_ib_bth {
static const struct rte_flow_item_ib_bth rte_flow_item_ib_bth_mask = {
.hdr = {
.opcode = 0xff,
- .dst_qp = "\xff\xff\xff",
+ .dst_qp = { 0xff, 0xff, 0xff },
},
};
#endif
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:17.641830433 +0800
+++ 0001-ethdev-convert-string-initialization.patch 2025-06-26 19:59:17.150418054 +0800
@@ -1 +1 @@
-From e0d947a1e6c2f80aa039a4f7082a8aa16797d8b9 Mon Sep 17 00:00:00 2001
+From cf180e0602f78bf26fecef356f8359f4274fe61c Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e0d947a1e6c2f80aa039a4f7082a8aa16797d8b9 ]
@@ -63,717 +66,3 @@
- app/test-pmd/cmdline_flow.c | 31 ++++-----
- app/test/test_bpf.c | 2 +-
- app/test/test_pcapng.c | 2 +-
- app/test/test_security_inline_macsec.c | 4 +-
- doc/guides/prog_guide/ethdev/flow_offload.rst | 2 +-
- drivers/net/cxgbe/cxgbe_flow.c | 14 ++--
- drivers/net/dpaa2/dpaa2_flow.c | 14 ++--
- drivers/net/mlx4/mlx4_flow.c | 6 +-
- drivers/net/mlx5/mlx5_flow.c | 20 +++---
- drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++----
- drivers/net/mlx5/mlx5_flow_hw.c | 66 +++++++++----------
- drivers/net/mlx5/mlx5_trigger.c | 20 +++---
- drivers/net/nfp/flower/nfp_flower_flow.c | 14 ++--
- drivers/net/nfp/nfp_net_flow.c | 8 +--
- drivers/net/tap/tap_flow.c | 30 ++++-----
- examples/l2fwd-macsec/main.c | 4 +-
- lib/ethdev/rte_flow.h | 44 ++++++-------
- 17 files changed, 144 insertions(+), 163 deletions(-)
-
-diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
-index b7bcf18311..5451b3a453 100644
---- a/app/test-pmd/cmdline_flow.c
-+++ b/app/test-pmd/cmdline_flow.c
-@@ -898,20 +898,20 @@ struct vxlan_encap_conf vxlan_encap_conf = {
- .select_ipv4 = 1,
- .select_vlan = 0,
- .select_tos_ttl = 0,
-- .vni = "\x00\x00\x00",
-+ .vni = { 0x00, 0x00, 0x00 },
- .udp_src = 0,
- .udp_dst = RTE_BE16(RTE_VXLAN_DEFAULT_PORT),
- .ipv4_src = RTE_IPV4(127, 0, 0, 1),
- .ipv4_dst = RTE_IPV4(255, 255, 255, 255),
-- .ipv6_src = "\x00\x00\x00\x00\x00\x00\x00\x00"
-- "\x00\x00\x00\x00\x00\x00\x00\x01",
-- .ipv6_dst = "\x00\x00\x00\x00\x00\x00\x00\x00"
-- "\x00\x00\x00\x00\x00\x00\x11\x11",
-+ .ipv6_src = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-+ .ipv6_dst = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11 },
- .vlan_tci = 0,
- .ip_tos = 0,
- .ip_ttl = 255,
-- .eth_src = "\x00\x00\x00\x00\x00\x00",
-- .eth_dst = "\xff\xff\xff\xff\xff\xff",
-+ .eth_src = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .eth_dst = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- };
-
- /** Maximum number of items in struct rte_flow_action_vxlan_encap. */
-@@ -934,16 +934,16 @@ struct action_vxlan_encap_data {
- struct nvgre_encap_conf nvgre_encap_conf = {
- .select_ipv4 = 1,
- .select_vlan = 0,
-- .tni = "\x00\x00\x00",
-+ .tni = { 0x00, 0x00, 0x00 },
- .ipv4_src = RTE_IPV4(127, 0, 0, 1),
- .ipv4_dst = RTE_IPV4(255, 255, 255, 255),
-- .ipv6_src = "\x00\x00\x00\x00\x00\x00\x00\x00"
-- "\x00\x00\x00\x00\x00\x00\x00\x01",
-- .ipv6_dst = "\x00\x00\x00\x00\x00\x00\x00\x00"
-- "\x00\x00\x00\x00\x00\x00\x11\x11",
-+ .ipv6_src = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-+ .ipv6_dst = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11 },
- .vlan_tci = 0,
-- .eth_src = "\x00\x00\x00\x00\x00\x00",
-- .eth_dst = "\xff\xff\xff\xff\xff\xff",
-+ .eth_src = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .eth_dst = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- };
-
- /** Maximum number of items in struct rte_flow_action_nvgre_encap. */
-@@ -8304,7 +8304,8 @@ parse_prefix(struct context *ctx, const struct token *token,
- void *buf, unsigned int size)
- {
- const struct arg *arg = pop_args(ctx);
-- static const uint8_t conv[] = "\x00\x80\xc0\xe0\xf0\xf8\xfc\xfe\xff";
-+ static const uint8_t conv[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0,
-+ 0xf8, 0xfc, 0xfe, 0xff };
- char *end;
- uintmax_t u;
- unsigned int bytes;
-diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
-index 7819d6aba9..90e10d7d2c 100644
---- a/app/test/test_bpf.c
-+++ b/app/test/test_bpf.c
-@@ -3361,7 +3361,7 @@ test_bpf_filter_sanity(pcap_t *pcap)
-
- hdr = rte_pktmbuf_mtod(m, typeof(hdr));
- hdr->eth_hdr = (struct rte_ether_hdr) {
-- .dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4),
- };
- hdr->ip_hdr = (struct rte_ipv4_hdr) {
-diff --git a/app/test/test_pcapng.c b/app/test/test_pcapng.c
-index b219873c3a..8f2cff36c3 100644
---- a/app/test/test_pcapng.c
-+++ b/app/test/test_pcapng.c
-@@ -73,7 +73,7 @@ mbuf1_prepare(struct dummy_mbuf *dm, uint32_t plen)
- struct rte_udp_hdr udp;
- } pkt = {
- .eth = {
-- .dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4),
- },
- .ip = {
-diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c
-index f11e9da8c3..c921bf8ebb 100644
---- a/app/test/test_security_inline_macsec.c
-+++ b/app/test/test_security_inline_macsec.c
-@@ -318,8 +318,8 @@ create_default_flow(const struct mcs_test_vector *td, uint16_t portid,
- struct rte_flow *flow;
- struct rte_flow_item_eth eth = { .hdr.ether_type = 0, };
- static const struct rte_flow_item_eth eth_mask = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = RTE_BE16(0x0000),
- };
-
-diff --git a/doc/guides/prog_guide/ethdev/flow_offload.rst b/doc/guides/prog_guide/ethdev/flow_offload.rst
-index 906d6014f5..2d6187ed11 100644
---- a/doc/guides/prog_guide/ethdev/flow_offload.rst
-+++ b/doc/guides/prog_guide/ethdev/flow_offload.rst
-@@ -3865,7 +3865,7 @@ For example, to create a pattern template to match on the destination MAC:
-
- const struct rte_flow_pattern_template_attr attr = {.ingress = 1};
- struct rte_flow_item_eth eth_m = {
-- .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff";
-+ .dst.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
- };
- struct rte_flow_item pattern[] = {
- [0] = {.type = RTE_FLOW_ITEM_TYPE_ETH,
-diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
-index f5787c247f..40d21e6944 100644
---- a/drivers/net/cxgbe/cxgbe_flow.c
-+++ b/drivers/net/cxgbe/cxgbe_flow.c
-@@ -889,8 +889,8 @@ static struct chrte_fparse parseitem[] = {
- [RTE_FLOW_ITEM_TYPE_ETH] = {
- .fptr = ch_rte_parsetype_eth,
- .dmask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0xffff,
- }
- },
-@@ -918,12 +918,10 @@ static struct chrte_fparse parseitem[] = {
- .fptr = ch_rte_parsetype_ipv6,
- .dmask = &(const struct rte_flow_item_ipv6) {
- .hdr = {
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .vtc_flow = RTE_BE32(0xff000000),
- },
- },
-diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
-index 62e350d736..1b55d8dd17 100644
---- a/drivers/net/dpaa2/dpaa2_flow.c
-+++ b/drivers/net/dpaa2/dpaa2_flow.c
-@@ -100,8 +100,8 @@ enum rte_flow_action_type dpaa2_supported_fs_action_type[] = {
-
- #ifndef __cplusplus
- static const struct rte_flow_item_eth dpaa2_flow_item_eth_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .hdr.ether_type = RTE_BE16(0xffff),
- };
-
-@@ -117,12 +117,10 @@ static const struct rte_flow_item_ipv4 dpaa2_flow_item_ipv4_mask = {
-
- static const struct rte_flow_item_ipv6 dpaa2_flow_item_ipv6_mask = {
- .hdr = {
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .proto = 0xff
- },
- };
-diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
-index 8ef9fd2db4..b520664d95 100644
---- a/drivers/net/mlx4/mlx4_flow.c
-+++ b/drivers/net/mlx4/mlx4_flow.c
-@@ -582,7 +582,7 @@ static const struct mlx4_flow_proc_item mlx4_flow_proc_item_list[] = {
- RTE_FLOW_ITEM_TYPE_IPV4),
- .mask_support = &(const struct rte_flow_item_eth){
- /* Only destination MAC can be matched. */
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- .mask_default = &rte_flow_item_eth_mask,
- .mask_sz = sizeof(struct rte_flow_item_eth),
-@@ -1304,10 +1304,10 @@ mlx4_flow_internal(struct mlx4_priv *priv, struct rte_flow_error *error)
- };
- struct rte_flow_item_eth eth_spec;
- const struct rte_flow_item_eth eth_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- };
- const struct rte_flow_item_eth eth_allmulti = {
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
- };
- struct rte_flow_item_vlan vlan_spec;
- const struct rte_flow_item_vlan vlan_mask = {
-diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 72fb3a55ba..031db8176b 100644
---- a/drivers/net/mlx5/mlx5_flow.c
-+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2668,8 +2668,8 @@ mlx5_flow_validate_item_eth(const struct rte_eth_dev *dev,
- {
- const struct rte_flow_item_eth *mask = item->mask;
- const struct rte_flow_item_eth nic_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .hdr.ether_type = RTE_BE16(0xffff),
- .has_vlan = ext_vlan_sup ? 1 : 0,
- };
-@@ -2933,12 +2933,10 @@ mlx5_flow_validate_item_ipv6(const struct rte_eth_dev *dev,
- const struct rte_flow_item_ipv6 *spec = item->spec;
- const struct rte_flow_item_ipv6 nic_mask = {
- .hdr = {
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .vtc_flow = RTE_BE32(0xffffffff),
- .proto = 0xff,
- },
-@@ -3163,7 +3161,7 @@ mlx5_flow_validate_item_vxlan(struct rte_eth_dev *dev,
- uint8_t vni[4];
- } id = { .vlan_id = 0, };
- const struct rte_flow_item_vxlan nic_mask = {
-- .hdr.vni = "\xff\xff\xff",
-+ .hdr.vni = { 0xff, 0xff, 0xff },
- .hdr.rsvd1 = 0xff,
- };
- const struct rte_flow_item_vxlan *valid_mask;
-@@ -3249,7 +3247,7 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
- } id = { .vlan_id = 0, };
-
- struct rte_flow_item_vxlan_gpe nic_mask = {
-- .vni = "\xff\xff\xff",
-+ .vni = { 0xff, 0xff, 0xff },
- .protocol = 0xff,
- .flags = 0xff,
- };
-@@ -3563,7 +3561,7 @@ mlx5_flow_validate_item_geneve(const struct rte_flow_item *item,
- MLX5_GENEVE_OPT_LEN_1 : MLX5_GENEVE_OPT_LEN_0;
- const struct rte_flow_item_geneve nic_mask = {
- .ver_opt_len_o_c_rsvd0 = RTE_BE16(0x3f80),
-- .vni = "\xff\xff\xff",
-+ .vni = { 0xff, 0xff, 0xff },
- .protocol = RTE_BE16(UINT16_MAX),
- };
-
-diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 89057edbcf..8bcdb3f99e 100644
---- a/drivers/net/mlx5/mlx5_flow_dv.c
-+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -7697,12 +7697,10 @@ const struct rte_flow_item_ipv4 nic_ipv4_mask = {
-
- const struct rte_flow_item_ipv6 nic_ipv6_mask = {
- .hdr = {
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .vtc_flow = RTE_BE32(0xffffffff),
- .proto = 0xff,
- .hop_limits = 0xff,
-@@ -9291,8 +9289,8 @@ flow_dv_translate_item_eth(void *key, const struct rte_flow_item *item,
- const struct rte_flow_item_eth *eth_m;
- const struct rte_flow_item_eth *eth_v;
- const struct rte_flow_item_eth nic_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .hdr.ether_type = RTE_BE16(0xffff),
- .has_vlan = 0,
- };
-@@ -9549,12 +9547,10 @@ flow_dv_translate_item_ipv6(void *key, const struct rte_flow_item *item,
- const struct rte_flow_item_ipv6 *ipv6_v;
- const struct rte_flow_item_ipv6 nic_mask = {
- .hdr = {
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .vtc_flow = RTE_BE32(0xffffffff),
- .proto = 0xff,
- .hop_limits = 0xff,
-@@ -10064,7 +10060,7 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev,
- int i;
- struct mlx5_priv *priv = dev->data->dev_private;
- const struct rte_flow_item_vxlan nic_mask = {
-- .hdr.vni = "\xff\xff\xff",
-+ .hdr.vni = { 0xff, 0xff, 0xff },
- .hdr.rsvd1 = 0xff,
- };
-
-diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
-index d243b59b71..96be742b94 100644
---- a/drivers/net/mlx5/mlx5_flow_hw.c
-+++ b/drivers/net/mlx5/mlx5_flow_hw.c
-@@ -377,67 +377,67 @@ static uint32_t mlx5_hw_act_flag[MLX5_HW_ACTION_FLAG_MAX]
-
- /* Ethernet item spec for promiscuous mode. */
- static const struct rte_flow_item_eth ctrl_rx_eth_promisc_spec = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- /* Ethernet item mask for promiscuous mode. */
- static const struct rte_flow_item_eth ctrl_rx_eth_promisc_mask = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
- /* Ethernet item spec for all multicast mode. */
- static const struct rte_flow_item_eth ctrl_rx_eth_mcast_spec = {
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- /* Ethernet item mask for all multicast mode. */
- static const struct rte_flow_item_eth ctrl_rx_eth_mcast_mask = {
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
- /* Ethernet item spec for IPv4 multicast traffic. */
- static const struct rte_flow_item_eth ctrl_rx_eth_ipv4_mcast_spec = {
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x5e\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x5e, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- /* Ethernet item mask for IPv4 multicast traffic. */
- static const struct rte_flow_item_eth ctrl_rx_eth_ipv4_mcast_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
- /* Ethernet item spec for IPv6 multicast traffic. */
- static const struct rte_flow_item_eth ctrl_rx_eth_ipv6_mcast_spec = {
-- .hdr.dst_addr.addr_bytes = "\x33\x33\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x33, 0x33, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- /* Ethernet item mask for IPv6 multicast traffic. */
- static const struct rte_flow_item_eth ctrl_rx_eth_ipv6_mcast_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
- /* Ethernet item mask for unicast traffic. */
- static const struct rte_flow_item_eth ctrl_rx_eth_dmac_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
- /* Ethernet item spec for broadcast. */
- static const struct rte_flow_item_eth ctrl_rx_eth_bcast_spec = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
-@@ -8250,12 +8250,10 @@ const struct rte_flow_item_ipv6 hws_nic_ipv6_mask = {
- .payload_len = RTE_BE16(0xffff),
- .proto = 0xff,
- .hop_limits = 0xff,
-- .src_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr =
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- .has_frag_ext = 1,
- };
-@@ -9936,8 +9934,8 @@ flow_hw_create_tx_default_mreg_copy_pattern_template(struct rte_eth_dev *dev,
- .egress = 1,
- };
- struct rte_flow_item_eth promisc = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- struct rte_flow_item eth_all[] = {
-@@ -9974,8 +9972,8 @@ flow_hw_create_lacp_rx_pattern_template(struct rte_eth_dev *dev, struct rte_flow
- .ingress = 1,
- };
- struct rte_flow_item_eth lacp_mask = {
-- .dst.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .src.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .dst.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .src.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .type = 0xFFFF,
- };
- struct rte_flow_item eth_all[] = {
-@@ -15476,8 +15474,8 @@ mlx5_flow_hw_create_tx_default_mreg_copy_flow(struct rte_eth_dev *dev)
- {
- struct mlx5_priv *priv = dev->data->dev_private;
- struct rte_flow_item_eth promisc = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
- struct rte_flow_item eth_all[] = {
-@@ -15815,7 +15813,7 @@ __flow_hw_ctrl_flows_unicast(struct rte_eth_dev *dev,
- .type = MLX5_HW_CTRL_FLOW_TYPE_DEFAULT_RX_RSS,
- };
- const struct rte_ether_addr cmp = {
-- .addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- };
- unsigned int i;
-
-@@ -15861,7 +15859,7 @@ __flow_hw_ctrl_flows_unicast_vlan(struct rte_eth_dev *dev,
- .type = MLX5_HW_CTRL_FLOW_TYPE_DEFAULT_RX_RSS,
- };
- const struct rte_ether_addr cmp = {
-- .addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- };
- unsigned int i;
- unsigned int j;
-diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
-index a65a460731..7654f4d2ed 100644
---- a/drivers/net/mlx5/mlx5_trigger.c
-+++ b/drivers/net/mlx5/mlx5_trigger.c
-@@ -1568,23 +1568,23 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
- {
- struct mlx5_priv *priv = dev->data->dev_private;
- struct rte_flow_item_eth bcast = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- };
- struct rte_flow_item_eth ipv6_multi_spec = {
-- .hdr.dst_addr.addr_bytes = "\x33\x33\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x33, 0x33, 0x00, 0x00, 0x00, 0x00 },
- };
- struct rte_flow_item_eth ipv6_multi_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
- };
- struct rte_flow_item_eth unicast = {
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- };
- struct rte_flow_item_eth unicast_mask = {
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- };
- const unsigned int vlan_filter_n = priv->vlan_filter_n;
- const struct rte_ether_addr cmp = {
-- .addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- };
- unsigned int i;
- unsigned int j;
-@@ -1653,8 +1653,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
- return 0;
- if (dev->data->promiscuous) {
- struct rte_flow_item_eth promisc = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
-@@ -1664,8 +1664,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
- }
- if (dev->data->all_multicast) {
- struct rte_flow_item_eth multicast = {
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = 0,
- };
-
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index 3023e68ae8..e94c7e22e3 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -2504,8 +2504,8 @@ static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
- RTE_FLOW_ITEM_TYPE_IPV6),
- .mask_support = &(const struct rte_flow_item_eth) {
- .hdr = {
-- .dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .ether_type = RTE_BE16(0xffff),
- },
- .has_vlan = 1,
-@@ -2557,10 +2557,10 @@ static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
- .vtc_flow = RTE_BE32(0x0ff00000),
- .proto = 0xff,
- .hop_limits = 0xff,
-- .src_addr = "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr = "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- .has_frag_ext = 1,
- },
-@@ -2618,7 +2618,7 @@ static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
- [RTE_FLOW_ITEM_TYPE_GENEVE] = {
- .next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_ETH),
- .mask_support = &(const struct rte_flow_item_geneve) {
-- .vni = "\xff\xff\xff",
-+ .vni = { 0xff, 0xff, 0xff },
- },
- .mask_default = &rte_flow_item_geneve_mask,
- .mask_sz = sizeof(struct rte_flow_item_geneve),
-diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c
-index 5db4712193..e9f0ce3710 100644
---- a/drivers/net/nfp/nfp_net_flow.c
-+++ b/drivers/net/nfp/nfp_net_flow.c
-@@ -406,10 +406,10 @@ static const struct nfp_net_flow_item_proc nfp_net_flow_item_proc_list[] = {
- .mask_support = &(const struct rte_flow_item_ipv6){
- .hdr = {
- .proto = 0xff,
-- .src_addr = "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- .dst_addr = "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- },
- .mask_default = &rte_flow_item_ipv6_mask,
-diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
-index 0a90c0487b..5ae1faf916 100644
---- a/drivers/net/tap/tap_flow.c
-+++ b/drivers/net/tap/tap_flow.c
-@@ -166,8 +166,8 @@ static const struct tap_flow_items tap_flow_items[] = {
- RTE_FLOW_ITEM_TYPE_IPV4,
- RTE_FLOW_ITEM_TYPE_IPV6),
- .mask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-- .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .hdr.ether_type = -1,
- },
- .mask_sz = sizeof(struct rte_flow_item_eth),
-@@ -209,14 +209,10 @@ static const struct tap_flow_items tap_flow_items[] = {
- RTE_FLOW_ITEM_TYPE_TCP),
- .mask = &(const struct rte_flow_item_ipv6){
- .hdr = {
-- .src_addr = {
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- },
-- .dst_addr = {
-- "\xff\xff\xff\xff\xff\xff\xff\xff"
-- "\xff\xff\xff\xff\xff\xff\xff\xff",
-- },
-+ .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
-+ .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- .proto = -1,
- },
- },
-@@ -299,7 +295,7 @@ static struct remote_rule implicit_rte_flows[TAP_REMOTE_MAX_IDX] = {
- .items[0] = {
- .type = RTE_FLOW_ITEM_TYPE_ETH,
- .mask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- },
- .items[1] = {
-@@ -316,10 +312,10 @@ static struct remote_rule implicit_rte_flows[TAP_REMOTE_MAX_IDX] = {
- .items[0] = {
- .type = RTE_FLOW_ITEM_TYPE_ETH,
- .mask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- .spec = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff",
-+ .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
- },
- },
- .items[1] = {
-@@ -336,10 +332,10 @@ static struct remote_rule implicit_rte_flows[TAP_REMOTE_MAX_IDX] = {
- .items[0] = {
- .type = RTE_FLOW_ITEM_TYPE_ETH,
- .mask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\x33\x33\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x33, 0x33, 0x00, 0x00, 0x00, 0x00 },
- },
- .spec = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\x33\x33\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x33, 0x33, 0x00, 0x00, 0x00, 0x00 },
- },
- },
- .items[1] = {
-@@ -370,10 +366,10 @@ static struct remote_rule implicit_rte_flows[TAP_REMOTE_MAX_IDX] = {
- .items[0] = {
- .type = RTE_FLOW_ITEM_TYPE_ETH,
- .mask = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
- },
- .spec = &(const struct rte_flow_item_eth){
-- .hdr.dst_addr.addr_bytes = "\x01\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
- },
- },
- .items[1] = {
-diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c
-index b262d3ba0b..73e32fc197 100644
---- a/examples/l2fwd-macsec/main.c
-+++ b/examples/l2fwd-macsec/main.c
-@@ -512,8 +512,8 @@ create_default_flow(uint16_t portid)
- struct rte_flow *flow;
- struct rte_flow_item_eth eth;
- static const struct rte_flow_item_eth eth_mask = {
-- .hdr.dst_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-- .hdr.src_addr.addr_bytes = "\x00\x00\x00\x00\x00\x00",
-+ .hdr.dst_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-+ .hdr.src_addr.addr_bytes = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
- .hdr.ether_type = RTE_BE16(0xFFFF),
- };
- int ret;
+ lib/ethdev/rte_flow.h | 44 ++++++++++++++++++++-----------------------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
@@ -781 +70 @@
-index a2929438bf..22c5c147d0 100644
+index 4cdc1f1d8f..027f46b8b0 100644
@@ -784 +73 @@
-@@ -903,8 +903,8 @@ struct rte_flow_item_eth {
+@@ -883,8 +883,8 @@ struct rte_flow_item_eth {
@@ -795 +84 @@
-@@ -1005,12 +1005,10 @@ struct rte_flow_item_ipv6 {
+@@ -985,12 +985,10 @@ struct rte_flow_item_ipv6 {
@@ -812 +101 @@
-@@ -1132,7 +1130,7 @@ struct rte_flow_item_vxlan {
+@@ -1107,7 +1105,7 @@ struct rte_flow_item_vxlan {
@@ -821 +110 @@
-@@ -1185,7 +1183,7 @@ struct rte_flow_item_nvgre {
+@@ -1160,7 +1158,7 @@ struct rte_flow_item_nvgre {
@@ -830 +119 @@
-@@ -1205,7 +1203,7 @@ struct rte_flow_item_mpls {
+@@ -1180,7 +1178,7 @@ struct rte_flow_item_mpls {
@@ -839 +128 @@
-@@ -1349,7 +1347,7 @@ struct rte_flow_item_geneve {
+@@ -1324,7 +1322,7 @@ struct rte_flow_item_geneve {
@@ -848,2 +137,2 @@
-@@ -1386,7 +1384,7 @@ struct rte_flow_item_vxlan_gpe {
- */
+@@ -1353,7 +1351,7 @@ struct rte_flow_item_vxlan_gpe {
+ /** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. */
@@ -857 +146 @@
-@@ -1420,9 +1418,9 @@ struct rte_flow_item_arp_eth_ipv4 {
+@@ -1387,9 +1385,9 @@ struct rte_flow_item_arp_eth_ipv4 {
@@ -869 +158 @@
-@@ -1509,9 +1507,8 @@ struct rte_flow_item_icmp6_nd_ns {
+@@ -1476,9 +1474,8 @@ struct rte_flow_item_icmp6_nd_ns {
@@ -881 +170 @@
-@@ -1536,9 +1533,8 @@ struct rte_flow_item_icmp6_nd_na {
+@@ -1503,9 +1500,8 @@ struct rte_flow_item_icmp6_nd_na {
@@ -893 +182 @@
-@@ -1587,7 +1583,7 @@ struct rte_flow_item_icmp6_nd_opt_sla_eth {
+@@ -1554,7 +1550,7 @@ struct rte_flow_item_icmp6_nd_opt_sla_eth {
@@ -902 +191 @@
-@@ -1612,7 +1608,7 @@ struct rte_flow_item_icmp6_nd_opt_tla_eth {
+@@ -1579,7 +1575,7 @@ struct rte_flow_item_icmp6_nd_opt_tla_eth {
@@ -911 +200 @@
-@@ -2075,7 +2071,7 @@ struct rte_flow_item_ib_bth {
+@@ -2042,7 +2038,7 @@ struct rte_flow_item_ib_bth {
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/fm10k/base: fix compilation warnings' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
2025-06-26 12:00 ` patch 'ethdev: convert string initialization' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe/base: correct definition of endianness macro' " Xueming Li
` (82 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b632b29cb86c7f74f2d6114f552d7240b6d25009
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b632b29cb86c7f74f2d6114f552d7240b6d25009 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:13 +0000
Subject: [PATCH] net/fm10k/base: fix compilation warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 48fc5188aa753824a4bd469f9c482e845404c963 ]
The fixes required to re-enable warnings in the fm10k base code are
trivial, so let's make the changes and get a clean compile without any
warning disable flags.
* provide definitions for the UNREFERENCED_PARAMETER macros
* fix the spelling of the work "fallthrough" in comments
* provide a definition of FM10K_READ_PCI_WORD in os_dep.h that marks the
parameters as used.
Fixes: 7223d200c227 ("fm10k: add base driver")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/fm10k/base/fm10k_mbx.c | 2 +-
drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
drivers/net/fm10k/base/fm10k_pf.c | 8 ++++----
drivers/net/fm10k/base/fm10k_type.h | 6 +++---
drivers/net/fm10k/base/meson.build | 14 +-------------
5 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c
index 2bb0d82efe..9028403757 100644
--- a/drivers/net/fm10k/base/fm10k_mbx.c
+++ b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -1602,7 +1602,7 @@ s32 fm10k_pfvf_mbx_init(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx,
mbx->mbmem_reg = FM10K_MBMEM_VF(id, 0);
break;
}
- /* fallthough */
+ /* fallthrough */
default:
return FM10K_MBX_ERR_NO_MBX;
}
diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
index 019fba5e25..977aa07c4b 100644
--- a/drivers/net/fm10k/base/fm10k_osdep.h
+++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -67,7 +67,7 @@ typedef uint64_t u64;
#define FM10K_PCI_REG_WRITE(reg, value) rte_write32((value), (reg))
/* not implemented */
-#define FM10K_READ_PCI_WORD(hw, reg) 0
+#define FM10K_READ_PCI_WORD(hw, reg) ((void)hw, (void)reg, 0)
#define FM10K_WRITE_MBX(hw, reg, value) FM10K_WRITE_REG(hw, reg, value)
#define FM10K_READ_MBX(hw, reg) FM10K_READ_REG(hw, reg)
diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c
index 439dd224de..b54116a4b5 100644
--- a/drivers/net/fm10k/base/fm10k_pf.c
+++ b/drivers/net/fm10k/base/fm10k_pf.c
@@ -1362,19 +1362,19 @@ STATIC u8 fm10k_iov_supported_xcast_mode_pf(struct fm10k_vf_info *vf_info,
case FM10K_XCAST_MODE_PROMISC:
if (vf_flags & FM10K_VF_FLAG_PROMISC_CAPABLE)
return FM10K_XCAST_MODE_PROMISC;
- /* fallthough */
+ /* fallthrough */
case FM10K_XCAST_MODE_ALLMULTI:
if (vf_flags & FM10K_VF_FLAG_ALLMULTI_CAPABLE)
return FM10K_XCAST_MODE_ALLMULTI;
- /* fallthough */
+ /* fallthrough */
case FM10K_XCAST_MODE_MULTI:
if (vf_flags & FM10K_VF_FLAG_MULTI_CAPABLE)
return FM10K_XCAST_MODE_MULTI;
- /* fallthough */
+ /* fallthrough */
case FM10K_XCAST_MODE_NONE:
if (vf_flags & FM10K_VF_FLAG_NONE_CAPABLE)
return FM10K_XCAST_MODE_NONE;
- /* fallthough */
+ /* fallthrough */
default:
break;
}
diff --git a/drivers/net/fm10k/base/fm10k_type.h b/drivers/net/fm10k/base/fm10k_type.h
index 84781ba9b2..437fb1c55e 100644
--- a/drivers/net/fm10k/base/fm10k_type.h
+++ b/drivers/net/fm10k/base/fm10k_type.h
@@ -83,9 +83,9 @@ struct fm10k_hw;
#define FM10K_NOT_IMPLEMENTED 0x7FFFFFFF
#define UNREFERENCED_XPARAMETER
-#define UNREFERENCED_1PARAMETER(_p) (_p)
-#define UNREFERENCED_2PARAMETER(_p, _q) do { (_p); (_q); } while (0)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r) do { (_p); (_q); (_r); } while (0)
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q) do { (void)(_p); (void)(_q); } while (0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) do { (void)(_p); (void)(_q); (void)(_r); } while (0)
/* Start of PF registers */
#define FM10K_CTRL 0x0000
diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build
index bd19df27f7..a2640d1ee8 100644
--- a/drivers/net/fm10k/base/meson.build
+++ b/drivers/net/fm10k/base/meson.build
@@ -10,19 +10,7 @@ sources = [
'fm10k_vf.c',
]
-error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value',
- '-Wno-strict-aliasing', '-Wno-format-extra-args',
- '-Wno-unused-variable',
- '-Wno-implicit-fallthrough'
-]
-c_args = cflags
-foreach flag: error_cflags
- if cc.has_argument(flag)
- c_args += flag
- endif
-endforeach
-
base_lib = static_library('fm10k_base', sources,
dependencies: static_rte_eal,
- c_args: c_args)
+ c_args: cflags)
base_objs = base_lib.extract_all_objects(recursive: true)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:17.832462125 +0800
+++ 0002-net-fm10k-base-fix-compilation-warnings.patch 2025-06-26 19:59:17.154418054 +0800
@@ -1 +1 @@
-From 48fc5188aa753824a4bd469f9c482e845404c963 Mon Sep 17 00:00:00 2001
+From b632b29cb86c7f74f2d6114f552d7240b6d25009 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 48fc5188aa753824a4bd469f9c482e845404c963 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21,5 +23,5 @@
- drivers/net/intel/fm10k/base/fm10k_mbx.c | 2 +-
- drivers/net/intel/fm10k/base/fm10k_osdep.h | 2 +-
- drivers/net/intel/fm10k/base/fm10k_pf.c | 8 ++++----
- drivers/net/intel/fm10k/base/fm10k_type.h | 6 +++---
- drivers/net/intel/fm10k/base/meson.build | 14 +-------------
+ drivers/net/fm10k/base/fm10k_mbx.c | 2 +-
+ drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
+ drivers/net/fm10k/base/fm10k_pf.c | 8 ++++----
+ drivers/net/fm10k/base/fm10k_type.h | 6 +++---
+ drivers/net/fm10k/base/meson.build | 14 +-------------
@@ -28 +30 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_mbx.c b/drivers/net/intel/fm10k/base/fm10k_mbx.c
+diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -30,2 +32,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_mbx.c
-+++ b/drivers/net/intel/fm10k/base/fm10k_mbx.c
+--- a/drivers/net/fm10k/base/fm10k_mbx.c
++++ b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -41,4 +43,4 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_osdep.h b/drivers/net/intel/fm10k/base/fm10k_osdep.h
-index a727a57481..5f8ff10474 100644
---- a/drivers/net/intel/fm10k/base/fm10k_osdep.h
-+++ b/drivers/net/intel/fm10k/base/fm10k_osdep.h
+diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
+index 019fba5e25..977aa07c4b 100644
+--- a/drivers/net/fm10k/base/fm10k_osdep.h
++++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -54 +56 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_pf.c b/drivers/net/intel/fm10k/base/fm10k_pf.c
+diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c
@@ -56,2 +58,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_pf.c
-+++ b/drivers/net/intel/fm10k/base/fm10k_pf.c
+--- a/drivers/net/fm10k/base/fm10k_pf.c
++++ b/drivers/net/fm10k/base/fm10k_pf.c
@@ -82 +84 @@
-diff --git a/drivers/net/intel/fm10k/base/fm10k_type.h b/drivers/net/intel/fm10k/base/fm10k_type.h
+diff --git a/drivers/net/fm10k/base/fm10k_type.h b/drivers/net/fm10k/base/fm10k_type.h
@@ -84,2 +86,2 @@
---- a/drivers/net/intel/fm10k/base/fm10k_type.h
-+++ b/drivers/net/intel/fm10k/base/fm10k_type.h
+--- a/drivers/net/fm10k/base/fm10k_type.h
++++ b/drivers/net/fm10k/base/fm10k_type.h
@@ -99,4 +101,4 @@
-diff --git a/drivers/net/intel/fm10k/base/meson.build b/drivers/net/intel/fm10k/base/meson.build
-index f24e453fd0..a2640d1ee8 100644
---- a/drivers/net/intel/fm10k/base/meson.build
-+++ b/drivers/net/intel/fm10k/base/meson.build
+diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build
+index bd19df27f7..a2640d1ee8 100644
+--- a/drivers/net/fm10k/base/meson.build
++++ b/drivers/net/fm10k/base/meson.build
@@ -107,4 +109,4 @@
--error_cflags = [
-- '-Wno-unused-parameter',
-- '-Wno-unused-value',
-- '-Wno-implicit-fallthrough',
+-error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value',
+- '-Wno-strict-aliasing', '-Wno-format-extra-args',
+- '-Wno-unused-variable',
+- '-Wno-implicit-fallthrough'
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ixgbe/base: correct definition of endianness macro' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
2025-06-26 12:00 ` patch 'ethdev: convert string initialization' " Xueming Li
2025-06-26 12:00 ` patch 'net/fm10k/base: fix compilation warnings' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe/base: fix compilation warnings' " Xueming Li
` (81 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4179a77be427b0ac17ce3485d2c59d49f7b93862
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 4179a77be427b0ac17ce3485d2c59d49f7b93862 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:15 +0000
Subject: [PATCH] net/ixgbe/base: correct definition of endianness macro
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3e7ea9ad5162876583e72de6061752810bdde0fe ]
The definition of IXGBE_LE32_TO_CPUS macro is meant to modify the value
in place - similar to the le32_to_cpus() macro in kernel. Fixing the
definition allows us to remove some warning flags, and removes the need
for the uintptr_t typecasts.
Fixes: aa4fc14d2cee ("ixgbe: update base driver")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
drivers/net/ixgbe/base/meson.build | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index aa843bd5c4..8c2c69e58f 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4586,7 +4586,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
/* first pull in the header so we know the buffer length */
for (bi = 0; bi < dword_len; bi++) {
buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
- IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
+ IXGBE_LE32_TO_CPUS(&buffer[bi]);
}
/*
@@ -4622,7 +4622,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
/* Pull in the rest of the buffer (bi is where we left off) */
for (; bi <= dword_len; bi++) {
buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
- IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
+ IXGBE_LE32_TO_CPUS(&buffer[bi]);
}
rel_out:
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index 6c25f608b1..72d45e2792 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -80,7 +80,7 @@ enum {
#define IXGBE_CPU_TO_LE16(_i) rte_cpu_to_le_16(_i)
#define IXGBE_CPU_TO_LE32(_i) rte_cpu_to_le_32(_i)
#define IXGBE_LE32_TO_CPU(_i) rte_le_to_cpu_32(_i)
-#define IXGBE_LE32_TO_CPUS(_i) rte_le_to_cpu_32(_i)
+#define IXGBE_LE32_TO_CPUS(_i) do { *_i = rte_le_to_cpu_32(*_i); } while(0)
#define IXGBE_CPU_TO_BE16(_i) rte_cpu_to_be_16(_i)
#define IXGBE_CPU_TO_BE32(_i) rte_cpu_to_be_32(_i)
#define IXGBE_BE32_TO_CPU(_i) rte_be_to_cpu_32(_i)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index f6497014da..ab775d8c66 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -17,7 +17,7 @@ sources = [
'ixgbe_x550.c',
]
-error_cflags = ['-Wno-unused-value',
+error_cflags = [
'-Wno-unused-but-set-variable',
'-Wno-unused-parameter',
]
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:17.875306624 +0800
+++ 0003-net-ixgbe-base-correct-definition-of-endianness-macr.patch 2025-06-26 19:59:17.158418053 +0800
@@ -1 +1 @@
-From 3e7ea9ad5162876583e72de6061752810bdde0fe Mon Sep 17 00:00:00 2001
+From 4179a77be427b0ac17ce3485d2c59d49f7b93862 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3e7ea9ad5162876583e72de6061752810bdde0fe ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +19,3 @@
- drivers/net/intel/ixgbe/base/ixgbe_common.c | 4 ++--
- drivers/net/intel/ixgbe/base/ixgbe_osdep.h | 2 +-
- drivers/net/intel/ixgbe/base/meson.build | 2 +-
+ drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--
+ drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
+ drivers/net/ixgbe/base/meson.build | 2 +-
@@ -22,5 +24,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_common.c b/drivers/net/intel/ixgbe/base/ixgbe_common.c
-index d6425c5b78..fbc9605e4d 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_common.c
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_common.c
-@@ -4610,7 +4610,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
+diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
+index aa843bd5c4..8c2c69e58f 100644
+--- a/drivers/net/ixgbe/base/ixgbe_common.c
++++ b/drivers/net/ixgbe/base/ixgbe_common.c
+@@ -4586,7 +4586,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
@@ -35 +37 @@
-@@ -4646,7 +4646,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
+@@ -4622,7 +4622,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
@@ -44,6 +46,7 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-index cffc6a4ce8..6e5f7b4ae8 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-@@ -83,7 +83,7 @@ enum {
- #define IXGBE_LE16_TO_CPU(_i) rte_le_to_cpu_16(_i)
+diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
+index 6c25f608b1..72d45e2792 100644
+--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
++++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
+@@ -80,7 +80,7 @@ enum {
+ #define IXGBE_CPU_TO_LE16(_i) rte_cpu_to_le_16(_i)
+ #define IXGBE_CPU_TO_LE32(_i) rte_cpu_to_le_32(_i)
@@ -51 +53,0 @@
- #define IXGBE_LE64_TO_CPU(_i) rte_le_to_cpu_64(_i)
@@ -57,5 +59,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/meson.build b/drivers/net/intel/ixgbe/base/meson.build
-index 7e4fbdfa0f..f8b2ee6341 100644
---- a/drivers/net/intel/ixgbe/base/meson.build
-+++ b/drivers/net/intel/ixgbe/base/meson.build
-@@ -19,7 +19,7 @@ sources = [
+diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
+index f6497014da..ab775d8c66 100644
+--- a/drivers/net/ixgbe/base/meson.build
++++ b/drivers/net/ixgbe/base/meson.build
+@@ -17,7 +17,7 @@ sources = [
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ixgbe/base: fix compilation warnings' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (2 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/ixgbe/base: correct definition of endianness macro' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/i40e/base: fix unused value " Xueming Li
` (80 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=81f196974f65a4f4ed67c362c8aee19bf8342dd3
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 81f196974f65a4f4ed67c362c8aee19bf8342dd3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:16 +0000
Subject: [PATCH] net/ixgbe/base: fix compilation warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ca361b5ab1ba8ec9191b8376a8be0e3935823596 ]
We can remove almost all of the "unused parameter" and "unused variable"
warnings by just improving the macro definitions in the osdep.h header.
Remaining two instances can be fixed by just one-line additions to the
code, so add those to give us a clean build with the warnings enabled.
Fixes: af75078fece3 ("first public release")
Fixes: c6cb313da739 ("net/ixgbe/base: add link management for E610")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
drivers/net/ixgbe/base/meson.build | 11 -----------
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index 72d45e2792..d8640dc7e6 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -56,13 +56,16 @@
/* Bunch of defines for shared code bogosity */
#ifndef UNREFERENCED_PARAMETER
-#define UNREFERENCED_PARAMETER(_p)
+#define UNREFERENCED_PARAMETER(_p) (void)(_p)
#endif
-#define UNREFERENCED_1PARAMETER(_p)
-#define UNREFERENCED_2PARAMETER(_p, _q)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r)
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
-#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t)
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q) do { (void)(_p); (void)(_q); } while(0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) \
+ do { (void)(_p); (void)(_q); (void)(_r); } while(0)
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) \
+ do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); } while(0)
+#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) \
+ do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); (void)(_t); } while(0)
/* Shared code error reporting */
enum {
@@ -127,8 +130,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
IXGBE_PCI_REG_ADDR((hw), (reg) + ((index) << 2))
/* Not implemented !! */
-#define IXGBE_READ_PCIE_WORD(hw, reg) 0
-#define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { } while(0)
+#define IXGBE_READ_PCIE_WORD(hw, reg) ((void)hw, (void)(reg), 0)
+#define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { (void)hw; (void)reg; (void)value; } while(0)
#define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index ab775d8c66..b3cd74e805 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -17,17 +17,6 @@ sources = [
'ixgbe_x550.c',
]
-error_cflags = [
- '-Wno-unused-but-set-variable',
- '-Wno-unused-parameter',
- ]
-c_args = cflags
-foreach flag: error_cflags
- if cc.has_argument(flag)
- c_args += flag
- endif
-endforeach
-
base_lib = static_library('ixgbe_base', sources,
dependencies: [static_rte_eal, static_rte_net],
c_args: c_args)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:17.916502122 +0800
+++ 0004-net-ixgbe-base-fix-compilation-warnings.patch 2025-06-26 19:59:17.162418053 +0800
@@ -1 +1 @@
-From ca361b5ab1ba8ec9191b8376a8be0e3935823596 Mon Sep 17 00:00:00 2001
+From 81f196974f65a4f4ed67c362c8aee19bf8342dd3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ca361b5ab1ba8ec9191b8376a8be0e3935823596 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18,4 +20,3 @@
- drivers/net/intel/ixgbe/base/ixgbe_e610.c | 2 ++
- drivers/net/intel/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
- drivers/net/intel/ixgbe/base/meson.build | 11 -----------
- 3 files changed, 13 insertions(+), 19 deletions(-)
+ drivers/net/ixgbe/base/ixgbe_osdep.h | 19 +++++++++++--------
+ drivers/net/ixgbe/base/meson.build | 11 -----------
+ 2 files changed, 11 insertions(+), 19 deletions(-)
@@ -23,25 +24,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_e610.c b/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-index 5474c3012a..7420c78d07 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_e610.c
-@@ -1054,6 +1054,7 @@ static void ixgbe_parse_vsi_func_caps(struct ixgbe_hw *hw,
- struct ixgbe_hw_func_caps *func_p,
- struct ixgbe_aci_cmd_list_caps_elem *cap)
- {
-+ UNREFERENCED_PARAMETER(cap);
- func_p->guar_num_vsi = ixgbe_get_num_per_func(hw, IXGBE_MAX_VSI);
- }
-
-@@ -1770,6 +1771,7 @@ s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask)
- struct ixgbe_aci_cmd_set_event_mask *cmd;
- struct ixgbe_aci_desc desc;
-
-+ UNREFERENCED_PARAMETER(port_num);
- cmd = &desc.params.set_event_mask;
-
- ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_event_mask);
-diff --git a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-index 6e5f7b4ae8..398c38bffd 100644
---- a/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-+++ b/drivers/net/intel/ixgbe/base/ixgbe_osdep.h
-@@ -57,13 +57,16 @@
+diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
+index 72d45e2792..d8640dc7e6 100644
+--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
++++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
+@@ -56,13 +56,16 @@
@@ -70 +51 @@
-@@ -130,8 +133,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
+@@ -127,8 +130,8 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
@@ -81,5 +62,5 @@
-diff --git a/drivers/net/intel/ixgbe/base/meson.build b/drivers/net/intel/ixgbe/base/meson.build
-index f8b2ee6341..64e0bfd7be 100644
---- a/drivers/net/intel/ixgbe/base/meson.build
-+++ b/drivers/net/intel/ixgbe/base/meson.build
-@@ -19,17 +19,6 @@ sources = [
+diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
+index ab775d8c66..b3cd74e805 100644
+--- a/drivers/net/ixgbe/base/meson.build
++++ b/drivers/net/ixgbe/base/meson.build
+@@ -17,17 +17,6 @@ sources = [
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/i40e/base: fix unused value warnings' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (3 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/ixgbe/base: fix compilation warnings' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/i40e/base: fix compiler " Xueming Li
` (79 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5cec3d059d3432488dbcb7cb2fbe379984a2b007
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5cec3d059d3432488dbcb7cb2fbe379984a2b007 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:18 +0000
Subject: [PATCH] net/i40e/base: fix unused value warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3c2125852742d46accc3f35f4fa683768ba25e09 ]
Fix warnings about unused values - parameters, variables, etc., and
remove the warning disable flags for them. Although modifying the
base-code files is not ideal, the changes required are minor, and only
affect two files from the imported base code.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 5 -----
drivers/net/i40e/base/i40e_nvm.c | 1 +
drivers/net/i40e/base/i40e_osdep.h | 4 ++--
drivers/net/i40e/base/i40e_type.h | 14 +++++++++-----
drivers/net/i40e/base/meson.build | 8 +++-----
drivers/net/i40e/i40e_ethdev.c | 1 +
6 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 547f5e3c2c..a7421c965f 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -5628,7 +5628,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
struct i40e_filter_control_settings *settings)
{
u32 fcoe_cntx_size, fcoe_filt_size;
- u32 pe_cntx_size, pe_filt_size;
u32 fcoe_fmax;
u32 val;
@@ -5673,8 +5672,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
case I40E_HASH_FILTER_SIZE_256K:
case I40E_HASH_FILTER_SIZE_512K:
case I40E_HASH_FILTER_SIZE_1M:
- pe_filt_size = I40E_HASH_FILTER_BASE_SIZE;
- pe_filt_size <<= (u32)settings->pe_filt_num;
break;
default:
return I40E_ERR_PARAM;
@@ -5691,8 +5688,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
case I40E_DMA_CNTX_SIZE_64K:
case I40E_DMA_CNTX_SIZE_128K:
case I40E_DMA_CNTX_SIZE_256K:
- pe_cntx_size = I40E_DMA_CNTX_BASE_SIZE;
- pe_cntx_size <<= (u32)settings->pe_cntx_num;
break;
default:
return I40E_ERR_PARAM;
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 05816a4b79..53bbaa1a12 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1653,6 +1653,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
u32 aq_total_len;
u32 aq_desc_len;
+ UNREFERENCED_1PARAMETER(perrno);
i40e_debug(hw, I40E_DEBUG_NVM, "NVMUPD: %s\n", __func__);
aq_desc_len = sizeof(struct i40e_aq_desc);
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index aa5dc61841..1e32ef695a 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -184,8 +184,8 @@ struct i40e_dma_mem {
const void *zone;
} __rte_packed;
-#define i40e_allocate_dma_mem(h, m, unused, s, a) \
- i40e_allocate_dma_mem_d(h, m, s, a)
+#define i40e_allocate_dma_mem(h, m, mt, s, a) \
+ i40e_allocate_dma_mem_d(h, m, mt, s, a)
#define i40e_free_dma_mem(h, m) i40e_free_dma_mem_d(h, m)
struct i40e_virt_mem {
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index f4a3d66759..198d5f161f 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -14,11 +14,15 @@
#include "i40e_devids.h"
#define UNREFERENCED_XPARAMETER
-#define UNREFERENCED_1PARAMETER(_p) (_p);
-#define UNREFERENCED_2PARAMETER(_p, _q) (_p); (_q);
-#define UNREFERENCED_3PARAMETER(_p, _q, _r) (_p); (_q); (_r);
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) (_p); (_q); (_r); (_s);
-#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) (_p); (_q); (_r); (_s); (_t);
+#define UNREFERENCED_1PARAMETER(_p) (void)(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q) \
+ do { (void)(_p); (void)(_q); } while (0)
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) \
+ do { (void)(_p); (void)(_q); (void)(_r); } while (0)
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) \
+ do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); } while (0)
+#define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t) \
+ do { (void)(_p); (void)(_q); (void)(_r); (void)(_s); (void)(_t); } while (0)
#ifndef LINUX_MACROS
#ifndef BIT
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index d94108629b..2648e5d0c4 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -11,11 +11,9 @@ sources = [
'i40e_nvm.c',
]
-error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
- '-Wno-format', '-Wno-format-security',
- '-Wno-format-nonliteral',
- '-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
- '-Wno-unused-parameter',
+error_cflags = [
+ '-Wno-sign-compare',
+ '-Wno-strict-aliasing',
]
c_args = cflags
foreach flag: error_cflags
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b043cd693..4ab9d6905d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4547,6 +4547,7 @@ out:
enum i40e_status_code
i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
struct i40e_dma_mem *mem,
+ __rte_unused enum i40e_memory_type mtype,
u64 size,
u32 alignment)
{
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:17.964319720 +0800
+++ 0005-net-i40e-base-fix-unused-value-warnings.patch 2025-06-26 19:59:17.178418053 +0800
@@ -1 +1 @@
-From 3c2125852742d46accc3f35f4fa683768ba25e09 Mon Sep 17 00:00:00 2001
+From 5cec3d059d3432488dbcb7cb2fbe379984a2b007 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c2125852742d46accc3f35f4fa683768ba25e09 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,6 +19,7 @@
- drivers/net/intel/i40e/base/i40e_nvm.c | 1 +
- drivers/net/intel/i40e/base/i40e_osdep.h | 4 ++--
- drivers/net/intel/i40e/base/i40e_type.h | 14 +++++++++-----
- drivers/net/intel/i40e/base/meson.build | 3 ---
- drivers/net/intel/i40e/i40e_ethdev.c | 1 +
- 5 files changed, 13 insertions(+), 10 deletions(-)
+ drivers/net/i40e/base/i40e_common.c | 5 -----
+ drivers/net/i40e/base/i40e_nvm.c | 1 +
+ drivers/net/i40e/base/i40e_osdep.h | 4 ++--
+ drivers/net/i40e/base/i40e_type.h | 14 +++++++++-----
+ drivers/net/i40e/base/meson.build | 8 +++-----
+ drivers/net/i40e/i40e_ethdev.c | 1 +
+ 6 files changed, 16 insertions(+), 17 deletions(-)
@@ -24,5 +27,35 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_nvm.c b/drivers/net/intel/i40e/base/i40e_nvm.c
-index 3e16a0d997..00a207ca81 100644
---- a/drivers/net/intel/i40e/base/i40e_nvm.c
-+++ b/drivers/net/intel/i40e/base/i40e_nvm.c
-@@ -1748,6 +1748,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
+diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
+index 547f5e3c2c..a7421c965f 100644
+--- a/drivers/net/i40e/base/i40e_common.c
++++ b/drivers/net/i40e/base/i40e_common.c
+@@ -5628,7 +5628,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+ struct i40e_filter_control_settings *settings)
+ {
+ u32 fcoe_cntx_size, fcoe_filt_size;
+- u32 pe_cntx_size, pe_filt_size;
+ u32 fcoe_fmax;
+
+ u32 val;
+@@ -5673,8 +5672,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+ case I40E_HASH_FILTER_SIZE_256K:
+ case I40E_HASH_FILTER_SIZE_512K:
+ case I40E_HASH_FILTER_SIZE_1M:
+- pe_filt_size = I40E_HASH_FILTER_BASE_SIZE;
+- pe_filt_size <<= (u32)settings->pe_filt_num;
+ break;
+ default:
+ return I40E_ERR_PARAM;
+@@ -5691,8 +5688,6 @@ STATIC enum i40e_status_code i40e_validate_filter_settings(struct i40e_hw *hw,
+ case I40E_DMA_CNTX_SIZE_64K:
+ case I40E_DMA_CNTX_SIZE_128K:
+ case I40E_DMA_CNTX_SIZE_256K:
+- pe_cntx_size = I40E_DMA_CNTX_BASE_SIZE;
+- pe_cntx_size <<= (u32)settings->pe_cntx_num;
+ break;
+ default:
+ return I40E_ERR_PARAM;
+diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
+index 05816a4b79..53bbaa1a12 100644
+--- a/drivers/net/i40e/base/i40e_nvm.c
++++ b/drivers/net/i40e/base/i40e_nvm.c
+@@ -1653,6 +1653,7 @@ STATIC enum i40e_status_code i40e_nvmupd_get_aq_event(struct i40e_hw *hw,
@@ -36,5 +69,5 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_osdep.h b/drivers/net/intel/i40e/base/i40e_osdep.h
-index c04f94732a..197f4678bf 100644
---- a/drivers/net/intel/i40e/base/i40e_osdep.h
-+++ b/drivers/net/intel/i40e/base/i40e_osdep.h
-@@ -184,8 +184,8 @@ struct __rte_packed_begin i40e_dma_mem {
+diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
+index aa5dc61841..1e32ef695a 100644
+--- a/drivers/net/i40e/base/i40e_osdep.h
++++ b/drivers/net/i40e/base/i40e_osdep.h
+@@ -184,8 +184,8 @@ struct i40e_dma_mem {
@@ -42 +75 @@
- } __rte_packed_end;
+ } __rte_packed;
@@ -50,5 +83,5 @@
- struct __rte_packed_begin i40e_virt_mem {
-diff --git a/drivers/net/intel/i40e/base/i40e_type.h b/drivers/net/intel/i40e/base/i40e_type.h
-index 7cc746f82f..968e1982a6 100644
---- a/drivers/net/intel/i40e/base/i40e_type.h
-+++ b/drivers/net/intel/i40e/base/i40e_type.h
+ struct i40e_virt_mem {
+diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
+index f4a3d66759..198d5f161f 100644
+--- a/drivers/net/i40e/base/i40e_type.h
++++ b/drivers/net/i40e/base/i40e_type.h
@@ -74,13 +107,14 @@
- #define BIT(a) (1UL << (a))
- #define BIT_ULL(a) (1ULL << (a))
-diff --git a/drivers/net/intel/i40e/base/meson.build b/drivers/net/intel/i40e/base/meson.build
-index a0912b1788..2648e5d0c4 100644
---- a/drivers/net/intel/i40e/base/meson.build
-+++ b/drivers/net/intel/i40e/base/meson.build
-@@ -13,10 +13,7 @@ sources = [
-
- error_cflags = [
- '-Wno-sign-compare',
-- '-Wno-unused-value',
- '-Wno-strict-aliasing',
-- '-Wno-unused-but-set-variable',
+ #ifndef LINUX_MACROS
+ #ifndef BIT
+diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
+index d94108629b..2648e5d0c4 100644
+--- a/drivers/net/i40e/base/meson.build
++++ b/drivers/net/i40e/base/meson.build
+@@ -11,11 +11,9 @@ sources = [
+ 'i40e_nvm.c',
+ ]
+
+-error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
+- '-Wno-format', '-Wno-format-security',
+- '-Wno-format-nonliteral',
+- '-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
@@ -87,0 +122,3 @@
++error_cflags = [
++ '-Wno-sign-compare',
++ '-Wno-strict-aliasing',
@@ -91,5 +128,5 @@
-diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
-index 1c5ab35a8b..90eba3419f 100644
---- a/drivers/net/intel/i40e/i40e_ethdev.c
-+++ b/drivers/net/intel/i40e/i40e_ethdev.c
-@@ -4694,6 +4694,7 @@ out:
+diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
+index 2b043cd693..4ab9d6905d 100644
+--- a/drivers/net/i40e/i40e_ethdev.c
++++ b/drivers/net/i40e/i40e_ethdev.c
+@@ -4547,6 +4547,7 @@ out:
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/i40e/base: fix compiler warnings' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (4 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/i40e/base: fix unused value " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'acl: fix build with GCC 15 on aarch64' " Xueming Li
` (78 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d881245235e7995290cfc1b09f352a72d3ceead0
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d881245235e7995290cfc1b09f352a72d3ceead0 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 28 Mar 2025 11:16:19 +0000
Subject: [PATCH] net/i40e/base: fix compiler warnings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 ]
Add a single-line fix to the base code, and then the remaining two
compiler warning disable flags can be removed from the driver base code
build file.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/i40e/base/i40e_diag.c | 2 +-
drivers/net/i40e/base/meson.build | 13 +------------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
index 4ca102cdd5..71b2e53e85 100644
--- a/drivers/net/i40e/base/i40e_diag.c
+++ b/drivers/net/i40e/base/i40e_diag.c
@@ -34,7 +34,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw,
{
const u32 patterns[] = {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
u32 pat, val, orig_val;
- int i;
+ unsigned int i;
orig_val = rd32(hw, reg);
for (i = 0; i < ARRAY_SIZE(patterns); i++) {
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index 2648e5d0c4..766383101b 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -11,18 +11,7 @@ sources = [
'i40e_nvm.c',
]
-error_cflags = [
- '-Wno-sign-compare',
- '-Wno-strict-aliasing',
-]
-c_args = cflags
-foreach flag: error_cflags
- if cc.has_argument(flag)
- c_args += flag
- endif
-endforeach
-
base_lib = static_library('i40e_base', sources,
dependencies: static_rte_eal,
- c_args: c_args)
+ c_args: cflags)
base_objs = base_lib.extract_all_objects(recursive: true)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.007514618 +0800
+++ 0006-net-i40e-base-fix-compiler-warnings.patch 2025-06-26 19:59:17.182418052 +0800
@@ -1 +1 @@
-From e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 Mon Sep 17 00:00:00 2001
+From d881245235e7995290cfc1b09f352a72d3ceead0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e0a9cb8b940b539b68acc7d8221f9aeec0f20a82 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- drivers/net/intel/i40e/base/i40e_diag.c | 2 +-
- drivers/net/intel/i40e/base/meson.build | 13 +------------
+ drivers/net/i40e/base/i40e_diag.c | 2 +-
+ drivers/net/i40e/base/meson.build | 13 +------------
@@ -20 +22 @@
-diff --git a/drivers/net/intel/i40e/base/i40e_diag.c b/drivers/net/intel/i40e/base/i40e_diag.c
+diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
@@ -22,2 +24,2 @@
---- a/drivers/net/intel/i40e/base/i40e_diag.c
-+++ b/drivers/net/intel/i40e/base/i40e_diag.c
+--- a/drivers/net/i40e/base/i40e_diag.c
++++ b/drivers/net/i40e/base/i40e_diag.c
@@ -33 +35 @@
-diff --git a/drivers/net/intel/i40e/base/meson.build b/drivers/net/intel/i40e/base/meson.build
+diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
@@ -35,2 +37,2 @@
---- a/drivers/net/intel/i40e/base/meson.build
-+++ b/drivers/net/intel/i40e/base/meson.build
+--- a/drivers/net/i40e/base/meson.build
++++ b/drivers/net/i40e/base/meson.build
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'acl: fix build with GCC 15 on aarch64' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (5 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/i40e/base: fix compiler " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'eal/linux: improve ASLR check' " Xueming Li
` (77 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: David Marchand
Cc: Xueming Li, Konstantin Ananyev, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=794bc328016be580bce9bae57b4ffe12ef0e1a6f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 794bc328016be580bce9bae57b4ffe12ef0e1a6f Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Mar 2025 11:29:02 +0100
Subject: [PATCH] acl: fix build with GCC 15 on aarch64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 ]
Caught in OBS for Fedora Rawhide on aarch64:
[ 198s] In file included from ../lib/acl/acl_run_neon.h:7,
[ 198s] from ../lib/acl/acl_run_neon.c:5:
[ 198s] In function ‘alloc_completion’,
[ 198s] inlined from ‘acl_start_next_trie’ at
../lib/acl/acl_run.h:140:24,
[ 198s] inlined from ‘search_neon_4.isra’ at
../lib/acl/acl_run_neon.h:239:20:
[ 198s] ../lib/acl/acl_run.h:93:25: error: ‘cmplt’ may be used
uninitialized [-Werror=maybe-uninitialized]
[ 198s] 93 | if (p[n].count == 0) {
[ 198s] | ~~~~^~~~~~
[ 198s] ../lib/acl/acl_run_neon.h: In function ‘search_neon_4.isra’:
[ 198s] ../lib/acl/acl_run_neon.h:230:27: note: ‘cmplt’ declared here
[ 198s] 230 | struct completion cmplt[4];
[ 198s] | ^~~~~
The code was resetting sequentially cmpl[].count at the exact index that
later call to alloc_completion uses.
While this code seems correct, GCC 15 does not understand this (probably
when applying some optimisations).
Instead, reset cmpl[].count all at once in acl_set_flow, and cleanup the
various vectorized implementations accordingly.
Bugzilla ID: 1678
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/acl/acl_run.h | 5 +++++
lib/acl/acl_run_altivec.h | 8 ++------
lib/acl/acl_run_avx2.h | 4 +---
lib/acl/acl_run_neon.h | 8 ++------
lib/acl/acl_run_scalar.c | 4 +---
lib/acl/acl_run_sse.h | 8 ++------
6 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/lib/acl/acl_run.h b/lib/acl/acl_run.h
index 7d215de9d6..533f233f68 100644
--- a/lib/acl/acl_run.h
+++ b/lib/acl/acl_run.h
@@ -176,6 +176,8 @@ acl_set_flow(struct acl_flow_data *flows, struct completion *cmplt,
uint32_t cmplt_size, const uint8_t **data, uint32_t *results,
uint32_t data_num, uint32_t categories, const uint64_t *trans)
{
+ unsigned int i;
+
flows->num_packets = 0;
flows->started = 0;
flows->trie = 0;
@@ -187,6 +189,9 @@ acl_set_flow(struct acl_flow_data *flows, struct completion *cmplt,
flows->data = data;
flows->results = results;
flows->trans = trans;
+
+ for (i = 0; i < cmplt_size; i++)
+ cmplt[i].count = 0;
}
typedef void (*resolve_priority_t)
diff --git a/lib/acl/acl_run_altivec.h b/lib/acl/acl_run_altivec.h
index 3c30466d2d..c38727eab0 100644
--- a/lib/acl/acl_run_altivec.h
+++ b/lib/acl/acl_run_altivec.h
@@ -197,10 +197,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < MAX_SEARCHES_ALTIVEC8; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < MAX_SEARCHES_ALTIVEC8; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
/* Check for any matches. */
acl_match_check_x4(0, ctx, parms, &flows, (uint64_t *)&index_array[0]);
@@ -268,10 +266,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < MAX_SEARCHES_ALTIVEC4; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < MAX_SEARCHES_ALTIVEC4; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
/* Check for any matches. */
acl_match_check_x4(0, ctx, parms, &flows, index_array);
diff --git a/lib/acl/acl_run_avx2.h b/lib/acl/acl_run_avx2.h
index 0b8967f22e..e069fb85b2 100644
--- a/lib/acl/acl_run_avx2.h
+++ b/lib/acl/acl_run_avx2.h
@@ -171,10 +171,8 @@ search_avx2x16(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < RTE_DIM(cmplt); n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < RTE_DIM(cmplt); n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
t0 = _mm256_set_epi64x(index_array[5], index_array[4],
index_array[1], index_array[0]);
diff --git a/lib/acl/acl_run_neon.h b/lib/acl/acl_run_neon.h
index 69d1b6d9e1..e31d56e7d0 100644
--- a/lib/acl/acl_run_neon.h
+++ b/lib/acl/acl_run_neon.h
@@ -170,10 +170,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < 8; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < 8; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
/* Check for any matches. */
acl_match_check_x4(0, ctx, parms, &flows, &index_array[0]);
@@ -232,10 +230,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < 4; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < 4; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
/* Check for any matches. */
acl_match_check_x4(0, ctx, parms, &flows, index_array);
diff --git a/lib/acl/acl_run_scalar.c b/lib/acl/acl_run_scalar.c
index 3d61e79409..a3661b1b6b 100644
--- a/lib/acl/acl_run_scalar.c
+++ b/lib/acl/acl_run_scalar.c
@@ -121,10 +121,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results, num,
categories, ctx->trans_table);
- for (n = 0; n < MAX_SEARCHES_SCALAR; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < MAX_SEARCHES_SCALAR; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
transition0 = index_array[0];
transition1 = index_array[1];
diff --git a/lib/acl/acl_run_sse.h b/lib/acl/acl_run_sse.h
index 93286a2c38..4ec819a215 100644
--- a/lib/acl/acl_run_sse.h
+++ b/lib/acl/acl_run_sse.h
@@ -205,10 +205,8 @@ search_sse_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < MAX_SEARCHES_SSE8; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < MAX_SEARCHES_SSE8; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
/*
* indices1 contains index_array[0,1]
@@ -293,10 +291,8 @@ search_sse_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
total_packets, categories, ctx->trans_table);
- for (n = 0; n < MAX_SEARCHES_SSE4; n++) {
- cmplt[n].count = 0;
+ for (n = 0; n < MAX_SEARCHES_SSE4; n++)
index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
- }
indices1 = _mm_loadu_si128((xmm_t *) &index_array[0]);
indices2 = _mm_loadu_si128((xmm_t *) &index_array[2]);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.045704916 +0800
+++ 0007-acl-fix-build-with-GCC-15-on-aarch64.patch 2025-06-26 19:59:17.186418052 +0800
@@ -1 +1 @@
-From 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 Mon Sep 17 00:00:00 2001
+From 794bc328016be580bce9bae57b4ffe12ef0e1a6f Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6cde8a3dda49ad2721ac15faedf1965cdb4980b0 ]
@@ -36 +38,0 @@
-Cc: stable@dpdk.org
@@ -52 +54 @@
-index 7f092413cd..9fd3e60021 100644
+index 7d215de9d6..533f233f68 100644
@@ -75 +77 @@
-index 2d398ffded..d5ccdb94f0 100644
+index 3c30466d2d..c38727eab0 100644
@@ -78 +80 @@
-@@ -199,10 +199,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -197,10 +197,8 @@ search_altivec_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -90 +92 @@
-@@ -270,10 +268,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -268,10 +266,8 @@ search_altivec_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -119 +121 @@
-index 63074f871d..3b9bd0cc39 100644
+index 69d1b6d9e1..e31d56e7d0 100644
@@ -122 +124 @@
-@@ -172,10 +172,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -170,10 +170,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -134 +136 @@
-@@ -234,10 +232,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -232,10 +230,8 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
@@ -147 +149 @@
-index 8ffb40776c..32ebe3119b 100644
+index 3d61e79409..a3661b1b6b 100644
@@ -150 +152 @@
-@@ -124,10 +124,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
+@@ -121,10 +121,8 @@ rte_acl_classify_scalar(const struct rte_acl_ctx *ctx, const uint8_t **data,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'eal/linux: improve ASLR check' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (6 preceding siblings ...)
2025-06-26 12:00 ` patch 'acl: fix build with GCC 15 on aarch64' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix xstats name' " Xueming Li
` (76 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Yang Ming; +Cc: Xueming Li, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=333ef2e9f6a2074586d44620d08c4019cfc6e2ef
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 333ef2e9f6a2074586d44620d08c4019cfc6e2ef Mon Sep 17 00:00:00 2001
From: Yang Ming <ming.1.yang@nokia-sbell.com>
Date: Thu, 13 Mar 2025 14:19:03 +0800
Subject: [PATCH] eal/linux: improve ASLR check
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit dcf9f9363aa9b4163d241caf8b26a84ca0c0006b ]
This change ensures that the current process is checked for
being run with 'setarch' before verifying the value of
'/proc/sys/kernel/randomize_va_space'. The '-R' or
'--addr-no-randomize' parameter of the 'setarch' command is used
to disable the randomization of the virtual address space.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Yang Ming <ming.1.yang@nokia-sbell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/linux/eal_memory.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 077f77d406..ffdb836b7e 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -15,6 +15,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/resource.h>
+#include <sys/personality.h>
#include <unistd.h>
#include <limits.h>
#include <signal.h>
@@ -200,6 +201,17 @@ static int
aslr_enabled(void)
{
char c;
+
+ /*
+ * Check whether the current process is executed with the command line
+ * "setarch ... --addr-no-randomize ..." or "setarch ... -R ..."
+ * This complements the sysfs check to ensure comprehensive ASLR status detection.
+ * This check is necessary to support the functionality of the "setarch" command,
+ * which can disable ASLR by setting the ADDR_NO_RANDOMIZE personality flag.
+ */
+ if ((personality(0xffffffff) & ADDR_NO_RANDOMIZE) == ADDR_NO_RANDOMIZE)
+ return 0;
+
int retval, fd = open(RANDOMIZE_VA_SPACE_FILE, O_RDONLY);
if (fd < 0)
return -errno;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.081520215 +0800
+++ 0008-eal-linux-improve-ASLR-check.patch 2025-06-26 19:59:17.186418052 +0800
@@ -1 +1 @@
-From dcf9f9363aa9b4163d241caf8b26a84ca0c0006b Mon Sep 17 00:00:00 2001
+From 333ef2e9f6a2074586d44620d08c4019cfc6e2ef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dcf9f9363aa9b4163d241caf8b26a84ca0c0006b ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 8c896379fe..7f03bb517b 100644
+index 077f77d406..ffdb836b7e 100644
@@ -33 +35 @@
-@@ -203,6 +204,17 @@ static int
+@@ -200,6 +201,17 @@ static int
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/e1000: fix xstats name' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (7 preceding siblings ...)
2025-06-26 12:00 ` patch 'eal/linux: improve ASLR check' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix EEPROM dump' " Xueming Li
` (75 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Xueming Li, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3f77572528306b28192cc03fbf3117f383100d2d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3f77572528306b28192cc03fbf3117f383100d2d Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Thu, 10 Apr 2025 13:52:46 +0800
Subject: [PATCH] net/e1000: fix xstats name
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9303834c26ec7b3fb91f84d2c953ce4dae3073fb ]
The igb and igc xstats names need to be corrected:
tx_size_1023_to_max_packets should be tx_size_1024_to_max_packets.
Fixes: 38552317dcef ("igb: add extended stats")
Fixes: e6defdfddc3b ("net/igc: enable statistics")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/igc/igc_ethdev.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index c83ce5bc80..b7fdbef56e 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -479,7 +479,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
{"tx_size_256_to_511_packets", offsetof(struct e1000_hw_stats, ptc511)},
{"tx_size_512_to_1023_packets", offsetof(struct e1000_hw_stats,
ptc1023)},
- {"tx_size_1023_to_max_packets", offsetof(struct e1000_hw_stats,
+ {"tx_size_1024_to_max_packets", offsetof(struct e1000_hw_stats,
ptc1522)},
{"tx_multicast_packets", offsetof(struct e1000_hw_stats, mptc)},
{"tx_broadcast_packets", offsetof(struct e1000_hw_stats, bptc)},
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index bc8e0e127c..16967f2149 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -177,7 +177,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
{"tx_size_256_to_511_packets", offsetof(struct igc_hw_stats, ptc511)},
{"tx_size_512_to_1023_packets", offsetof(struct igc_hw_stats,
ptc1023)},
- {"tx_size_1023_to_max_packets", offsetof(struct igc_hw_stats,
+ {"tx_size_1024_to_max_packets", offsetof(struct igc_hw_stats,
ptc1522)},
{"tx_multicast_packets", offsetof(struct igc_hw_stats, mptc)},
{"tx_broadcast_packets", offsetof(struct igc_hw_stats, bptc)},
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.118271813 +0800
+++ 0009-net-e1000-fix-xstats-name.patch 2025-06-26 19:59:17.194418052 +0800
@@ -1 +1 @@
-From 9303834c26ec7b3fb91f84d2c953ce4dae3073fb Mon Sep 17 00:00:00 2001
+From 3f77572528306b28192cc03fbf3117f383100d2d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9303834c26ec7b3fb91f84d2c953ce4dae3073fb ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- drivers/net/intel/e1000/igb_ethdev.c | 2 +-
- drivers/net/intel/e1000/igc_ethdev.c | 2 +-
+ drivers/net/e1000/igb_ethdev.c | 2 +-
+ drivers/net/igc/igc_ethdev.c | 2 +-
@@ -20,5 +22,5 @@
-diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
-index cbd2f15f5f..40f453c8d9 100644
---- a/drivers/net/intel/e1000/igb_ethdev.c
-+++ b/drivers/net/intel/e1000/igb_ethdev.c
-@@ -486,7 +486,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
+diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
+index c83ce5bc80..b7fdbef56e 100644
+--- a/drivers/net/e1000/igb_ethdev.c
++++ b/drivers/net/e1000/igb_ethdev.c
+@@ -479,7 +479,7 @@ static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {
@@ -33,7 +35,7 @@
-diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
-index e712cfcf7c..68444e4fba 100644
---- a/drivers/net/intel/e1000/igc_ethdev.c
-+++ b/drivers/net/intel/e1000/igc_ethdev.c
-@@ -181,7 +181,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
- {"tx_size_256_to_511_packets", offsetof(struct e1000_hw_stats, ptc511)},
- {"tx_size_512_to_1023_packets", offsetof(struct e1000_hw_stats,
+diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
+index bc8e0e127c..16967f2149 100644
+--- a/drivers/net/igc/igc_ethdev.c
++++ b/drivers/net/igc/igc_ethdev.c
+@@ -177,7 +177,7 @@ static const struct rte_igc_xstats_name_off rte_igc_stats_strings[] = {
+ {"tx_size_256_to_511_packets", offsetof(struct igc_hw_stats, ptc511)},
+ {"tx_size_512_to_1023_packets", offsetof(struct igc_hw_stats,
@@ -41,2 +43,2 @@
-- {"tx_size_1023_to_max_packets", offsetof(struct e1000_hw_stats,
-+ {"tx_size_1024_to_max_packets", offsetof(struct e1000_hw_stats,
+- {"tx_size_1023_to_max_packets", offsetof(struct igc_hw_stats,
++ {"tx_size_1024_to_max_packets", offsetof(struct igc_hw_stats,
@@ -44,2 +46,2 @@
- {"tx_multicast_packets", offsetof(struct e1000_hw_stats, mptc)},
- {"tx_broadcast_packets", offsetof(struct e1000_hw_stats, bptc)},
+ {"tx_multicast_packets", offsetof(struct igc_hw_stats, mptc)},
+ {"tx_broadcast_packets", offsetof(struct igc_hw_stats, bptc)},
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/e1000: fix EEPROM dump' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (8 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/e1000: fix xstats name' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe: enable ethertype filter for E610' " Xueming Li
` (74 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Yuan Wang; +Cc: Xueming Li, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b041be6b46f5c0c1504439de68e2dd5903381442
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b041be6b46f5c0c1504439de68e2dd5903381442 Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Tue, 15 Apr 2025 15:48:02 +0800
Subject: [PATCH] net/e1000: fix EEPROM dump
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit b3855b93dcc890f40dce3b688f5a331dcd8d14e8 ]
There is a incorrect comparison in get_eeprom that cause EEPROM dump
fail. Allow valid case when "first + offset == word_size".
Fixes: 83c314da4c38 ("igb: add access to specific device info")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/e1000/igb_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index b7fdbef56e..f8207f34a6 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5149,7 +5149,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
first = in_eeprom->offset >> 1;
length = in_eeprom->length >> 1;
if ((first >= hw->nvm.word_size) ||
- ((first + length) >= hw->nvm.word_size))
+ ((first + length) > hw->nvm.word_size))
return -EINVAL;
in_eeprom->magic = hw->vendor_id |
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.162217012 +0800
+++ 0010-net-e1000-fix-EEPROM-dump.patch 2025-06-26 19:59:17.202418052 +0800
@@ -1 +1 @@
-From b3855b93dcc890f40dce3b688f5a331dcd8d14e8 Mon Sep 17 00:00:00 2001
+From b041be6b46f5c0c1504439de68e2dd5903381442 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b3855b93dcc890f40dce3b688f5a331dcd8d14e8 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- drivers/net/intel/e1000/igb_ethdev.c | 2 +-
+ drivers/net/e1000/igb_ethdev.c | 2 +-
@@ -18,5 +20,5 @@
-diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
-index 40f453c8d9..cb892fbf91 100644
---- a/drivers/net/intel/e1000/igb_ethdev.c
-+++ b/drivers/net/intel/e1000/igb_ethdev.c
-@@ -5219,7 +5219,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
+diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
+index b7fdbef56e..f8207f34a6 100644
+--- a/drivers/net/e1000/igb_ethdev.c
++++ b/drivers/net/e1000/igb_ethdev.c
+@@ -5149,7 +5149,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ixgbe: enable ethertype filter for E610' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (9 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/e1000: fix EEPROM dump' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/ixgbe: fix port mask default value in filter' " Xueming Li
` (73 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Xueming Li, Hailin Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6461582da86ab5613b98a5fe93fa605c1e76d867
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 6461582da86ab5613b98a5fe93fa605c1e76d867 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Wed, 23 Apr 2025 13:53:39 +0800
Subject: [PATCH] net/ixgbe: enable ethertype filter for E610
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 09766f41b320e68a27ef392af2f34ed5817bf5af ]
This commit adds the E610 MAC type to the filter support check.
Fixes: 962549bb27c7 ("net/ixgbe: move MAC type check macros")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
---
drivers/net/ixgbe/base/ixgbe_type.h | 2 ++
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index f709681df2..8a9864081e 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -3654,6 +3654,8 @@ enum ixgbe_mac_type {
ixgbe_mac_X550_vf,
ixgbe_mac_X550EM_x_vf,
ixgbe_mac_X550EM_a_vf,
+ ixgbe_mac_E610,
+ ixgbe_mac_E610_vf,
ixgbe_num_macs
};
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 22fc3be3d8..9ca89a7889 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -145,7 +145,7 @@
#define MAC_TYPE_FILTER_SUP(type) do {\
if ((type) != ixgbe_mac_82599EB && (type) != ixgbe_mac_X540 &&\
(type) != ixgbe_mac_X550 && (type) != ixgbe_mac_X550EM_x &&\
- (type) != ixgbe_mac_X550EM_a)\
+ (type) != ixgbe_mac_X550EM_a && (type) != ixgbe_mac_E610)\
return -ENOTSUP;\
} while (0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.197152910 +0800
+++ 0011-net-ixgbe-enable-ethertype-filter-for-E610.patch 2025-06-26 19:59:17.206418051 +0800
@@ -1 +1 @@
-From 09766f41b320e68a27ef392af2f34ed5817bf5af Mon Sep 17 00:00:00 2001
+From 6461582da86ab5613b98a5fe93fa605c1e76d867 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 09766f41b320e68a27ef392af2f34ed5817bf5af ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14,2 +16,3 @@
- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ drivers/net/ixgbe/base/ixgbe_type.h | 2 ++
+ drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
@@ -17,4 +20,17 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
-index 5bf8de4be6..86da9fc89b 100644
---- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
-+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
+index f709681df2..8a9864081e 100644
+--- a/drivers/net/ixgbe/base/ixgbe_type.h
++++ b/drivers/net/ixgbe/base/ixgbe_type.h
+@@ -3654,6 +3654,8 @@ enum ixgbe_mac_type {
+ ixgbe_mac_X550_vf,
+ ixgbe_mac_X550EM_x_vf,
+ ixgbe_mac_X550EM_a_vf,
++ ixgbe_mac_E610,
++ ixgbe_mac_E610_vf,
+ ixgbe_num_macs
+ };
+
+diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
+index 22fc3be3d8..9ca89a7889 100644
+--- a/drivers/net/ixgbe/ixgbe_ethdev.h
++++ b/drivers/net/ixgbe/ixgbe_ethdev.h
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ixgbe: fix port mask default value in filter' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (10 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/ixgbe: enable ethertype filter for E610' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/e1000: fix igb Tx queue offloads capability' " Xueming Li
` (72 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Yuan Wang; +Cc: Xueming Li, Hailin Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b0e10115bf89f8e5fcf5b20a5a6ca0f11c36a58f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b0e10115bf89f8e5fcf5b20a5a6ca0f11c36a58f Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Fri, 18 Apr 2025 15:43:09 +0800
Subject: [PATCH] net/ixgbe: fix port mask default value in filter
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c81daae2383ac655fe503e7da4767959ccc38ab7 ]
The fdir filter should mask L4 protocol in order to process raw IP
packets. However, the initial value of port mask is 0xFF and the filter
will not process raw IP packets if the flow rule does not change it.
Fixed by setting the default value to 0.
Fixes: 444505f933f1 ("net/ixgbe: fix IPv6 mask in flow director")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 687341c6b8..e70201dffa 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1644,6 +1644,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
memset(&rule->mask, 0xFF, sizeof(struct ixgbe_hw_fdir_mask));
rule->mask.vlan_tci_mask = 0;
rule->mask.flex_bytes_mask = 0;
+ rule->mask.dst_port_mask = 0;
+ rule->mask.src_port_mask = 0;
/**
* The first not void item should be
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.234228609 +0800
+++ 0012-net-ixgbe-fix-port-mask-default-value-in-filter.patch 2025-06-26 19:59:17.210418051 +0800
@@ -1 +1 @@
-From c81daae2383ac655fe503e7da4767959ccc38ab7 Mon Sep 17 00:00:00 2001
+From b0e10115bf89f8e5fcf5b20a5a6ca0f11c36a58f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c81daae2383ac655fe503e7da4767959ccc38ab7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- drivers/net/intel/ixgbe/ixgbe_flow.c | 2 ++
+ drivers/net/ixgbe/ixgbe_flow.c | 2 ++
@@ -21,4 +23,4 @@
-diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c b/drivers/net/intel/ixgbe/ixgbe_flow.c
-index 33da2f47ec..1e3804bb15 100644
---- a/drivers/net/intel/ixgbe/ixgbe_flow.c
-+++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
+diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
+index 687341c6b8..e70201dffa 100644
+--- a/drivers/net/ixgbe/ixgbe_flow.c
++++ b/drivers/net/ixgbe/ixgbe_flow.c
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/e1000: fix igb Tx queue offloads capability' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (11 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/ixgbe: fix port mask default value in filter' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/ice: fix flow creation failure' " Xueming Li
` (71 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Xueming Li, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=08cf99fc7f20351491a732fbe73a296f53ac21b2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 08cf99fc7f20351491a732fbe73a296f53ac21b2 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Mon, 14 Apr 2025 16:53:52 +0800
Subject: [PATCH] net/e1000: fix igb Tx queue offloads capability
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c2a1b38d779d8aed009e7f285ae95988bf9661da ]
The igb driver incorrectly assigns the tx port offload capability to the
tx queue offload capability. Return zero, for no queue-specific
capabilities instead.
Fixes: daa3b0833f08 ("net/e1000: fix Tx offload capability typos")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/e1000/igb_rxtx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 448c4b7d9d..5ee9d48e00 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1472,11 +1472,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
uint64_t
igb_get_tx_queue_offloads_capa(struct rte_eth_dev *dev)
{
- uint64_t tx_queue_offload_capa;
-
- tx_queue_offload_capa = igb_get_tx_port_offloads_capa(dev);
+ RTE_SET_USED(dev);
- return tx_queue_offload_capa;
+ return 0;
}
int
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.271879807 +0800
+++ 0013-net-e1000-fix-igb-Tx-queue-offloads-capability.patch 2025-06-26 19:59:17.214418051 +0800
@@ -1 +1 @@
-From c2a1b38d779d8aed009e7f285ae95988bf9661da Mon Sep 17 00:00:00 2001
+From 08cf99fc7f20351491a732fbe73a296f53ac21b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c2a1b38d779d8aed009e7f285ae95988bf9661da ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- drivers/net/intel/e1000/igb_rxtx.c | 6 ++----
+ drivers/net/e1000/igb_rxtx.c | 6 ++----
@@ -19,5 +21,5 @@
-diff --git a/drivers/net/intel/e1000/igb_rxtx.c b/drivers/net/intel/e1000/igb_rxtx.c
-index 4276bb6d31..b63de2354f 100644
---- a/drivers/net/intel/e1000/igb_rxtx.c
-+++ b/drivers/net/intel/e1000/igb_rxtx.c
-@@ -1490,11 +1490,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
+diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
+index 448c4b7d9d..5ee9d48e00 100644
+--- a/drivers/net/e1000/igb_rxtx.c
++++ b/drivers/net/e1000/igb_rxtx.c
+@@ -1472,11 +1472,9 @@ igb_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ice: fix flow creation failure' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (12 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/e1000: fix igb Tx queue offloads capability' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'vhost: fix wrapping on control virtqueue rings' " Xueming Li
` (70 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dhanya Pillai; +Cc: Xueming Li, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f04f9ea7db2fb646e6c3e24b0e85a8f3f41be931
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f04f9ea7db2fb646e6c3e24b0e85a8f3f41be931 Mon Sep 17 00:00:00 2001
From: Dhanya Pillai <dhanya.r.pillai@intel.com>
Date: Thu, 15 May 2025 11:23:44 +0000
Subject: [PATCH] net/ice: fix flow creation failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 1f332499adc57c86c46fdb26c923f8f56d4cb765 ]
In non-pipeline mode, priority is ignored, and a flow rule can be
created as a flow director rule or a switch rule depending only on its
pattern/action. Therefore, remove the priority field check from
ice_fdir_parse which is causing valid flow creation to return failure.
Fixes: 14b12c939f3a ("net/ice: remove pipeline mode")
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index dd9130ace3..0d7b3fe164 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -2434,7 +2434,7 @@ ice_fdir_parse(struct ice_adapter *ad,
uint32_t array_len,
const struct rte_flow_item pattern[],
const struct rte_flow_action actions[],
- uint32_t priority,
+ uint32_t priority __rte_unused,
void **meta,
struct rte_flow_error *error)
{
@@ -2449,9 +2449,6 @@ ice_fdir_parse(struct ice_adapter *ad,
item = ice_search_pattern_match_item(ad, pattern, array, array_len,
error);
- if (priority >= 1)
- return -rte_errno;
-
if (!item)
return -rte_errno;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.306466706 +0800
+++ 0014-net-ice-fix-flow-creation-failure.patch 2025-06-26 19:59:17.218418051 +0800
@@ -1 +1 @@
-From 1f332499adc57c86c46fdb26c923f8f56d4cb765 Mon Sep 17 00:00:00 2001
+From f04f9ea7db2fb646e6c3e24b0e85a8f3f41be931 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1f332499adc57c86c46fdb26c923f8f56d4cb765 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
- drivers/net/intel/ice/ice_fdir_filter.c | 5 +----
+ drivers/net/ice/ice_fdir_filter.c | 5 +----
@@ -20,5 +22,5 @@
-diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
-index 2ff0090aca..d41d223d52 100644
---- a/drivers/net/intel/ice/ice_fdir_filter.c
-+++ b/drivers/net/intel/ice/ice_fdir_filter.c
-@@ -2446,7 +2446,7 @@ ice_fdir_parse(struct ice_adapter *ad,
+diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
+index dd9130ace3..0d7b3fe164 100644
+--- a/drivers/net/ice/ice_fdir_filter.c
++++ b/drivers/net/ice/ice_fdir_filter.c
+@@ -2434,7 +2434,7 @@ ice_fdir_parse(struct ice_adapter *ad,
@@ -33 +35 @@
-@@ -2461,9 +2461,6 @@ ice_fdir_parse(struct ice_adapter *ad,
+@@ -2449,9 +2449,6 @@ ice_fdir_parse(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'vhost: fix wrapping on control virtqueue rings' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (13 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/ice: fix flow creation failure' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'vhost/crypto: fix cipher data length' " Xueming Li
` (69 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: David Marchand; +Cc: Xueming Li, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=62558d956aba801fa0da6fc3ce693ce8b1308cf3
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 62558d956aba801fa0da6fc3ce693ce8b1308cf3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 2 Apr 2025 08:53:58 +0200
Subject: [PATCH] vhost: fix wrapping on control virtqueue rings
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 38e640038798da92d1b7daf953f06fcd116cb952 ]
The idx field of a virtqueue available ring is increased by the driver
regardless of the ring size. It is for the device to mask this index
modulo the ring size (2.7.6 of the virtio 1.3 specification).
The same applies to the used ring.
Failing to mask triggers:
- crashes when popping message received on the cvq,
- system lockups (in the case of VDUSE) when the virtio-net driver waits
infinitely,
Fixes: 474f4d7840ad ("vhost: add control virtqueue")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/vhost/virtio_net_ctrl.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lib/vhost/virtio_net_ctrl.c b/lib/vhost/virtio_net_ctrl.c
index c4847f84ed..355ab85009 100644
--- a/lib/vhost/virtio_net_ctrl.c
+++ b/lib/vhost/virtio_net_ctrl.c
@@ -40,7 +40,7 @@ virtio_net_ctrl_pop(struct virtio_net *dev, struct vhost_virtqueue *cvq,
return 0;
}
- desc_idx = cvq->avail->ring[cvq->last_avail_idx];
+ desc_idx = cvq->avail->ring[cvq->last_avail_idx & (cvq->size - 1)];
if (desc_idx >= cvq->size) {
VHOST_LOG_CONFIG(dev->ifname, ERR, "Out of range desc index, dropping\n");
goto err;
@@ -167,8 +167,6 @@ virtio_net_ctrl_pop(struct virtio_net *dev, struct vhost_virtqueue *cvq,
}
cvq->last_avail_idx++;
- if (cvq->last_avail_idx >= cvq->size)
- cvq->last_avail_idx -= cvq->size;
if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))
vhost_avail_event(cvq) = cvq->last_avail_idx;
@@ -179,8 +177,6 @@ free_err:
free(ctrl_elem->ctrl_req);
err:
cvq->last_avail_idx++;
- if (cvq->last_avail_idx >= cvq->size)
- cvq->last_avail_idx -= cvq->size;
if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))
vhost_avail_event(cvq) = cvq->last_avail_idx;
@@ -229,13 +225,11 @@ virtio_net_ctrl_push(struct virtio_net *dev, struct virtio_net_ctrl_elem *ctrl_e
struct vhost_virtqueue *cvq = dev->cvq;
struct vring_used_elem *used_elem;
- used_elem = &cvq->used->ring[cvq->last_used_idx];
+ used_elem = &cvq->used->ring[cvq->last_used_idx & (cvq->size - 1)];
used_elem->id = ctrl_elem->head_idx;
used_elem->len = ctrl_elem->n_descs;
cvq->last_used_idx++;
- if (cvq->last_used_idx >= cvq->size)
- cvq->last_used_idx -= cvq->size;
rte_atomic_store_explicit((unsigned short __rte_atomic *)&cvq->used->idx,
cvq->last_used_idx, rte_memory_order_release);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.348364504 +0800
+++ 0015-vhost-fix-wrapping-on-control-virtqueue-rings.patch 2025-06-26 19:59:17.218418051 +0800
@@ -1 +1 @@
-From 38e640038798da92d1b7daf953f06fcd116cb952 Mon Sep 17 00:00:00 2001
+From 62558d956aba801fa0da6fc3ce693ce8b1308cf3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 38e640038798da92d1b7daf953f06fcd116cb952 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 999e84db7c..63c0a06b4f 100644
+index c4847f84ed..355ab85009 100644
@@ -37 +39 @@
- VHOST_CONFIG_LOG(dev->ifname, ERR, "Out of range desc index, dropping");
+ VHOST_LOG_CONFIG(dev->ifname, ERR, "Out of range desc index, dropping\n");
@@ -45 +46,0 @@
- vhost_virtqueue_reconnect_log_split(cvq);
@@ -48 +49,2 @@
-@@ -180,8 +178,6 @@ free_err:
+ vhost_avail_event(cvq) = cvq->last_avail_idx;
+@@ -179,8 +177,6 @@ free_err:
@@ -54 +55,0 @@
- vhost_virtqueue_reconnect_log_split(cvq);
@@ -57 +58,2 @@
-@@ -231,13 +227,11 @@ virtio_net_ctrl_push(struct virtio_net *dev, struct virtio_net_ctrl_elem *ctrl_e
+ vhost_avail_event(cvq) = cvq->last_avail_idx;
+@@ -229,13 +225,11 @@ virtio_net_ctrl_push(struct virtio_net *dev, struct virtio_net_ctrl_elem *ctrl_e
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'vhost/crypto: fix cipher data length' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (14 preceding siblings ...)
2025-06-26 12:00 ` patch 'vhost: fix wrapping on control virtqueue rings' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'crypto/virtio: fix cipher data source " Xueming Li
` (68 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Rajesh Mudimadugula; +Cc: Xueming Li, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9a1e04684ee6cf840d9eff4bd41938d46bcc2759
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9a1e04684ee6cf840d9eff4bd41938d46bcc2759 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Date: Thu, 3 Apr 2025 12:22:34 +0000
Subject: [PATCH] vhost/crypto: fix cipher data length
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 ]
This patch fixes cipher data length, in the event of algorithm
chaining. When enqueuing crypto op to vhost backend
cipher.data.length is set correctly which is in
virtqueue_crypto_sym_pkt_header_arrange(). This field is computed
and assigned wrongly instead of using passed value. This is
rectified and using correct cipher data length in vhost crypto.
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/vhost/vhost_crypto.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 23eb59459e..8b3050f229 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -1106,8 +1106,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
op->sess_type = RTE_CRYPTO_OP_WITH_SESSION;
op->sym->cipher.data.offset = chain->para.cipher_start_src_offset;
- op->sym->cipher.data.length = chain->para.src_data_len -
- chain->para.cipher_start_src_offset;
+ op->sym->cipher.data.length = chain->para.len_to_cipher;
op->sym->auth.data.offset = chain->para.hash_start_src_offset;
op->sym->auth.data.length = chain->para.len_to_hash;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.418521501 +0800
+++ 0016-vhost-crypto-fix-cipher-data-length.patch 2025-06-26 19:59:17.222418051 +0800
@@ -1 +1 @@
-From 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 Mon Sep 17 00:00:00 2001
+From 9a1e04684ee6cf840d9eff4bd41938d46bcc2759 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7ccd67c4185e1f4f0b975ff954e8685252bc3a18 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index f78daf98d1..29c9cb613d 100644
+index 23eb59459e..8b3050f229 100644
@@ -26 +28 @@
-@@ -1359,8 +1359,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
+@@ -1106,8 +1106,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/virtio: fix cipher data source length' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (15 preceding siblings ...)
2025-06-26 12:00 ` patch 'vhost/crypto: fix cipher data length' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'app/crypto-perf: fix AAD offset alignment' " Xueming Li
` (67 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Rajesh Mudimadugula; +Cc: Xueming Li, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c2f499a7e97d138254264945ea77cf412feac0b8
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c2f499a7e97d138254264945ea77cf412feac0b8 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Date: Thu, 3 Apr 2025 12:26:03 +0000
Subject: [PATCH] crypto/virtio: fix cipher data source length
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ]
In symmetric algorithm chaining, we need to consider both
cipher and auth data length for cipher source.
Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue")
Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/virtio/virtio_rxtx.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index d02486661f..01977c7ec4 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
req_data->u.sym_req.u.chain.para.aad_len = session->aad.length;
req_data->u.sym_req.u.chain.para.src_data_len =
- (sym_op->cipher.data.length +
- sym_op->cipher.data.offset);
+ RTE_MAX((sym_op->cipher.data.length +
+ sym_op->cipher.data.offset),
+ (sym_op->auth.data.length +
+ sym_op->auth.data.offset));
req_data->u.sym_req.u.chain.para.dst_data_len =
req_data->u.sym_req.u.chain.para.src_data_len;
req_data->u.sym_req.u.chain.para.cipher_start_src_offset =
@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit(
uint32_t hash_result_len = 0;
struct virtio_crypto_op_cookie *crypto_op_cookie;
struct virtio_crypto_alg_chain_session_para *para;
+ uint32_t src_len;
if (unlikely(sym_op->m_src->nb_segs != 1))
return -EMSGSIZE;
@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(
desc[idx++].flags = VRING_DESC_F_NEXT;
}
+ src_len = RTE_MAX((sym_op->cipher.data.offset +
+ sym_op->cipher.data.length),
+ (sym_op->auth.data.length +
+ sym_op->auth.data.offset));
/* indirect vring: src data */
desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
- desc[idx].len = (sym_op->cipher.data.offset
- + sym_op->cipher.data.length);
+ desc[idx].len = src_len;
desc[idx++].flags = VRING_DESC_F_NEXT;
/* indirect vring: dst data */
if (sym_op->m_dst) {
desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0);
- desc[idx].len = (sym_op->cipher.data.offset
- + sym_op->cipher.data.length);
+ desc[idx].len = src_len;
} else {
desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
- desc[idx].len = (sym_op->cipher.data.offset
- + sym_op->cipher.data.length);
+ desc[idx].len = src_len;
}
desc[idx++].flags = VRING_DESC_F_WRITE | VRING_DESC_F_NEXT;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.474647199 +0800
+++ 0017-crypto-virtio-fix-cipher-data-source-length.patch 2025-06-26 19:59:17.226418051 +0800
@@ -1 +1 @@
-From fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 Mon Sep 17 00:00:00 2001
+From c2f499a7e97d138254264945ea77cf412feac0b8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 0cc904485c..a7f1bd9753 100644
+index d02486661f..01977c7ec4 100644
@@ -22 +24 @@
-@@ -243,8 +243,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange(
@@ -35 +37 @@
-@@ -298,6 +300,7 @@ virtqueue_crypto_sym_enqueue_xmit_split(
+@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit(
@@ -43 +45 @@
-@@ -371,21 +374,22 @@ virtqueue_crypto_sym_enqueue_xmit_split(
+@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'app/crypto-perf: fix AAD offset alignment' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (16 preceding siblings ...)
2025-06-26 12:00 ` patch 'crypto/virtio: fix cipher data source " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " Xueming Li
` (66 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Shani Peretz; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=896897211f62765cb8a1ac6415a9b985fa3a8c73
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 896897211f62765cb8a1ac6415a9b985fa3a8c73 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz@nvidia.com>
Date: Tue, 11 Mar 2025 11:01:21 +0200
Subject: [PATCH] app/crypto-perf: fix AAD offset alignment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a ]
AAD offset in AES-GCM crypto test was calculated by adding
16-byte alignment after the IV, which is only needed in AES-CCM.
The patch correct the AAD offset calculation in AES-GCM algorithm tests.
Fixes: 0b242422d385 ("app/crypto-perf: set AAD after the crypto operation")
Signed-off-by: Shani Peretz <shperetz@nvidia.com>
---
app/test-crypto-perf/cperf_ops.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 0e79133310..d1dc37df84 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -535,7 +535,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
uint16_t i;
/* AAD is placed after the IV */
uint16_t aad_offset = iv_offset +
- RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16);
+ ((options->aead_algo == RTE_CRYPTO_AEAD_AES_CCM) ?
+ RTE_ALIGN_CEIL(test_vector->aead_iv.length, 16) :
+ test_vector->aead_iv.length);
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_sym_op *sym_op = ops[i]->sym;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.534533096 +0800
+++ 0018-app-crypto-perf-fix-AAD-offset-alignment.patch 2025-06-26 19:59:17.226418051 +0800
@@ -1 +1 @@
-From 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a Mon Sep 17 00:00:00 2001
+From 896897211f62765cb8a1ac6415a9b985fa3a8c73 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7c52aea4e68e0cacc7e41ff08fcddbd513ad7e0a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 37d06f1dea..47965bbc32 100644
+index 0e79133310..d1dc37df84 100644
@@ -23 +25 @@
-@@ -722,7 +722,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
+@@ -535,7 +535,9 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (17 preceding siblings ...)
2025-06-26 12:00 ` patch 'app/crypto-perf: fix AAD offset alignment' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " Xueming Li
` (65 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Arkadiusz Kusztal; +Cc: Xueming Li, Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=7515c10eeae6b595ac12a7833e7d331773e5d15d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 7515c10eeae6b595ac12a7833e7d331773e5d15d Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 20 Mar 2025 16:57:02 +0000
Subject: [PATCH] crypto/qat: fix out-of-place header bytes in AEAD raw API
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 06597aaac85638eaa92b66f341185cd0ba39aca6 ]
This commit fixes a problem with overwriting data in the OOP header
in RAW API crypto processing when using AEAD algorithms.
Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 134 +++++++++++++++++++
drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 13 +-
2 files changed, 142 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 64e892d022..a817c2bbb7 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -6,9 +6,12 @@
#define _QAT_CRYPTO_PMD_GENS_H_
#include <rte_cryptodev.h>
+#include <rte_common.h>
+#include <rte_branch_prediction.h>
#include "qat_crypto.h"
#include "qat_sym_session.h"
#include "qat_sym.h"
+#include "icp_qat_fw_la.h"
#define AES_OR_3DES_MISALIGNED (ctx->qat_mode == ICP_QAT_HW_CIPHER_CBC_MODE && \
((((ctx->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_AES128) || \
@@ -141,6 +144,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
return 0;
}
+static inline
+uint32_t qat_reqs_mid_set(int *error, struct icp_qat_fw_la_bulk_req *const req,
+ struct qat_sym_op_cookie *const cookie, const void *const opaque,
+ const struct rte_crypto_sgl *sgl_src, const struct rte_crypto_sgl *sgl_dst,
+ const union rte_crypto_sym_ofs ofs)
+{
+ uint32_t src_tot_length = 0; /* Returned value */
+ uint32_t dst_tot_length = 0; /* Used only for input validity checks */
+ uint32_t src_length = 0;
+ uint32_t dst_length = 0;
+ uint64_t src_data_addr = 0;
+ uint64_t dst_data_addr = 0;
+ const struct rte_crypto_vec * const vec_src = sgl_src->vec;
+ const struct rte_crypto_vec * const vec_dst = sgl_dst->vec;
+ const uint32_t n_src = sgl_src->num;
+ const uint32_t n_dst = sgl_dst->num;
+ const uint16_t offset = RTE_MAX(ofs.ofs.cipher.head, ofs.ofs.auth.head);
+ const uint8_t is_flat = !(n_src > 1 || n_dst > 1); /* Flat buffer or the SGL */
+ const uint8_t is_in_place = !n_dst; /* In-place or out-of-place */
+
+ *error = 0;
+ if (unlikely((n_src < 1 || n_src > QAT_SYM_SGL_MAX_NUMBER) ||
+ n_dst > QAT_SYM_SGL_MAX_NUMBER)) {
+ QAT_LOG(DEBUG,
+ "Invalid number of sgls, source no: %u, dst no: %u, opaque: %p",
+ n_src, n_dst, opaque);
+ *error = -1;
+ return 0;
+ }
+
+ /* --- Flat buffer --- */
+ if (is_flat) {
+ src_data_addr = vec_src->iova;
+ dst_data_addr = vec_src->iova;
+ src_length = vec_src->len;
+ dst_length = vec_src->len;
+
+ if (is_in_place)
+ goto done;
+ /* Out-of-place
+ * If OOP, we need to keep in mind that offset needs to
+ * start where the aead starts
+ */
+ dst_length = vec_dst->len;
+ /* Integer promotion here, but it does not bother this time */
+ if (unlikely(offset > src_length || offset > dst_length)) {
+ QAT_LOG(DEBUG,
+ "Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+ src_length, dst_length, opaque);
+ *error = -1;
+ return 0;
+ }
+ src_data_addr += offset;
+ dst_data_addr = vec_dst->iova + offset;
+ src_length -= offset;
+ dst_length -= offset;
+ src_tot_length = src_length;
+ dst_tot_length = dst_length;
+ goto check;
+ }
+
+ /* --- Scatter-gather list --- */
+ struct qat_sgl * const qat_sgl_src = (struct qat_sgl *)&cookie->qat_sgl_src;
+ uint16_t i;
+
+ ICP_QAT_FW_COMN_PTR_TYPE_SET(req->comn_hdr.comn_req_flags,
+ QAT_COMN_PTR_TYPE_SGL);
+ qat_sgl_src->num_bufs = n_src;
+ src_data_addr = cookie->qat_sgl_src_phys_addr;
+ /* Fill all the source buffers but the first one */
+ for (i = 1; i < n_src; i++) {
+ qat_sgl_src->buffers[i].len = (vec_src + i)->len;
+ qat_sgl_src->buffers[i].addr = (vec_src + i)->iova;
+ src_tot_length += qat_sgl_src->buffers[i].len;
+ }
+
+ if (is_in_place) {
+ /* SGL source first entry, no OOP */
+ qat_sgl_src->buffers[0].len = vec_src->len;
+ qat_sgl_src->buffers[0].addr = vec_src->iova;
+ dst_data_addr = src_data_addr;
+ goto done;
+ }
+ /* Out-of-place */
+ struct qat_sgl * const qat_sgl_dst =
+ (struct qat_sgl *)&cookie->qat_sgl_dst;
+ /*
+ * Offset reaching outside of the first buffer is not supported (RAW api).
+ * Integer promotion here, but it does not bother this time
+ */
+ if (unlikely(offset > vec_src->len || offset > vec_dst->len)) {
+ QAT_LOG(DEBUG,
+ "Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+ vec_src->len, vec_dst->len, opaque);
+ *error = -1;
+ return 0;
+ }
+ /* SGL source first entry, adjusted to OOP offsets */
+ qat_sgl_src->buffers[0].addr = vec_src->iova + offset;
+ qat_sgl_src->buffers[0].len = vec_src->len - offset;
+ /* SGL destination first entry, adjusted to OOP offsets */
+ qat_sgl_dst->buffers[0].addr = vec_dst->iova + offset;
+ qat_sgl_dst->buffers[0].len = vec_dst->len - offset;
+ /* Fill the remaining destination buffers */
+ for (i = 1; i < n_dst; i++) {
+ qat_sgl_dst->buffers[i].len = (vec_dst + i)->len;
+ qat_sgl_dst->buffers[i].addr = (vec_dst + i)->iova;
+ dst_tot_length += qat_sgl_dst->buffers[i].len;
+ }
+ dst_tot_length += qat_sgl_dst->buffers[0].len;
+ qat_sgl_dst->num_bufs = n_dst;
+ dst_data_addr = cookie->qat_sgl_dst_phys_addr;
+
+check: /* If error, return directly. If success, jump to one of these labels */
+ if (src_tot_length != dst_tot_length) {
+ QAT_LOG(DEBUG,
+ "Source length is not equal to the destination length %u, dst no: %u, opaque: %p",
+ src_tot_length, dst_tot_length, opaque);
+ *error = -1;
+ return 0;
+ }
+done:
+ req->comn_mid.opaque_data = (uintptr_t)opaque;
+ req->comn_mid.src_data_addr = src_data_addr;
+ req->comn_mid.dest_data_addr = dst_data_addr;
+ req->comn_mid.src_length = src_length;
+ req->comn_mid.dst_length = dst_length;
+
+ return src_tot_length;
+}
+
static __rte_always_inline int32_t
qat_sym_build_req_set_data(struct icp_qat_fw_la_bulk_req *req,
void *opaque, struct qat_sym_op_cookie *cookie,
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index 208b7e0ba6..b06514cd62 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -899,16 +899,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ int error = 0;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
if (vec->dest_sgl) {
- data_len = qat_sym_build_req_set_data(req,
- user_data[i], cookie,
- vec->src_sgl[i].vec, vec->src_sgl[i].num,
- vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+ data_len = qat_reqs_mid_set(&error, req, cookie, user_data[i],
+ &vec->src_sgl[i], &vec->dest_sgl[i], ofs);
+ /* In oop there is no offset, src/dst addresses are moved
+ * to avoid overwriting the dst header
+ */
+ ofs.ofs.cipher.head = 0;
} else {
data_len = qat_sym_build_req_set_data(req,
user_data[i], cookie,
@@ -916,7 +919,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0) || error)
break;
enqueue_one_aead_job_gen1(ctx, req, &vec->iv[i],
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.586090994 +0800
+++ 0019-crypto-qat-fix-out-of-place-header-bytes-in-AEAD-raw.patch 2025-06-26 19:59:17.230418050 +0800
@@ -1 +1 @@
-From 06597aaac85638eaa92b66f341185cd0ba39aca6 Mon Sep 17 00:00:00 2001
+From 7515c10eeae6b595ac12a7833e7d331773e5d15d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 06597aaac85638eaa92b66f341185cd0ba39aca6 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 35c1888082..c447f2cb45 100644
+index 64e892d022..a817c2bbb7 100644
@@ -36 +38 @@
-@@ -146,6 +149,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
+@@ -141,6 +144,137 @@ qat_cipher_is_len_in_bits(struct qat_sym_session *ctx,
@@ -175 +177 @@
-index 24e51a9318..3976d03179 100644
+index 208b7e0ba6..b06514cd62 100644
@@ -178 +180 @@
-@@ -942,16 +942,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -899,16 +899,19 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -202 +204 @@
-@@ -959,7 +962,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -916,7 +919,7 @@ qat_sym_dp_enqueue_aead_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (18 preceding siblings ...)
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place header bytes in AEAD raw API' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix header modify action on group 0' " Xueming Li
` (64 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Arkadiusz Kusztal; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=34f3447290892361ff0cc71c3b3d407b2f0a5d1d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 34f3447290892361ff0cc71c3b3d407b2f0a5d1d Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Mon, 28 Apr 2025 06:30:41 +0000
Subject: [PATCH] crypto/qat: fix out-of-place chain/cipher/auth headers
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 317d05f3721c9a740614adf77aa89d00d5302cf7 ]
This commit fixes a problem with overwriting data in the OOP header
in RAW API crypto processing when using chain, cipher and auth algorithms.
Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 146 +++++++++++++++++++
drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 40 +++--
2 files changed, 171 insertions(+), 15 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index a817c2bbb7..1c6ef0aae9 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -275,6 +275,152 @@ done:
return src_tot_length;
}
+struct qat_sym_req_mid_info {
+ uint32_t data_len;
+ union rte_crypto_sym_ofs ofs;
+};
+
+static inline
+struct qat_sym_req_mid_info qat_sym_req_mid_set(
+ int *error, struct icp_qat_fw_la_bulk_req *const req,
+ struct qat_sym_op_cookie *const cookie, const void *const opaque,
+ const struct rte_crypto_sgl *sgl_src, const struct rte_crypto_sgl *sgl_dst,
+ const union rte_crypto_sym_ofs ofs)
+{
+ struct qat_sym_req_mid_info info = { }; /* Returned value */
+ uint32_t src_tot_length = 0;
+ uint32_t dst_tot_length = 0; /* Used only for input validity checks */
+ uint32_t src_length = 0;
+ uint32_t dst_length = 0;
+ uint64_t src_data_addr = 0;
+ uint64_t dst_data_addr = 0;
+ union rte_crypto_sym_ofs out_ofs = ofs;
+ const struct rte_crypto_vec * const vec_src = sgl_src->vec;
+ const struct rte_crypto_vec * const vec_dst = sgl_dst->vec;
+ const uint32_t n_src = sgl_src->num;
+ const uint32_t n_dst = sgl_dst->num;
+ const uint16_t offset = RTE_MIN(ofs.ofs.cipher.head, ofs.ofs.auth.head);
+ const uint8_t is_flat = !(n_src > 1 || n_dst > 1); /* Flat buffer or the SGL */
+ const uint8_t is_in_place = !n_dst; /* In-place or out-of-place */
+
+ *error = 0;
+ if (unlikely((n_src < 1 || n_src > QAT_SYM_SGL_MAX_NUMBER) ||
+ n_dst > QAT_SYM_SGL_MAX_NUMBER)) {
+ QAT_LOG(DEBUG,
+ "Invalid number of sgls, source no: %u, dst no: %u, opaque: %p",
+ n_src, n_dst, opaque);
+ *error = -1;
+ return info;
+ }
+
+ /* --- Flat buffer --- */
+ if (is_flat) {
+ src_data_addr = vec_src->iova;
+ dst_data_addr = vec_src->iova;
+ src_length = vec_src->len;
+ dst_length = vec_src->len;
+
+ if (is_in_place)
+ goto done;
+ /* Out-of-place
+ * If OOP, we need to keep in mind that offset needs to
+ * start where the aead starts
+ */
+ dst_length = vec_dst->len;
+ /* Comparison between different types, intentional */
+ if (unlikely(offset > src_length || offset > dst_length)) {
+ QAT_LOG(DEBUG,
+ "Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+ src_length, dst_length, opaque);
+ *error = -1;
+ return info;
+ }
+ out_ofs.ofs.cipher.head -= offset;
+ out_ofs.ofs.auth.head -= offset;
+ src_data_addr += offset;
+ dst_data_addr = vec_dst->iova + offset;
+ src_length -= offset;
+ dst_length -= offset;
+ src_tot_length = src_length;
+ dst_tot_length = dst_length;
+ goto check;
+ }
+
+ /* --- Scatter-gather list --- */
+ struct qat_sgl * const qat_sgl_src = (struct qat_sgl *)&cookie->qat_sgl_src;
+ uint16_t i;
+
+ ICP_QAT_FW_COMN_PTR_TYPE_SET(req->comn_hdr.comn_req_flags,
+ QAT_COMN_PTR_TYPE_SGL);
+ qat_sgl_src->num_bufs = n_src;
+ src_data_addr = cookie->qat_sgl_src_phys_addr;
+ /* Fill all the source buffers but the first one */
+ for (i = 1; i < n_src; i++) {
+ qat_sgl_src->buffers[i].len = (vec_src + i)->len;
+ qat_sgl_src->buffers[i].addr = (vec_src + i)->iova;
+ src_tot_length += qat_sgl_src->buffers[i].len;
+ }
+
+ if (is_in_place) {
+ /* SGL source first entry, no OOP */
+ qat_sgl_src->buffers[0].len = vec_src->len;
+ qat_sgl_src->buffers[0].addr = vec_src->iova;
+ dst_data_addr = src_data_addr;
+ goto done;
+ }
+ /* Out-of-place */
+ struct qat_sgl * const qat_sgl_dst =
+ (struct qat_sgl *)&cookie->qat_sgl_dst;
+ /*
+ * Offset reaching outside of the first buffer is not supported (RAW api).
+ * Integer promotion here, but it does not bother this time
+ */
+ if (unlikely(offset > vec_src->len || offset > vec_dst->len)) {
+ QAT_LOG(DEBUG,
+ "Invalid size of the vector parameters, source length: %u, dst length: %u, opaque: %p",
+ vec_src->len, vec_dst->len, opaque);
+ *error = -1;
+ return info;
+ }
+ out_ofs.ofs.cipher.head -= offset;
+ out_ofs.ofs.auth.head -= offset;
+ /* SGL source first entry, adjusted to OOP offsets */
+ qat_sgl_src->buffers[0].addr = vec_src->iova + offset;
+ qat_sgl_src->buffers[0].len = vec_src->len - offset;
+ /* SGL destination first entry, adjusted to OOP offsets */
+ qat_sgl_dst->buffers[0].addr = vec_dst->iova + offset;
+ qat_sgl_dst->buffers[0].len = vec_dst->len - offset;
+ /* Fill the remaining destination buffers */
+ for (i = 1; i < n_dst; i++) {
+ qat_sgl_dst->buffers[i].len = (vec_dst + i)->len;
+ qat_sgl_dst->buffers[i].addr = (vec_dst + i)->iova;
+ dst_tot_length += qat_sgl_dst->buffers[i].len;
+ }
+ dst_tot_length += qat_sgl_dst->buffers[0].len;
+ qat_sgl_dst->num_bufs = n_dst;
+ dst_data_addr = cookie->qat_sgl_dst_phys_addr;
+
+check: /* If error, return directly. If success, jump to one of these labels */
+ if (src_tot_length != dst_tot_length) {
+ QAT_LOG(DEBUG,
+ "Source length is not equal to the destination length %u, dst no: %u, opaque: %p",
+ src_tot_length, dst_tot_length, opaque);
+ *error = -1;
+ return info;
+ }
+done:
+ req->comn_mid.opaque_data = (uintptr_t)opaque;
+ req->comn_mid.src_data_addr = src_data_addr;
+ req->comn_mid.dest_data_addr = dst_data_addr;
+ req->comn_mid.src_length = src_length;
+ req->comn_mid.dst_length = dst_length;
+
+ info.data_len = src_tot_length;
+ info.ofs = out_ofs;
+
+ return info;
+}
+
static __rte_always_inline int32_t
qat_sym_build_req_set_data(struct icp_qat_fw_la_bulk_req *req,
void *opaque, struct qat_sym_op_cookie *cookie,
diff --git a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
index b06514cd62..1e7c35afed 100644
--- a/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
+++ b/drivers/crypto/qat/dev/qat_sym_pmd_gen1.c
@@ -544,16 +544,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ struct qat_sym_req_mid_info info = { };
+ union rte_crypto_sym_ofs temp_ofs = ofs;
+ int error = 0;
+ temp_ofs.ofs.auth = temp_ofs.ofs.cipher;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
if (vec->dest_sgl) {
- data_len = qat_sym_build_req_set_data(req,
- user_data[i], cookie,
- vec->src_sgl[i].vec, vec->src_sgl[i].num,
- vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+ info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+ &vec->src_sgl[i], &vec->dest_sgl[i], temp_ofs);
+ data_len = info.data_len;
+ ofs = info.ofs;
} else {
data_len = qat_sym_build_req_set_data(req,
user_data[i], cookie,
@@ -561,7 +565,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0 || error))
break;
enqueue_one_cipher_job_gen1(ctx, req, &vec->iv[i], ofs,
(uint32_t)data_len, cookie);
@@ -658,16 +662,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ struct qat_sym_req_mid_info info = { };
+ union rte_crypto_sym_ofs temp_ofs = ofs;
+ int error = 0;
+ temp_ofs.ofs.cipher = temp_ofs.ofs.auth;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
if (vec->dest_sgl) {
- data_len = qat_sym_build_req_set_data(req,
- user_data[i], cookie,
- vec->src_sgl[i].vec, vec->src_sgl[i].num,
- vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+ info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+ &vec->src_sgl[i], &vec->dest_sgl[i], temp_ofs);
+ data_len = info.data_len;
+ ofs = info.ofs;
} else {
data_len = qat_sym_build_req_set_data(req,
user_data[i], cookie,
@@ -675,7 +683,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0 || error))
break;
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
@@ -781,16 +789,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ struct qat_sym_req_mid_info info = { };
+ int error = 0;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
if (vec->dest_sgl) {
- data_len = qat_sym_build_req_set_data(req,
- user_data[i], cookie,
- vec->src_sgl[i].vec, vec->src_sgl[i].num,
- vec->dest_sgl[i].vec, vec->dest_sgl[i].num);
+ info = qat_sym_req_mid_set(&error, req, cookie, user_data[i],
+ &vec->src_sgl[i], &vec->dest_sgl[i], ofs);
+ data_len = info.data_len;
+ ofs = info.ofs;
} else {
data_len = qat_sym_build_req_set_data(req,
user_data[i], cookie,
@@ -798,7 +808,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0 || error))
break;
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.665600991 +0800
+++ 0020-crypto-qat-fix-out-of-place-chain-cipher-auth-header.patch 2025-06-26 19:59:17.234418050 +0800
@@ -1 +1 @@
-From 317d05f3721c9a740614adf77aa89d00d5302cf7 Mon Sep 17 00:00:00 2001
+From 34f3447290892361ff0cc71c3b3d407b2f0a5d1d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 317d05f3721c9a740614adf77aa89d00d5302cf7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c447f2cb45..846636f57d 100644
+index a817c2bbb7..1c6ef0aae9 100644
@@ -22 +24 @@
-@@ -280,6 +280,152 @@ done:
+@@ -275,6 +275,152 @@ done:
@@ -176 +178 @@
-index 3976d03179..561166203c 100644
+index b06514cd62..1e7c35afed 100644
@@ -179 +181 @@
-@@ -567,16 +567,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -544,16 +544,20 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -204 +206 @@
-@@ -584,7 +588,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -561,7 +565,7 @@ qat_sym_dp_enqueue_cipher_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -211,3 +213,3 @@
-
- if (ctx->is_zuc256)
-@@ -688,16 +692,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+ enqueue_one_cipher_job_gen1(ctx, req, &vec->iv[i], ofs,
+ (uint32_t)data_len, cookie);
+@@ -658,16 +662,20 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -238 +240 @@
-@@ -705,7 +713,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -675,7 +683,7 @@ qat_sym_dp_enqueue_auth_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -246,2 +248,2 @@
- if (ctx->is_zuc256)
-@@ -819,16 +827,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+ if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
+@@ -781,16 +789,18 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -270 +272 @@
-@@ -836,7 +846,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
+@@ -798,7 +808,7 @@ qat_sym_dp_enqueue_chain_jobs_gen1(void *qp_data, uint8_t *drv_ctx,
@@ -278 +280 @@
- if (ctx->is_zuc256) {
+ if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix header modify action on group 0' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (19 preceding siblings ...)
2025-06-26 12:00 ` patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: validate GTP PSC QFI width' " Xueming Li
` (63 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Xueming Li, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5789022ac7b77a88a8805fff678cc2f572492956
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5789022ac7b77a88a8805fff678cc2f572492956 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:32:57 +0200
Subject: [PATCH] net/mlx5: fix header modify action on group 0
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f1ebb26d0d9388b6df65d493b06ce3b55adfb893 ]
HW modify header commands generated for multiple modify field
flow actions, which modify/access the same packet fields
do not have to be separated by NOPs when used on group 0.
This is because:
- On group > 0, HW uses Modify Header Pattern objects
which require NOP explicitly.
- On group 0, modify field action is implemented using
Modify Header Context object managed by FW.
FW inserts requires NOPs internally.
mlx5 PMD inserted NOP always, which caused flow/table creation
failures on group 0 flow rules.
This patch addresses that.
Fixes: 0f4aa72b99da ("net/mlx5: support flow modify field with HWS")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index c53d407746..fac6c51f90 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1105,7 +1105,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
static __rte_always_inline bool
flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
- const struct mlx5_modification_cmd *cmd)
+ const struct mlx5_modification_cmd *cmd,
+ const struct rte_flow_attr *attr)
{
struct mlx5_modification_cmd last_cmd = { { 0 } };
struct mlx5_modification_cmd new_cmd = { { 0 } };
@@ -1113,6 +1114,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
unsigned int last_type;
bool should_insert = false;
+ /*
+ * Modify header action list does not require NOPs in root table,
+ * because different type of underlying object is used:
+ * - in root table - MODIFY_HEADER_CONTEXT (does not require NOPs),
+ * - in non-root - either inline modify action or based on Modify Header Pattern
+ * (which requires NOPs).
+ */
+ if (attr->group == 0)
+ return false;
if (cmds_num == 0)
return false;
last_cmd = *(&mhdr->mhdr_cmds[cmds_num - 1]);
@@ -1188,7 +1198,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
static __rte_always_inline int
flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
- struct mlx5_flow_dv_modify_hdr_resource *resource)
+ struct mlx5_flow_dv_modify_hdr_resource *resource,
+ const struct rte_flow_attr *attr)
{
uint32_t idx;
int ret;
@@ -1196,7 +1207,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
for (idx = 0; idx < resource->actions_num; ++idx) {
struct mlx5_modification_cmd *src = &resource->actions[idx];
- if (flow_hw_should_insert_nop(mhdr, src)) {
+ if (flow_hw_should_insert_nop(mhdr, src, attr)) {
ret = flow_hw_mhdr_cmd_nop_append(mhdr);
if (ret)
return ret;
@@ -1312,14 +1323,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
* This NOP command will not be a part of action's command range used to update commands
* on rule creation.
*/
- if (flow_hw_should_insert_nop(mhdr, &resource->actions[0])) {
+ if (flow_hw_should_insert_nop(mhdr, &resource->actions[0], attr)) {
ret = flow_hw_mhdr_cmd_nop_append(mhdr);
if (ret)
return rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL, "too many modify field operations specified");
}
cmds_start = mhdr->mhdr_cmds_num;
- ret = flow_hw_converted_mhdr_cmds_append(mhdr, resource);
+ ret = flow_hw_converted_mhdr_cmds_append(mhdr, resource, attr);
if (ret)
return rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL, "too many modify field operations specified");
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.707953789 +0800
+++ 0021-net-mlx5-fix-header-modify-action-on-group-0.patch 2025-06-26 19:59:17.246418050 +0800
@@ -1 +1 @@
-From f1ebb26d0d9388b6df65d493b06ce3b55adfb893 Mon Sep 17 00:00:00 2001
+From 5789022ac7b77a88a8805fff678cc2f572492956 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f1ebb26d0d9388b6df65d493b06ce3b55adfb893 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 2f7b769aec..cbe6bd3ef9 100644
+index c53d407746..fac6c51f90 100644
@@ -34 +36 @@
-@@ -1422,7 +1422,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
+@@ -1105,7 +1105,8 @@ flow_hw_action_modify_field_is_shared(const struct rte_flow_action *action,
@@ -44 +46 @@
-@@ -1430,6 +1431,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
+@@ -1113,6 +1114,15 @@ flow_hw_should_insert_nop(const struct mlx5_hw_modify_header_action *mhdr,
@@ -60 +62 @@
-@@ -1508,7 +1518,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
+@@ -1188,7 +1198,8 @@ flow_hw_mhdr_cmd_append(struct mlx5_hw_modify_header_action *mhdr,
@@ -70 +72 @@
-@@ -1516,7 +1527,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
+@@ -1196,7 +1207,7 @@ flow_hw_converted_mhdr_cmds_append(struct mlx5_hw_modify_header_action *mhdr,
@@ -79 +81 @@
-@@ -1639,14 +1650,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
+@@ -1312,14 +1323,14 @@ flow_hw_modify_field_compile(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: validate GTP PSC QFI width' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (20 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: fix header modify action on group 0' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix counter service cleanup on init failure' " Xueming Li
` (62 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Xueming Li, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=37c5aad58677394e323b559e163b5a5b26e104f8
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 37c5aad58677394e323b559e163b5a5b26e104f8 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:35:07 +0200
Subject: [PATCH] net/mlx5: validate GTP PSC QFI width
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 34471d1645fae0e936c44f2f6d7fea6d22e4173e ]
Add missing validation of GTP PSC QFI flow field width for
modify field flow action.
Fixes: 0f4aa72b99da ("net/mlx5: support flow modify field with HWS")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 43889e8625..5938ca0c02 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1420,6 +1420,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
case RTE_FLOW_FIELD_META:
return (flow_dv_get_metadata_reg(dev, attr, error) == REG_C_0) ?
rte_popcount32(priv->sh->dv_meta_mask) : 32;
+ case RTE_FLOW_FIELD_GTP_PSC_QFI:
+ return 6;
case RTE_FLOW_FIELD_POINTER:
case RTE_FLOW_FIELD_VALUE:
return inherit < 0 ? 0 : inherit;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.791080585 +0800
+++ 0022-net-mlx5-validate-GTP-PSC-QFI-width.patch 2025-06-26 19:59:17.266418049 +0800
@@ -1 +1 @@
-From 34471d1645fae0e936c44f2f6d7fea6d22e4173e Mon Sep 17 00:00:00 2001
+From 37c5aad58677394e323b559e163b5a5b26e104f8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 34471d1645fae0e936c44f2f6d7fea6d22e4173e ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 608c42db1d..c217634d9b 100644
+index 43889e8625..5938ca0c02 100644
@@ -22 +24 @@
-@@ -1451,6 +1451,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
+@@ -1420,6 +1420,8 @@ mlx5_flow_item_field_width(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix counter service cleanup on init failure' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (21 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: validate GTP PSC QFI width' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5/hws: fix send queue drain on FW WQE destroy' " Xueming Li
` (61 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Xueming Li, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=904d50d76ad3e380603862c36874597bdafb9fb5
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 904d50d76ad3e380603862c36874597bdafb9fb5 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:41:05 +0200
Subject: [PATCH] net/mlx5: fix counter service cleanup on init failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ]
When initializing the counter pool in mlx5_hws_cnt_pool_create(), the
background service thread was started before pool creation completed.
If pool creation failed after the thread was started, the error handling
path did not clean up the running thread, as it assumed no resources
needed cleanup if the pool was not created.
This patch moves the creation of the background service thread to the end
of the counter pool initialization, ensuring resources are released in the
correct order during rollback. It also adds a missing "goto error" in case
the service thread initialization fails.
Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_hws_cnt.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index ca6fd51cc6..7e33568622 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -673,12 +673,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
goto error;
return cpool;
}
- /* init cnt service if not. */
- if (priv->sh->cnt_svc == NULL) {
- ret = mlx5_hws_cnt_svc_init(priv->sh);
- if (ret != 0)
- goto error;
- }
cparam.fetch_sz = HWS_CNT_CACHE_FETCH_DEFAULT;
cparam.preload_sz = HWS_CNT_CACHE_PRELOAD_DEFAULT;
cparam.q_num = nb_queue;
@@ -705,6 +699,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
ret = mlx5_hws_cnt_pool_action_create(priv, cpool);
if (ret != 0)
goto error;
+ /* init cnt service if not. */
+ if (priv->sh->cnt_svc == NULL) {
+ ret = mlx5_hws_cnt_svc_init(priv->sh);
+ if (ret)
+ goto error;
+ }
priv->sh->cnt_svc->refcnt++;
cpool->priv = priv;
rte_spinlock_lock(&priv->sh->cpool_lock);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.844961283 +0800
+++ 0023-net-mlx5-fix-counter-service-cleanup-on-init-failure.patch 2025-06-26 19:59:17.270418049 +0800
@@ -1 +1 @@
-From 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc Mon Sep 17 00:00:00 2001
+From 904d50d76ad3e380603862c36874597bdafb9fb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4d78ac5f3ef7c1ae3ae194423428c0f96e9994bc ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index fd12bcd7ec..5c7c0041aa 100644
+index ca6fd51cc6..7e33568622 100644
@@ -30,3 +32,3 @@
-@@ -729,12 +729,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
- }
- goto success;
+@@ -673,12 +673,6 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
+ goto error;
+ return cpool;
@@ -36,2 +38,2 @@
-- ret = mlx5_hws_cnt_svc_init(priv->sh, error);
-- if (ret)
+- ret = mlx5_hws_cnt_svc_init(priv->sh);
+- if (ret != 0)
@@ -43,2 +45,3 @@
-@@ -769,6 +763,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
- NULL, "failed to allocate counter actions");
+@@ -705,6 +699,12 @@ mlx5_hws_cnt_pool_create(struct rte_eth_dev *dev,
+ ret = mlx5_hws_cnt_pool_action_create(priv, cpool);
+ if (ret != 0)
@@ -46 +48,0 @@
- }
@@ -49 +51 @@
-+ ret = mlx5_hws_cnt_svc_init(priv->sh, error);
++ ret = mlx5_hws_cnt_svc_init(priv->sh);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5/hws: fix send queue drain on FW WQE destroy' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (22 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: fix counter service cleanup on init failure' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " Xueming Li
` (60 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Xueming Li, Alex Vesker, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b7f8d01c0a435dbd32cd2b711a36eecb9f11f44d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b7f8d01c0a435dbd32cd2b711a36eecb9f11f44d Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 27 Apr 2025 14:28:21 +0300
Subject: [PATCH] net/mlx5/hws: fix send queue drain on FW WQE destroy
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0394577bdc91a25338fd9a61eb2ddfedf09f2800 ]
Queue sync operation was skipped on rule destroy.
Unlike on fw wqe rule create in which both fence and notify_hw
are set to true, on destroy fence was set to false causing
previous queue operation to be stuck in the queue forever.
Example:
rule_a - HW rule, rule_b - FW WQE rule.
Sequence:
rule_a destroy, burst=1 (HW rule put to queue but no DB)
rule_b destroy, burst=0 (FW WQE rule cmd but no queue sync)
Outcome:
rule_a is stuck forever in the queue - no completion.
Fixes: 338aaf911665 ("net/mlx5/hws: add send FW match STE using gen WQE")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c
index 4c279ba42a..021d1375a9 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.c
+++ b/drivers/net/mlx5/hws/mlx5dr_send.c
@@ -339,7 +339,7 @@ void mlx5dr_send_stes_fw(struct mlx5dr_send_engine *queue,
pdn = ctx->pd_num;
/* Writing through FW can't HW fence, therefore we drain the queue */
- if (send_attr->fence)
+ if (send_attr->fence || send_attr->notify_hw)
mlx5dr_send_queue_action(ctx,
queue_id,
MLX5DR_SEND_QUEUE_ACTION_DRAIN_SYNC);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.886733181 +0800
+++ 0024-net-mlx5-hws-fix-send-queue-drain-on-FW-WQE-destroy.patch 2025-06-26 19:59:17.270418049 +0800
@@ -1 +1 @@
-From 0394577bdc91a25338fd9a61eb2ddfedf09f2800 Mon Sep 17 00:00:00 2001
+From b7f8d01c0a435dbd32cd2b711a36eecb9f11f44d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0394577bdc91a25338fd9a61eb2ddfedf09f2800 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index e121c7f7ed..d01fc7ef2c 100644
+index 4c279ba42a..021d1375a9 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: remove unsupported flow meter action in HWS' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (23 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5/hws: fix send queue drain on FW WQE destroy' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix maximal queue size query' " Xueming Li
` (59 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Xueming Li, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b8e4ed8c83f0e00a522b254f0f06d8704475af35
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b8e4ed8c83f0e00a522b254f0f06d8704475af35 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 4 May 2025 08:23:50 +0300
Subject: [PATCH] net/mlx5: remove unsupported flow meter action in HWS
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 645f240d1cd57d0be1b773c739a5845a7663eeed ]
METER flow action is not supported in MLX5 HWS mode.
Application must use METER_MARK flow action.
The patch removes METER action from HWS code.
Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 85 -----
drivers/net/mlx5/mlx5_flow_meter.c | 540 -----------------------------
2 files changed, 625 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fac6c51f90..37011b9950 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1468,35 +1468,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
return 0;
}
-static __rte_always_inline int
-flow_hw_meter_compile(struct rte_eth_dev *dev,
- const struct mlx5_flow_template_table_cfg *cfg,
- uint16_t aso_mtr_pos,
- uint16_t jump_pos,
- const struct rte_flow_action *action,
- struct mlx5_hw_actions *acts,
- struct rte_flow_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5_aso_mtr *aso_mtr;
- const struct rte_flow_action_meter *meter = action->conf;
- uint32_t group = cfg->attr.flow_attr.group;
-
- aso_mtr = mlx5_aso_meter_by_idx(priv, meter->mtr_id);
- acts->rule_acts[aso_mtr_pos].action = priv->mtr_bulk.action;
- acts->rule_acts[aso_mtr_pos].aso_meter.offset = aso_mtr->offset;
- acts->jump = flow_hw_jump_action_register
- (dev, cfg, aso_mtr->fm.group, error);
- if (!acts->jump)
- return -ENOMEM;
- acts->rule_acts[jump_pos].action = (!!group) ?
- acts->jump->hws_action :
- acts->jump->root_action;
- if (mlx5_aso_mtr_wait(priv, aso_mtr, true))
- return -ENOMEM;
- return 0;
-}
-
static __rte_always_inline int
flow_hw_cnt_compile(struct rte_eth_dev *dev, uint32_t start_pos,
struct mlx5_hw_actions *acts)
@@ -2159,7 +2130,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
bool reformat_used = false;
bool recom_used = false;
unsigned int of_vlan_offset;
- uint16_t jump_pos;
uint32_t ct_idx;
int ret, err;
uint32_t target_grp = 0;
@@ -2422,27 +2392,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
masks, acts, src_pos, dr_pos, &sub_error))
goto err;
break;
- case RTE_FLOW_ACTION_TYPE_METER:
- /*
- * METER action is compiled to 2 DR actions - ASO_METER and FT.
- * Calculated DR offset is stored only for ASO_METER and FT
- * is assumed to be the next action.
- */
- jump_pos = dr_pos + 1;
- if (actions->conf && masks->conf &&
- ((const struct rte_flow_action_meter *)
- masks->conf)->mtr_id) {
- err = flow_hw_meter_compile(dev, cfg,
- dr_pos, jump_pos, actions, acts,
- &sub_error);
- if (err)
- goto err;
- } else if (__flow_hw_act_data_general_append(priv, acts,
- actions->type,
- src_pos,
- dr_pos))
- goto err;
- break;
case RTE_FLOW_ACTION_TYPE_AGE:
flow_hw_translate_group(dev, cfg, attr->group,
&target_grp, &sub_error);
@@ -2992,7 +2941,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
const struct rte_flow_action_ipv6_ext_push *ipv6_push;
const struct rte_flow_item *enc_item = NULL;
const struct rte_flow_action_ethdev *port_action = NULL;
- const struct rte_flow_action_meter *meter = NULL;
const struct rte_flow_action_age *age = NULL;
uint8_t *buf = job->encap_data;
uint8_t *push_buf = job->push_data;
@@ -3159,28 +3107,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
rule_acts + act_data->action_dst,
act_data->shared_meter.id);
break;
- case RTE_FLOW_ACTION_TYPE_METER:
- meter = action->conf;
- mtr_id = meter->mtr_id;
- aso_mtr = mlx5_aso_meter_by_idx(priv, mtr_id);
- rule_acts[act_data->action_dst].action =
- priv->mtr_bulk.action;
- rule_acts[act_data->action_dst].aso_meter.offset =
- aso_mtr->offset;
- jump = flow_hw_jump_action_register
- (dev, &table->cfg, aso_mtr->fm.group, NULL);
- if (!jump)
- goto error;
- MLX5_ASSERT
- (!rule_acts[act_data->action_dst + 1].action);
- rule_acts[act_data->action_dst + 1].action =
- (!!attr.group) ? jump->hws_action :
- jump->root_action;
- job->flow->jump = jump;
- job->flow->fate_type = MLX5_FLOW_FATE_JUMP;
- if (mlx5_aso_mtr_wait(priv, aso_mtr, true))
- goto error;
- break;
case RTE_FLOW_ACTION_TYPE_AGE:
age = action->conf;
/*
@@ -5916,10 +5842,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
}
action_flags |= MLX5_FLOW_ACTION_IPV6_ROUTING_REMOVE;
break;
- case RTE_FLOW_ACTION_TYPE_METER:
- /* TODO: Validation logic */
- action_flags |= MLX5_FLOW_ACTION_METER;
- break;
case RTE_FLOW_ACTION_TYPE_METER_MARK:
ret = flow_hw_validate_action_meter_mark(dev, action,
error);
@@ -6225,13 +6147,6 @@ flow_hw_dr_actions_template_create(struct rte_eth_dev *dev,
action_types[mhdr_off] = type;
}
break;
- case RTE_FLOW_ACTION_TYPE_METER:
- at->dr_off[i] = curr_off;
- action_types[curr_off++] = MLX5DR_ACTION_TYP_ASO_METER;
- if (curr_off >= MLX5_HW_MAX_ACTS)
- goto err_actions_num;
- action_types[curr_off++] = MLX5DR_ACTION_TYP_TBL;
- break;
case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
type = mlx5_hw_dr_action_types[at->actions[i].type];
at->dr_off[i] = curr_off;
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 1376533604..04617dacc4 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -841,45 +841,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
return 0;
}
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Callback to check MTR policy action validate for HWS
- *
- * @param[in] dev
- * Pointer to Ethernet device.
- * @param[in] actions
- * Pointer to meter policy action detail.
- * @param[out] error
- * Pointer to the error structure.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_validate(struct rte_eth_dev *dev,
- struct rte_mtr_meter_policy_params *policy,
- struct rte_mtr_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- const struct rte_flow_actions_template_attr attr = {
- .transfer = priv->sh->config.dv_esw_en ? 1 : 0 };
- int ret;
- int i;
-
- if (!priv->mtr_en || !priv->sh->meter_aso_en)
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_METER_POLICY,
- NULL, "meter policy unsupported.");
- for (i = 0; i < RTE_COLORS; i++) {
- ret = mlx5_flow_actions_validate(dev, &attr, policy->actions[i],
- policy->actions[i], NULL);
- if (ret)
- return ret;
- }
- return 0;
-}
-#endif
-
static int
__mlx5_flow_meter_policy_delete(struct rte_eth_dev *dev,
uint32_t policy_id,
@@ -1205,330 +1166,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
&policy_idx);
}
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Callback to delete MTR policy for HWS.
- *
- * @param[in] dev
- * Pointer to Ethernet device.
- * @param[in] policy_id
- * Meter policy id.
- * @param[out] error
- * Pointer to the error structure.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_delete(struct rte_eth_dev *dev,
- uint32_t policy_id,
- struct rte_mtr_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5_flow_meter_policy *mtr_policy;
- uint32_t i, j;
- uint32_t nb_flows = 0;
- int ret;
- struct rte_flow_op_attr op_attr = { .postpone = 1 };
- struct rte_flow_op_result result[RTE_COLORS * MLX5_MTR_DOMAIN_MAX];
-
- if (!priv->mtr_policy_arr)
- return mlx5_flow_meter_policy_delete(dev, policy_id, error);
- /* Meter policy must exist. */
- mtr_policy = mlx5_flow_meter_policy_find(dev, policy_id, NULL);
- if (!mtr_policy->initialized)
- return -rte_mtr_error_set(error, ENOENT,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID, NULL,
- "Meter policy does not exists.");
- /* Check policy is unused. */
- if (mtr_policy->ref_cnt)
- return -rte_mtr_error_set(error, EBUSY,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
- NULL, "Meter policy is in use.");
- rte_spinlock_lock(&priv->hw_ctrl_lock);
- for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
- for (j = 0; j < RTE_COLORS; j++) {
- if (mtr_policy->hws_flow_rule[i][j]) {
- ret = rte_flow_async_destroy(dev->data->port_id,
- CTRL_QUEUE_ID(priv), &op_attr,
- mtr_policy->hws_flow_rule[i][j],
- NULL, NULL);
- if (ret < 0)
- continue;
- nb_flows++;
- }
- }
- }
- ret = rte_flow_push(dev->data->port_id, CTRL_QUEUE_ID(priv), NULL);
- while (nb_flows && (ret >= 0)) {
- ret = rte_flow_pull(dev->data->port_id,
- CTRL_QUEUE_ID(priv), result,
- nb_flows, NULL);
- nb_flows -= ret;
- }
- for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
- if (mtr_policy->hws_flow_table[i])
- rte_flow_template_table_destroy(dev->data->port_id,
- mtr_policy->hws_flow_table[i], NULL);
- }
- for (i = 0; i < RTE_COLORS; i++) {
- if (mtr_policy->hws_act_templ[i])
- rte_flow_actions_template_destroy(dev->data->port_id,
- mtr_policy->hws_act_templ[i], NULL);
- }
- if (mtr_policy->hws_item_templ)
- rte_flow_pattern_template_destroy(dev->data->port_id,
- mtr_policy->hws_item_templ, NULL);
- rte_spinlock_unlock(&priv->hw_ctrl_lock);
- memset(mtr_policy, 0, sizeof(struct mlx5_flow_meter_policy));
- return 0;
-}
-
-/**
- * Callback to add MTR policy for HWS.
- *
- * @param[in] dev
- * Pointer to Ethernet device.
- * @param[out] policy_id
- * Pointer to policy id
- * @param[in] actions
- * Pointer to meter policy action detail.
- * @param[out] error
- * Pointer to the error structure.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_policy_hws_add(struct rte_eth_dev *dev,
- uint32_t policy_id,
- struct rte_mtr_meter_policy_params *policy,
- struct rte_mtr_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5_flow_meter_policy *mtr_policy = NULL;
- const struct rte_flow_action *act;
- const struct rte_flow_action_meter *mtr;
- struct mlx5_flow_meter_info *fm;
- struct mlx5_flow_meter_policy *plc;
- uint8_t domain_color = MLX5_MTR_ALL_DOMAIN_BIT;
- bool is_rss = false;
- bool is_hierarchy = false;
- int i, j;
- uint32_t nb_colors = 0;
- uint32_t nb_flows = 0;
- int color;
- int ret;
- struct rte_flow_pattern_template_attr pta = {0};
- struct rte_flow_actions_template_attr ata = {0};
- struct rte_flow_template_table_attr ta = { {0}, 0 };
- struct rte_flow_op_attr op_attr = { .postpone = 1 };
- struct rte_flow_op_result result[RTE_COLORS * MLX5_MTR_DOMAIN_MAX];
- const uint32_t color_mask = (UINT32_C(1) << MLX5_MTR_COLOR_BITS) - 1;
- int color_reg_c_idx = mlx5_flow_get_reg_id(dev, MLX5_MTR_COLOR,
- 0, NULL);
- struct rte_flow_item_tag tag_spec = {
- .data = 0,
- .index = color_reg_c_idx
- };
- struct rte_flow_item_tag tag_mask = {
- .data = color_mask,
- .index = 0xff};
- struct rte_flow_item pattern[] = {
- [0] = {
- .type = (enum rte_flow_item_type)
- MLX5_RTE_FLOW_ITEM_TYPE_TAG,
- .spec = &tag_spec,
- .mask = &tag_mask,
- },
- [1] = { .type = RTE_FLOW_ITEM_TYPE_END }
- };
-
- if (!priv->mtr_policy_arr)
- return mlx5_flow_meter_policy_add(dev, policy_id, policy, error);
- mtr_policy = mlx5_flow_meter_policy_find(dev, policy_id, NULL);
- if (mtr_policy->initialized)
- return -rte_mtr_error_set(error, EEXIST,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
- NULL, "Meter policy already exists.");
- if (!policy ||
- (!policy->actions[RTE_COLOR_RED] &&
- !policy->actions[RTE_COLOR_YELLOW] &&
- !policy->actions[RTE_COLOR_GREEN]))
- return -rte_mtr_error_set(error, EINVAL,
- RTE_MTR_ERROR_TYPE_METER_POLICY,
- NULL, "Meter policy actions are not valid.");
- if (policy->actions[RTE_COLOR_RED] == RTE_FLOW_ACTION_TYPE_END)
- mtr_policy->skip_r = 1;
- if (policy->actions[RTE_COLOR_YELLOW] == RTE_FLOW_ACTION_TYPE_END)
- mtr_policy->skip_y = 1;
- if (policy->actions[RTE_COLOR_GREEN] == RTE_FLOW_ACTION_TYPE_END)
- mtr_policy->skip_g = 1;
- if (mtr_policy->skip_r && mtr_policy->skip_y && mtr_policy->skip_g)
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
- NULL, "Meter policy actions are empty.");
- for (i = 0; i < RTE_COLORS; i++) {
- act = policy->actions[i];
- while (act && act->type != RTE_FLOW_ACTION_TYPE_END) {
- switch (act->type) {
- case RTE_FLOW_ACTION_TYPE_PORT_ID:
- /* fall-through. */
- case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
- domain_color &= ~(MLX5_MTR_DOMAIN_INGRESS_BIT |
- MLX5_MTR_DOMAIN_EGRESS_BIT);
- break;
- case RTE_FLOW_ACTION_TYPE_RSS:
- is_rss = true;
- /* fall-through. */
- case RTE_FLOW_ACTION_TYPE_QUEUE:
- domain_color &= ~(MLX5_MTR_DOMAIN_EGRESS_BIT |
- MLX5_MTR_DOMAIN_TRANSFER_BIT);
- break;
- case RTE_FLOW_ACTION_TYPE_METER:
- is_hierarchy = true;
- mtr = act->conf;
- fm = mlx5_flow_meter_find(priv,
- mtr->mtr_id, NULL);
- if (!fm)
- return -rte_mtr_error_set(error, EINVAL,
- RTE_MTR_ERROR_TYPE_MTR_ID, NULL,
- "Meter not found in meter hierarchy.");
- plc = mlx5_flow_meter_policy_find(dev,
- fm->policy_id,
- NULL);
- MLX5_ASSERT(plc);
- domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
- (plc->ingress <<
- MLX5_MTR_DOMAIN_INGRESS);
- domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
- (plc->egress <<
- MLX5_MTR_DOMAIN_EGRESS);
- domain_color &= MLX5_MTR_ALL_DOMAIN_BIT &
- (plc->transfer <<
- MLX5_MTR_DOMAIN_TRANSFER);
- break;
- default:
- break;
- }
- act++;
- }
- }
- if (priv->sh->config.dv_esw_en)
- domain_color &= ~(MLX5_MTR_DOMAIN_EGRESS_BIT |
- MLX5_MTR_DOMAIN_TRANSFER_BIT);
- else
- domain_color &= ~MLX5_MTR_DOMAIN_TRANSFER_BIT;
- if (!domain_color)
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
- NULL, "Meter policy domains are conflicting.");
- mtr_policy->is_rss = is_rss;
- mtr_policy->ingress = !!(domain_color & MLX5_MTR_DOMAIN_INGRESS_BIT);
- pta.ingress = mtr_policy->ingress;
- mtr_policy->egress = !!(domain_color & MLX5_MTR_DOMAIN_EGRESS_BIT);
- pta.egress = mtr_policy->egress;
- mtr_policy->transfer = !!(domain_color & MLX5_MTR_DOMAIN_TRANSFER_BIT);
- pta.transfer = mtr_policy->transfer;
- mtr_policy->group = MLX5_FLOW_TABLE_HWS_POLICY - policy_id;
- mtr_policy->is_hierarchy = is_hierarchy;
- mtr_policy->initialized = 1;
- rte_spinlock_lock(&priv->hw_ctrl_lock);
- mtr_policy->hws_item_templ =
- rte_flow_pattern_template_create(dev->data->port_id,
- &pta, pattern, NULL);
- if (!mtr_policy->hws_item_templ)
- goto policy_add_err;
- for (i = 0; i < RTE_COLORS; i++) {
- if (mtr_policy->skip_g && i == RTE_COLOR_GREEN)
- continue;
- if (mtr_policy->skip_y && i == RTE_COLOR_YELLOW)
- continue;
- if (mtr_policy->skip_r && i == RTE_COLOR_RED)
- continue;
- mtr_policy->hws_act_templ[nb_colors] =
- rte_flow_actions_template_create(dev->data->port_id,
- &ata, policy->actions[i],
- policy->actions[i], NULL);
- if (!mtr_policy->hws_act_templ[nb_colors])
- goto policy_add_err;
- nb_colors++;
- }
- for (i = 0; i < MLX5_MTR_DOMAIN_MAX; i++) {
- memset(&ta, 0, sizeof(ta));
- ta.nb_flows = RTE_COLORS;
- ta.flow_attr.group = mtr_policy->group;
- if (i == MLX5_MTR_DOMAIN_INGRESS) {
- if (!mtr_policy->ingress)
- continue;
- ta.flow_attr.ingress = 1;
- } else if (i == MLX5_MTR_DOMAIN_EGRESS) {
- if (!mtr_policy->egress)
- continue;
- ta.flow_attr.egress = 1;
- } else if (i == MLX5_MTR_DOMAIN_TRANSFER) {
- if (!mtr_policy->transfer)
- continue;
- ta.flow_attr.transfer = 1;
- }
- mtr_policy->hws_flow_table[i] =
- rte_flow_template_table_create(dev->data->port_id,
- &ta, &mtr_policy->hws_item_templ, 1,
- mtr_policy->hws_act_templ, nb_colors,
- NULL);
- if (!mtr_policy->hws_flow_table[i])
- goto policy_add_err;
- nb_colors = 0;
- for (j = 0; j < RTE_COLORS; j++) {
- if (mtr_policy->skip_g && j == RTE_COLOR_GREEN)
- continue;
- if (mtr_policy->skip_y && j == RTE_COLOR_YELLOW)
- continue;
- if (mtr_policy->skip_r && j == RTE_COLOR_RED)
- continue;
- color = rte_col_2_mlx5_col((enum rte_color)j);
- tag_spec.data = color;
- mtr_policy->hws_flow_rule[i][j] =
- rte_flow_async_create(dev->data->port_id,
- CTRL_QUEUE_ID(priv), &op_attr,
- mtr_policy->hws_flow_table[i],
- pattern, 0, policy->actions[j],
- nb_colors, NULL, NULL);
- if (!mtr_policy->hws_flow_rule[i][j])
- goto policy_add_err;
- nb_colors++;
- nb_flows++;
- }
- ret = rte_flow_push(dev->data->port_id,
- CTRL_QUEUE_ID(priv), NULL);
- if (ret < 0)
- goto policy_add_err;
- while (nb_flows) {
- ret = rte_flow_pull(dev->data->port_id,
- CTRL_QUEUE_ID(priv), result,
- nb_flows, NULL);
- if (ret < 0)
- goto policy_add_err;
- for (j = 0; j < ret; j++) {
- if (result[j].status == RTE_FLOW_OP_ERROR)
- goto policy_add_err;
- }
- nb_flows -= ret;
- }
- }
- rte_spinlock_unlock(&priv->hw_ctrl_lock);
- return 0;
-policy_add_err:
- rte_spinlock_unlock(&priv->hw_ctrl_lock);
- ret = mlx5_flow_meter_policy_hws_delete(dev, policy_id, error);
- memset(mtr_policy, 0, sizeof(struct mlx5_flow_meter_policy));
- if (ret)
- return ret;
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_UNSPECIFIED,
- NULL, "Failed to create meter policy.");
-}
-#endif
/**
* Check meter validation.
*
@@ -1900,101 +1537,6 @@ error:
NULL, "Failed to create devx meter.");
}
-#if defined(HAVE_MLX5_HWS_SUPPORT)
-/**
- * Create meter rules.
- *
- * @param[in] dev
- * Pointer to Ethernet device.
- * @param[in] meter_id
- * Meter id.
- * @param[in] params
- * Pointer to rte meter parameters.
- * @param[in] shared
- * Meter shared with other flow or not.
- * @param[out] error
- * Pointer to rte meter error structure.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
- struct rte_mtr_params *params, int shared,
- struct rte_mtr_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5_flow_meter_profile *profile;
- struct mlx5_flow_meter_info *fm;
- struct mlx5_flow_meter_policy *policy = NULL;
- struct mlx5_aso_mtr *aso_mtr;
- struct mlx5_hw_q_job *job;
- int ret;
-
- if (!priv->mtr_profile_arr ||
- !priv->mtr_policy_arr ||
- !priv->mtr_bulk.aso)
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
- "Meter bulk array is not allocated.");
- /* Meter profile must exist. */
- profile = mlx5_flow_meter_profile_find(priv, params->meter_profile_id);
- if (!profile->initialized)
- return -rte_mtr_error_set(error, ENOENT,
- RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
- NULL, "Meter profile id not valid.");
- /* Meter policy must exist. */
- policy = mlx5_flow_meter_policy_find(dev,
- params->meter_policy_id, NULL);
- if (!policy->initialized)
- return -rte_mtr_error_set(error, ENOENT,
- RTE_MTR_ERROR_TYPE_METER_POLICY_ID,
- NULL, "Meter policy id not valid.");
- /* Meter ID must be valid. */
- if (meter_id >= priv->mtr_config.nb_meters)
- return -rte_mtr_error_set(error, EINVAL,
- RTE_MTR_ERROR_TYPE_MTR_ID,
- NULL, "Meter id not valid.");
- /* Find ASO object. */
- aso_mtr = mlx5_aso_meter_by_idx(priv, meter_id);
- fm = &aso_mtr->fm;
- if (fm->initialized)
- return -rte_mtr_error_set(error, ENOENT,
- RTE_MTR_ERROR_TYPE_MTR_ID,
- NULL, "Meter object already exists.");
- /* Fill the flow meter parameters. */
- fm->meter_id = meter_id;
- fm->policy_id = params->meter_policy_id;
- fm->profile = profile;
- fm->meter_offset = meter_id;
- fm->group = policy->group;
- /* Add to the flow meter list. */
- fm->active_state = 1; /* Config meter starts as active. */
- fm->is_enable = params->meter_enable;
- fm->shared = !!shared;
- fm->initialized = 1;
- /* Update ASO flow meter by wqe. */
- job = mlx5_flow_action_job_init(priv, MLX5_HW_INV_QUEUE, NULL, NULL,
- NULL, MLX5_HW_Q_JOB_TYPE_CREATE, NULL);
- if (!job)
- return -rte_mtr_error_set(error, ENOMEM,
- RTE_MTR_ERROR_TYPE_MTR_ID,
- NULL, "No job context.");
- ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE, aso_mtr,
- &priv->mtr_bulk, job, true);
- if (ret) {
- flow_hw_job_put(priv, job, CTRL_QUEUE_ID(priv));
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_UNSPECIFIED,
- NULL, "Failed to create devx meter.");
- }
- fm->active_state = params->meter_enable;
- __atomic_fetch_add(&fm->profile->ref_cnt, 1, __ATOMIC_RELAXED);
- __atomic_fetch_add(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
- return 0;
-}
-#endif
-
static int
mlx5_flow_meter_params_flush(struct rte_eth_dev *dev,
struct mlx5_flow_meter_info *fm,
@@ -2101,58 +1643,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
return 0;
}
-/**
- * Destroy meter rules.
- *
- * @param[in] dev
- * Pointer to Ethernet device.
- * @param[in] meter_id
- * Meter id.
- * @param[out] error
- * Pointer to rte meter error structure.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_flow_meter_hws_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
- struct rte_mtr_error *error)
-{
- struct mlx5_priv *priv = dev->data->dev_private;
- struct mlx5_aso_mtr *aso_mtr;
- struct mlx5_flow_meter_info *fm;
- struct mlx5_flow_meter_policy *policy;
-
- if (!priv->mtr_profile_arr ||
- !priv->mtr_policy_arr ||
- !priv->mtr_bulk.aso)
- return -rte_mtr_error_set(error, ENOTSUP,
- RTE_MTR_ERROR_TYPE_METER_POLICY, NULL,
- "Meter bulk array is not allocated.");
- /* Find ASO object. */
- aso_mtr = mlx5_aso_meter_by_idx(priv, meter_id);
- fm = &aso_mtr->fm;
- if (!fm->initialized)
- return -rte_mtr_error_set(error, ENOENT,
- RTE_MTR_ERROR_TYPE_MTR_ID,
- NULL, "Meter object id not valid.");
- /* Meter object must not have any owner. */
- if (fm->ref_cnt > 0)
- return -rte_mtr_error_set(error, EBUSY,
- RTE_MTR_ERROR_TYPE_UNSPECIFIED,
- NULL, "Meter object is being used.");
- /* Destroy the meter profile. */
- __atomic_fetch_sub(&fm->profile->ref_cnt,
- 1, __ATOMIC_RELAXED);
- /* Destroy the meter policy. */
- policy = mlx5_flow_meter_policy_find(dev,
- fm->policy_id, NULL);
- __atomic_fetch_sub(&policy->ref_cnt,
- 1, __ATOMIC_RELAXED);
- memset(fm, 0, sizeof(struct mlx5_flow_meter_info));
- return 0;
-}
-
/**
* Modify meter state.
*
@@ -2484,14 +1974,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
.meter_profile_add = mlx5_flow_meter_profile_hws_add,
.meter_profile_delete = mlx5_flow_meter_profile_hws_delete,
.meter_profile_get = mlx5_flow_meter_profile_get,
- .meter_policy_validate = mlx5_flow_meter_policy_hws_validate,
- .meter_policy_add = mlx5_flow_meter_policy_hws_add,
- .meter_policy_delete = mlx5_flow_meter_policy_hws_delete,
- .meter_policy_get = mlx5_flow_meter_policy_get,
- .create = mlx5_flow_meter_hws_create,
- .destroy = mlx5_flow_meter_hws_destroy,
- .meter_enable = mlx5_flow_meter_enable,
- .meter_disable = mlx5_flow_meter_disable,
.meter_profile_update = mlx5_flow_meter_profile_update,
.meter_dscp_table_update = NULL,
.stats_update = NULL,
@@ -2935,14 +2417,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
NULL, "MTR object meter profile invalid.");
}
}
- if (priv->mtr_bulk.aso) {
- for (i = 0; i < priv->mtr_config.nb_meters; i++) {
- aso_mtr = mlx5_aso_meter_by_idx(priv, i);
- fm = &aso_mtr->fm;
- if (fm->initialized)
- mlx5_flow_meter_hws_destroy(dev, i, error);
- }
- }
if (priv->policy_idx_tbl) {
MLX5_L3T_FOREACH(priv->policy_idx_tbl, i, entry) {
policy_idx = *(uint32_t *)entry;
@@ -2968,20 +2442,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
mlx5_l3t_destroy(priv->policy_idx_tbl);
priv->policy_idx_tbl = NULL;
}
-#if defined(HAVE_MLX5_HWS_SUPPORT)
- if (priv->mtr_policy_arr) {
- struct mlx5_flow_meter_policy *policy;
-
- for (i = 0; i < priv->mtr_config.nb_meter_policies; i++) {
- policy = mlx5_flow_meter_policy_find(dev, i,
- &policy_idx);
- if (policy->initialized) {
- mlx5_flow_meter_policy_hws_delete(dev, i,
- error);
- }
- }
- }
-#endif
if (priv->mtr_profile_tbl) {
MLX5_L3T_FOREACH(priv->mtr_profile_tbl, i, entry) {
fmp = entry;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.928431180 +0800
+++ 0025-net-mlx5-remove-unsupported-flow-meter-action-in-HWS.patch 2025-06-26 19:59:17.286418048 +0800
@@ -1 +1 @@
-From 645f240d1cd57d0be1b773c739a5845a7663eeed Mon Sep 17 00:00:00 2001
+From b8e4ed8c83f0e00a522b254f0f06d8704475af35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 645f240d1cd57d0be1b773c739a5845a7663eeed ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +20,2 @@
- drivers/net/mlx5/mlx5_flow_meter.c | 552 -----------------------------
- 2 files changed, 637 deletions(-)
+ drivers/net/mlx5/mlx5_flow_meter.c | 540 -----------------------------
+ 2 files changed, 625 deletions(-)
@@ -22 +24 @@
-index d58f3d10a1..281f23366f 100644
+index fac6c51f90..37011b9950 100644
@@ -25 +27 @@
-@@ -1795,35 +1795,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
+@@ -1468,35 +1468,6 @@ flow_hw_represented_port_compile(struct rte_eth_dev *dev,
@@ -61 +63 @@
-@@ -2545,7 +2516,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
+@@ -2159,7 +2130,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
@@ -69 +71 @@
-@@ -2813,27 +2783,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
+@@ -2422,27 +2392,6 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
@@ -95 +97 @@
- ret = flow_hw_translate_group(dev, cfg, attr->group,
+ flow_hw_translate_group(dev, cfg, attr->group,
@@ -97 +99 @@
-@@ -3521,7 +3470,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
+@@ -2992,7 +2941,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
@@ -103,3 +105,3 @@
- const struct rte_flow_action_nat64 *nat64_c = NULL;
- struct rte_flow_attr attr = {
-@@ -3694,28 +3642,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
+ uint8_t *buf = job->encap_data;
+ uint8_t *push_buf = job->push_data;
+@@ -3159,28 +3107,6 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
@@ -126,2 +128,2 @@
-- flow->jump = jump;
-- flow->flags |= MLX5_FLOW_HW_FLOW_FLAG_FATE_JUMP;
+- job->flow->jump = jump;
+- job->flow->fate_type = MLX5_FLOW_FATE_JUMP;
@@ -132 +133,0 @@
- aux = mlx5_flow_hw_aux(dev->data->port_id, flow);
@@ -134 +135,2 @@
-@@ -7345,10 +7271,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
+ /*
+@@ -5916,10 +5842,6 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
@@ -143,3 +145,3 @@
- ret = flow_hw_validate_action_meter_mark(dev, action, false, error);
- if (ret < 0)
-@@ -7676,13 +7598,6 @@ flow_hw_parse_flow_actions_to_dr_actions(struct rte_eth_dev *dev,
+ ret = flow_hw_validate_action_meter_mark(dev, action,
+ error);
+@@ -6225,13 +6147,6 @@ flow_hw_dr_actions_template_create(struct rte_eth_dev *dev,
@@ -160 +162 @@
-index dab3c4bf77..cd6a804593 100644
+index 1376533604..04617dacc4 100644
@@ -163 +165 @@
-@@ -1166,49 +1166,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
+@@ -841,45 +841,6 @@ mlx5_flow_meter_policy_validate(struct rte_eth_dev *dev,
@@ -192,4 +193,0 @@
-- if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
-- return -rte_mtr_error_set(error, EINVAL,
-- RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-- "non-template flow engine was not configured");
@@ -213 +211 @@
-@@ -1540,334 +1497,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
+@@ -1205,330 +1166,6 @@ mlx5_flow_meter_policy_get(struct rte_eth_dev *dev,
@@ -356,4 +353,0 @@
-- if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
-- return -rte_mtr_error_set(error, EINVAL,
-- RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-- "non-template flow engine was not configured");
@@ -548 +542 @@
-@@ -2239,105 +1868,6 @@ error:
+@@ -1900,101 +1537,6 @@ error:
@@ -583,4 +576,0 @@
-- if (mlx5_hws_active(dev) && !mlx5_hw_ctx_validate(dev, NULL))
-- return -rte_mtr_error_set(error, EINVAL,
-- RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-- "non-template flow engine was not configured");
@@ -645,2 +635,2 @@
-- rte_atomic_fetch_add_explicit(&fm->profile->ref_cnt, 1, rte_memory_order_relaxed);
-- rte_atomic_fetch_add_explicit(&policy->ref_cnt, 1, rte_memory_order_relaxed);
+- __atomic_fetch_add(&fm->profile->ref_cnt, 1, __ATOMIC_RELAXED);
+- __atomic_fetch_add(&policy->ref_cnt, 1, __ATOMIC_RELAXED);
@@ -654 +644 @@
-@@ -2444,58 +1974,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
+@@ -2101,58 +1643,6 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
@@ -699,2 +689,2 @@
-- rte_atomic_fetch_sub_explicit(&fm->profile->ref_cnt,
-- 1, rte_memory_order_relaxed);
+- __atomic_fetch_sub(&fm->profile->ref_cnt,
+- 1, __ATOMIC_RELAXED);
@@ -704,2 +694,2 @@
-- rte_atomic_fetch_sub_explicit(&policy->ref_cnt,
-- 1, rte_memory_order_relaxed);
+- __atomic_fetch_sub(&policy->ref_cnt,
+- 1, __ATOMIC_RELAXED);
@@ -713 +703 @@
-@@ -2835,14 +2313,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
+@@ -2484,14 +1974,6 @@ static const struct rte_mtr_ops mlx5_flow_mtr_hws_ops = {
@@ -728 +718 @@
-@@ -3286,14 +2756,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2935,14 +2417,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
@@ -743 +733 @@
-@@ -3319,20 +2781,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
+@@ -2968,20 +2442,6 @@ mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix maximal queue size query' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (24 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: remove unsupported flow meter action in HWS' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: fix mark action with shared Rx queue' " Xueming Li
` (58 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Viacheslav Ovsiienko
Cc: Xueming Li, Edwin Brossette, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=101a72d85868860c46e834db4c91a1a6f7d42749
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 101a72d85868860c46e834db4c91a1a6f7d42749 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 14 May 2025 10:55:30 +0300
Subject: [PATCH] net/mlx5: fix maximal queue size query
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc ]
The mlx5 PMD manages the device using two modes: the Verbs API
and the DevX API. Each API offers its own method for querying
the maximum work queue size (in descriptors).
The corrected patch enhanced the rte_eth_dev_info_get() API
support in mlx5 PMD to return the true maximum number of descriptors.
It also implemented a limit check during queue creation, but this
was applied only to "DevX mode." Consequently, the "Verbs mode"
was overlooked, leading to malfunction on legacy NICs that do
not support DevX.
This patch adds support for Verbs mode, and all limit checks are
updated accordingly.
Fixes: 4c3d7961d900 ("net/mlx5: fix reported Rx/Tx descriptor limits")
Reported-by: Edwin Brossette <edwin.brossette@6wind.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/common/mlx5/mlx5_prm.h | 1 +
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_devx.c | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 39 +++++++++++++++++++++++++++++----
drivers/net/mlx5/mlx5_rxq.c | 2 +-
drivers/net/mlx5/mlx5_trigger.c | 4 ++--
drivers/net/mlx5/mlx5_txq.c | 12 +++++-----
7 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 79533ff35a..d9e216b635 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -41,6 +41,7 @@
/* Hardware index widths. */
#define MLX5_CQ_INDEX_WIDTH 24
#define MLX5_WQ_INDEX_WIDTH 16
+#define MLX5_WQ_INDEX_MAX (1u << (MLX5_WQ_INDEX_WIDTH - 1))
/* WQE Segment sizes in bytes. */
#define MLX5_WSEG_SIZE 16u
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index a9129bf61b..75b822785b 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -2122,6 +2122,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
(((repr_id) >> 12) & 3)
uint16_t mlx5_representor_id_encode(const struct mlx5_switch_info *info,
enum rte_eth_representor_type hpf_type);
+uint16_t mlx5_dev_get_max_wq_size(struct mlx5_dev_ctx_shared *sh);
int mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info);
int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size);
const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 4f08ddf899..3f8fb9512b 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1527,7 +1527,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
wqe_size = RTE_ALIGN(wqe_size, MLX5_WQE_SIZE) / MLX5_WQE_SIZE;
/* Create Send Queue object with DevX. */
wqe_n = RTE_MIN((1UL << txq_data->elts_n) * wqe_size,
- (uint32_t)priv->sh->dev_cap.max_qp_wr);
+ (uint32_t)mlx5_dev_get_max_wq_size(priv->sh));
log_desc_n = log2above(wqe_n);
ret = mlx5_txq_create_devx_sq_resources(dev, idx, log_desc_n);
if (ret) {
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 8f29e58cda..4218aef032 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -306,6 +306,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->tx_desc_lim.nb_mtu_seg_max = nb_max;
}
+/**
+ * Get maximal work queue size in WQEs
+ *
+ * @param sh
+ * Pointer to the device shared context.
+ * @return
+ * Maximal number of WQEs in queue
+ */
+uint16_t
+mlx5_dev_get_max_wq_size(struct mlx5_dev_ctx_shared *sh)
+{
+ uint16_t max_wqe = MLX5_WQ_INDEX_MAX;
+
+ if (sh->cdev->config.devx) {
+ /* use HCA properties for DevX config */
+ MLX5_ASSERT(sh->cdev->config.hca_attr.log_max_wq_sz != 0);
+ MLX5_ASSERT(sh->cdev->config.hca_attr.log_max_wq_sz < MLX5_WQ_INDEX_WIDTH);
+ if (sh->cdev->config.hca_attr.log_max_wq_sz != 0 &&
+ sh->cdev->config.hca_attr.log_max_wq_sz < MLX5_WQ_INDEX_WIDTH)
+ max_wqe = 1u << sh->cdev->config.hca_attr.log_max_wq_sz;
+ } else {
+ /* use IB device capabilities */
+ MLX5_ASSERT(sh->dev_cap.max_qp_wr > 0);
+ MLX5_ASSERT((unsigned int)sh->dev_cap.max_qp_wr <= MLX5_WQ_INDEX_MAX);
+ if (sh->dev_cap.max_qp_wr > 0 &&
+ (uint32_t)sh->dev_cap.max_qp_wr <= MLX5_WQ_INDEX_MAX)
+ max_wqe = (uint16_t)sh->dev_cap.max_qp_wr;
+ }
+ return max_wqe;
+}
+
/**
* DPDK callback to get information about the device.
*
@@ -319,6 +350,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
{
struct mlx5_priv *priv = dev->data->dev_private;
unsigned int max;
+ uint16_t max_wqe;
/* FIXME: we should ask the device for these values. */
info->min_rx_bufsize = 32;
@@ -351,10 +383,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->flow_type_rss_offloads = ~MLX5_RSS_HF_MASK;
mlx5_set_default_params(dev, info);
mlx5_set_txlimit_params(dev, info);
- info->rx_desc_lim.nb_max =
- 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
- info->tx_desc_lim.nb_max =
- 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz;
+ max_wqe = mlx5_dev_get_max_wq_size(priv->sh);
+ info->rx_desc_lim.nb_max = max_wqe;
+ info->tx_desc_lim.nb_max = max_wqe;
if (priv->sh->cdev->config.hca_attr.mem_rq_rmp &&
priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 7b377974d3..aa8e9316af 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -655,7 +655,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
struct mlx5_rxq_priv *rxq;
bool empty;
- if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+ if (*desc > mlx5_dev_get_max_wq_size(priv->sh)) {
DRV_LOG(ERR,
"port %u number of descriptors requested for Rx queue"
" %u is more than supported",
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index a4887a8d20..a61128ec21 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -215,8 +215,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
/* Should not release Rx queues but return immediately. */
return -rte_errno;
}
- DRV_LOG(DEBUG, "Port %u dev_cap.max_qp_wr is %d.",
- dev->data->port_id, priv->sh->dev_cap.max_qp_wr);
+ DRV_LOG(DEBUG, "Port %u max work queue size is %d.",
+ dev->data->port_id, mlx5_dev_get_max_wq_size(priv->sh));
DRV_LOG(DEBUG, "Port %u dev_cap.max_sge is %d.",
dev->data->port_id, priv->sh->dev_cap.max_sge);
for (i = 0; i != priv->rxqs_n; ++i) {
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 52a39ae073..0905570f1a 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -332,7 +332,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
{
struct mlx5_priv *priv = dev->data->dev_private;
- if (*desc > 1 << priv->sh->cdev->config.hca_attr.log_max_wq_sz) {
+ if (*desc > mlx5_dev_get_max_wq_size(priv->sh)) {
DRV_LOG(ERR,
"port %u number of descriptors requested for Tx queue"
" %u is more than supported",
@@ -726,7 +726,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
struct mlx5_priv *priv = txq_ctrl->priv;
unsigned int wqe_size;
- wqe_size = priv->sh->dev_cap.max_qp_wr / desc;
+ wqe_size = mlx5_dev_get_max_wq_size(priv->sh) / desc;
if (!wqe_size)
return 0;
/*
@@ -1081,6 +1081,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
{
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_txq_ctrl *tmpl;
+ uint16_t max_wqe;
tmpl = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, sizeof(*tmpl) +
desc * sizeof(struct rte_mbuf *), 0, socket);
@@ -1106,13 +1107,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
txq_set_params(tmpl);
if (txq_adjust_params(tmpl))
goto error;
- if (txq_calc_wqebb_cnt(tmpl) >
- priv->sh->dev_cap.max_qp_wr) {
+ max_wqe = mlx5_dev_get_max_wq_size(priv->sh);
+ if (txq_calc_wqebb_cnt(tmpl) > max_wqe) {
DRV_LOG(ERR,
"port %u Tx WQEBB count (%d) exceeds the limit (%d),"
" try smaller queue size",
- dev->data->port_id, txq_calc_wqebb_cnt(tmpl),
- priv->sh->dev_cap.max_qp_wr);
+ dev->data->port_id, txq_calc_wqebb_cnt(tmpl), max_wqe);
rte_errno = ENOMEM;
goto error;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:18.980412677 +0800
+++ 0026-net-mlx5-fix-maximal-queue-size-query.patch 2025-06-26 19:59:17.302418047 +0800
@@ -1 +1 @@
-From 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc Mon Sep 17 00:00:00 2001
+From 101a72d85868860c46e834db4c91a1a6f7d42749 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9de8acd30d5adfc5b9703d15a3e1babc7d4ddacc ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index 742c274a85..7accdeab87 100644
+index 79533ff35a..d9e216b635 100644
@@ -49 +51 @@
-index 36f11b9c51..5695d0f54a 100644
+index a9129bf61b..75b822785b 100644
@@ -52 +54 @@
-@@ -2303,6 +2303,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
+@@ -2122,6 +2122,7 @@ int mlx5_representor_info_get(struct rte_eth_dev *dev,
@@ -59 +61 @@
- const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev,
+ const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -61 +63 @@
-index a12891a983..9711746edb 100644
+index 4f08ddf899..3f8fb9512b 100644
@@ -64 +66 @@
-@@ -1593,7 +1593,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1527,7 +1527,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
@@ -74 +76 @@
-index 7708a0b808..a50320075c 100644
+index 8f29e58cda..4218aef032 100644
@@ -77 +79 @@
-@@ -314,6 +314,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -306,6 +306,37 @@ mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -115 +117 @@
-@@ -327,6 +358,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -319,6 +350,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -123 +125 @@
-@@ -359,10 +391,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -351,10 +383,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -138 +140 @@
-index ab29b43875..b676e5394b 100644
+index 7b377974d3..aa8e9316af 100644
@@ -141 +143 @@
-@@ -656,7 +656,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
+@@ -655,7 +655,7 @@ mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc,
@@ -151 +153 @@
-index 4ee44e9165..8145ad4233 100644
+index a4887a8d20..a61128ec21 100644
@@ -154 +156 @@
-@@ -217,8 +217,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
+@@ -215,8 +215,8 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
@@ -166 +168 @@
-index ddd3a66282..5fee5bc4e8 100644
+index 52a39ae073..0905570f1a 100644
@@ -169 +171 @@
-@@ -334,7 +334,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
+@@ -332,7 +332,7 @@ mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
@@ -178 +180 @@
-@@ -728,7 +728,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -726,7 +726,7 @@ txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
@@ -187 +189 @@
-@@ -1054,6 +1054,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1081,6 +1081,7 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -195,2 +197 @@
-@@ -1078,13 +1079,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
- tmpl->txq.idx = idx;
+@@ -1106,13 +1107,12 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
@@ -198 +199,2 @@
- txq_adjust_params(tmpl);
+ if (txq_adjust_params(tmpl))
+ goto error;
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix mark action with shared Rx queue' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (25 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: fix maximal queue size query' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " Xueming Li
` (57 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Xueming Li, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0a07a5c4dcf0ffa2040f101e4dcc42282e635098
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0a07a5c4dcf0ffa2040f101e4dcc42282e635098 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 14 May 2025 10:50:18 +0300
Subject: [PATCH] net/mlx5: fix mark action with shared Rx queue
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 28eeca69eb1d9bebb0105e47c82885b0a8403654 ]
Fix the assignment of the mark_flag in the shared Rx queue setup
in mlx5_flow_rxq_dynf_set(). Previously, mark_flag was not set
correctly in all cases, which could lead to incorrect flow mark
action behavior when configuring shared Rx queues.
Fixes: 2d8763432add ("net/mlx5: fix shared Rx queue data access race")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bca16a916b..229c55b536 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1965,8 +1965,8 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
data->flow_meta_offset = rte_flow_dynf_metadata_offs;
data->flow_meta_port_mask = priv->sh->dv_meta_mask;
}
- data->mark_flag = mark_flag;
}
+ data->mark_flag = mark_flag;
}
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.021073576 +0800
+++ 0027-net-mlx5-fix-mark-action-with-shared-Rx-queue.patch 2025-06-26 19:59:17.314418047 +0800
@@ -1 +1 @@
-From 28eeca69eb1d9bebb0105e47c82885b0a8403654 Mon Sep 17 00:00:00 2001
+From 0a07a5c4dcf0ffa2040f101e4dcc42282e635098 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 28eeca69eb1d9bebb0105e47c82885b0a8403654 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 8696cc4e95..3d49a2d833 100644
+index bca16a916b..229c55b536 100644
@@ -24 +26 @@
-@@ -1866,8 +1866,8 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
+@@ -1965,8 +1965,8 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: align PF and VF/SF MAC address handling' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (26 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: fix mark action with shared Rx queue' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/sfc: fix action order on start failure' " Xueming Li
` (56 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Gavin Li; +Cc: Xueming Li, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c070455e8bd61847c8ac80f1e46162b36653a4ab
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c070455e8bd61847c8ac80f1e46162b36653a4ab Mon Sep 17 00:00:00 2001
From: Gavin Li <gavinl@nvidia.com>
Date: Fri, 16 May 2025 10:10:32 +0300
Subject: [PATCH] net/mlx5: align PF and VF/SF MAC address handling
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]
In the mlx5_dev_spawn function, the Virtual Function (VF) synchronizes MAC
addresses from the kernel using netlink. It queries the netdev-configured
MACs and populates the list in the PMD device data, including multicast
MAC addresses. These addresses are later used for control flow creation,
allowing traffic for the listed MACs to be received. However, the Physical
Function (PF) does not synchronize with the kernel and thus does not add
any multicast MAC address rules when enabling traffic. This discrepancy
causes the IFF_ALLMULTI ioctl code to malfunction, as it fails to disable
all multicast traffic, leaving the VF still able to see it.
To align PF and VF behavior, only unicast MAC address flows should be
added.
Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 3 ++-
drivers/net/mlx5/mlx5_trigger.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index fdc4dc1cf8..c6e5e7b425 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1562,7 +1562,8 @@ err_secondary:
eth_dev->rx_queue_count = mlx5_rx_queue_count;
/* Register MAC address. */
claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
- if (sh->dev_cap.vf && sh->config.vf_nl_en)
+ /* Sync mac addresses for PF or VF/SF if vf_nl_en is true */
+ if ((!sh->dev_cap.vf && !sh->dev_cap.sf) || sh->config.vf_nl_en)
mlx5_nl_mac_addr_sync(priv->nl_socket_route,
mlx5_ifindex(eth_dev),
eth_dev->data->mac_addrs,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index a61128ec21..6643fe7eea 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {
struct rte_ether_addr *mac = &dev->data->mac_addrs[i];
- if (!memcmp(mac, &cmp, sizeof(*mac)))
+ if (!memcmp(mac, &cmp, sizeof(*mac)) || rte_is_multicast_ether_addr(mac))
continue;
memcpy(&unicast.hdr.dst_addr.addr_bytes,
mac->addr_bytes,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.058595974 +0800
+++ 0028-net-mlx5-align-PF-and-VF-SF-MAC-address-handling.patch 2025-06-26 19:59:17.318418047 +0800
@@ -1 +1 @@
-From 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a Mon Sep 17 00:00:00 2001
+From c070455e8bd61847c8ac80f1e46162b36653a4ab Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 573e846ed2..696a3e12c7 100644
+index fdc4dc1cf8..c6e5e7b425 100644
@@ -33 +35 @@
-@@ -1603,7 +1603,8 @@ err_secondary:
+@@ -1562,7 +1562,8 @@ err_secondary:
@@ -44 +46 @@
-index 8145ad4233..485984f9b0 100644
+index a61128ec21..6643fe7eea 100644
@@ -47 +49 @@
-@@ -1714,7 +1714,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
+@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/sfc: fix action order on start failure' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (27 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/mlx5: align PF and VF/SF MAC address handling' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/nfp: fix crash with null RSS hash key' " Xueming Li
` (55 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Ivan Malov; +Cc: Xueming Li, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=824de2d5c20be437592624ccc7698f7a5f170514
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 824de2d5c20be437592624ccc7698f7a5f170514 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@arknetworks.am>
Date: Tue, 18 Mar 2025 14:53:49 +0400
Subject: [PATCH] net/sfc: fix action order on start failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 66dced1537734f9ca0616a90f748140168e93868 ]
Having incorrect order leads to an assert in efx_nic_fini().
Fixes: bc712f1c86fc ("net/sfc: support attaching to HW table")
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton@amd.com>
---
drivers/net/sfc/sfc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 2cfff20f47..938c967430 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -530,12 +530,12 @@ fail_tx_start:
fail_rx_start:
sfc_port_stop(sa);
-fail_tbls_start:
- sfc_ev_stop(sa);
-
fail_port_start:
sfc_tbls_stop(sa);
+fail_tbls_start:
+ sfc_ev_stop(sa);
+
fail_ev_start:
sfc_intr_stop(sa);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.092810973 +0800
+++ 0029-net-sfc-fix-action-order-on-start-failure.patch 2025-06-26 19:59:17.322418047 +0800
@@ -1 +1 @@
-From 66dced1537734f9ca0616a90f748140168e93868 Mon Sep 17 00:00:00 2001
+From 824de2d5c20be437592624ccc7698f7a5f170514 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 66dced1537734f9ca0616a90f748140168e93868 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/nfp: fix crash with null RSS hash key' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (28 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/sfc: fix action order on start failure' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/nfp: fix hash key length logic' " Xueming Li
` (54 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Chaoyong He; +Cc: Xueming Li, Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a014d3730ea54d08723d970e670eae5c56472217
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a014d3730ea54d08723d970e670eae5c56472217 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 1 Apr 2025 15:55:07 +0800
Subject: [PATCH] net/nfp: fix crash with null RSS hash key
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 53df26286e4570ea328c5972fb244d8bc0008315 ]
Some testpmd application commands will use 'rss_conf->rss_key'
parameter with a NULL value to call 'rte_eth_dev_rss_hash_conf_get()'
API, and NFP PMD will coredump at these situations.
Fix this by add a check about the 'rss_conf->rss_key' pointer.
Fixes: 934e4c60fbff ("nfp: add RSS")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_net_common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index bf44373b26..61a3685e2f 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -1820,9 +1820,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
rss_conf->rss_key_len = nn_cfg_readl(hw, NFP_NET_CFG_RSS_KEY_SZ);
/* Reading the key byte a byte */
- for (i = 0; i < rss_conf->rss_key_len; i++) {
- key = nn_cfg_readb(hw, NFP_NET_CFG_RSS_KEY + i);
- memcpy(&rss_conf->rss_key[i], &key, 1);
+ if (rss_conf->rss_key != NULL) {
+ for (i = 0; i < rss_conf->rss_key_len; i++) {
+ key = nn_cfg_readb(hw, NFP_NET_CFG_RSS_KEY + i);
+ memcpy(&rss_conf->rss_key[i], &key, 1);
+ }
}
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.123706571 +0800
+++ 0030-net-nfp-fix-crash-with-null-RSS-hash-key.patch 2025-06-26 19:59:17.326418046 +0800
@@ -1 +1 @@
-From 53df26286e4570ea328c5972fb244d8bc0008315 Mon Sep 17 00:00:00 2001
+From a014d3730ea54d08723d970e670eae5c56472217 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 53df26286e4570ea328c5972fb244d8bc0008315 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index aaa515bac2..600fcd5c0e 100644
+index bf44373b26..61a3685e2f 100644
@@ -26 +28 @@
-@@ -2062,9 +2062,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -1820,9 +1820,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/nfp: fix hash key length logic' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (29 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/nfp: fix crash with null RSS hash key' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'app/testpmd: fix RSS hash key update' " Xueming Li
` (53 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Chaoyong He; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=26f6134cfee6e64f1da5a446bf7b975f88894983
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 26f6134cfee6e64f1da5a446bf7b975f88894983 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 1 Apr 2025 07:09:31 -0700
Subject: [PATCH] net/nfp: fix hash key length logic
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 346a007e161e68950acbf59984fefc2bb6fe3982 ]
There does not exist an API for driver to get/set the hash key length
from/to the firmware.
---
drivers/net/nfp/nfp_net_common.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 61a3685e2f..b0ccd2fcab 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -1724,9 +1724,6 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev,
/* Configuring where to apply the RSS hash */
nn_cfg_writel(hw, NFP_NET_CFG_RSS_CTRL, cfg_rss_ctrl);
- /* Writing the key size */
- nn_cfg_writeb(hw, NFP_NET_CFG_RSS_KEY_SZ, rss_conf->rss_key_len);
-
return 0;
}
@@ -1817,7 +1814,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
rss_conf->rss_hf = rss_hf;
/* Reading the key size */
- rss_conf->rss_key_len = nn_cfg_readl(hw, NFP_NET_CFG_RSS_KEY_SZ);
+ rss_conf->rss_key_len = NFP_NET_CFG_RSS_KEY_SZ;
/* Reading the key byte a byte */
if (rss_conf->rss_key != NULL) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.154149770 +0800
+++ 0031-net-nfp-fix-hash-key-length-logic.patch 2025-06-26 19:59:17.330418046 +0800
@@ -1 +1 @@
-From 346a007e161e68950acbf59984fefc2bb6fe3982 Mon Sep 17 00:00:00 2001
+From 26f6134cfee6e64f1da5a446bf7b975f88894983 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 346a007e161e68950acbf59984fefc2bb6fe3982 ]
@@ -9,15 +11,0 @@
- #define NFP_NET_CFG_RSS_KEY_SZ 0x28
- #define NFP_NET_CFG_MACADDR 0x0024
----
-
-The original logic try to use the 'NFP_NET_CFG_RSS_KEY_SZ' as the
-inexistent API, read from this address will get wrong hash key length
-and write to this address will overwrite the MAC address unexpected,
-which will cause very strange problem.
-
-Fixes: 934e4c60fbff ("nfp: add RSS")
-Cc: stable@dpdk.org
-
-Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
-Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
----
@@ -28 +16 @@
-index 600fcd5c0e..df89595773 100644
+index 61a3685e2f..b0ccd2fcab 100644
@@ -31 +19 @@
-@@ -1966,9 +1966,6 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev,
+@@ -1724,9 +1724,6 @@ nfp_net_rss_hash_write(struct rte_eth_dev *dev,
@@ -41 +29 @@
-@@ -2059,7 +2056,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -1817,7 +1814,7 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'app/testpmd: fix RSS hash key update' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (30 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/nfp: fix hash key length logic' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " Xueming Li
` (52 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Chaoyong He; +Cc: Xueming Li, Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=31817dc08ead234519e36e00a40e968c2669d499
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 31817dc08ead234519e36e00a40e968c2669d499 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 1 Apr 2025 15:48:36 +0800
Subject: [PATCH] app/testpmd: fix RSS hash key update
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f ]
There has logic problem in 'port_rss_hash_key_update()', the user input
will be overwritten by the call to 'rte_eth_dev_rss_hash_conf_get()',
so the RSS functions will not get update as expected.
------
testpmd> show port 0 rss-hash key
RSS functions:
ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd> port config 0 rss-hash-key ipv6-tcp 6D5A56DA255B0EC24167253D
43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B73BBEAC01FA
testpmd> show port 0 rss-hash key
RSS functions:
ipv4 ipv6
RSS key:
6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F20C6A42B7
3BBEAC01FA
testpmd>
------
Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
app/test-pmd/config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a70086c85a..25a4ec04a4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4546,11 +4546,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
rss_conf.rss_key = NULL;
rss_conf.rss_key_len = 0;
- rss_conf.rss_hf = str_to_rsstypes(rss_type);
+ rss_conf.rss_hf = 0;
diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
if (diag == 0) {
rss_conf.rss_key = hash_key;
rss_conf.rss_key_len = hash_key_len;
+ rss_conf.rss_hf = str_to_rsstypes(rss_type);
diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
}
if (diag == 0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.184479169 +0800
+++ 0032-app-testpmd-fix-RSS-hash-key-update.patch 2025-06-26 19:59:17.338418046 +0800
@@ -1 +1 @@
-From 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f Mon Sep 17 00:00:00 2001
+From 31817dc08ead234519e36e00a40e968c2669d499 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 24e94a4c86c52f45a7a7c139e4e8484f3afe6d8f ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index e89af21cec..c32e011fa6 100644
+index a70086c85a..25a4ec04a4 100644
@@ -42 +44 @@
-@@ -4806,11 +4806,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
+@@ -4546,11 +4546,12 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/af_xdp: fix use after free in zero-copy Tx' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (31 preceding siblings ...)
2025-06-26 12:00 ` patch 'app/testpmd: fix RSS hash key update' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " Xueming Li
` (51 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Ariel Otilibili; +Cc: Xueming Li, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c8e1da2dc3c718f37d5609ef1b01bf8d2be6a339
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c8e1da2dc3c718f37d5609ef1b01bf8d2be6a339 Mon Sep 17 00:00:00 2001
From: Ariel Otilibili <ariel.otilibili@6wind.com>
Date: Wed, 26 Feb 2025 21:08:40 +0100
Subject: [PATCH] net/af_xdp: fix use after free in zero-copy Tx
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a23bf7fde78b10afbbafda252f15495b26e010a9 ]
tx_bytes is computed after both legs are tested. This might
produce a use after memory free.
The computation is now moved into each leg.
Bugzilla ID: 1440
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 74f750dbb3..668b184b94 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -570,6 +570,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
umem->mb_pool->header_size;
offset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;
desc->addr = addr | offset;
+ tx_bytes += desc->len;
count++;
} else {
struct rte_mbuf *local_mbuf =
@@ -597,11 +598,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
desc->addr = addr | offset;
rte_memcpy(pkt, rte_pktmbuf_mtod(mbuf, void *),
desc->len);
+ tx_bytes += desc->len;
rte_pktmbuf_free(mbuf);
count++;
}
-
- tx_bytes += mbuf->pkt_len;
}
out:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.218817167 +0800
+++ 0033-net-af_xdp-fix-use-after-free-in-zero-copy-Tx.patch 2025-06-26 19:59:17.338418046 +0800
@@ -1 +1 @@
-From a23bf7fde78b10afbbafda252f15495b26e010a9 Mon Sep 17 00:00:00 2001
+From c8e1da2dc3c718f37d5609ef1b01bf8d2be6a339 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a23bf7fde78b10afbbafda252f15495b26e010a9 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +19,0 @@
- .mailmap | 2 +-
@@ -20 +21 @@
- 2 files changed, 3 insertions(+), 3 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -22,13 +22,0 @@
-diff --git a/.mailmap b/.mailmap
-index 4b781bd3fb..822936f615 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -135,7 +135,7 @@ Anupam Kapoor <anupam.kapoor@gmail.com>
- Apeksha Gupta <apeksha.gupta@nxp.com>
- Archana Muniganti <marchana@marvell.com> <muniganti.archana@caviumnetworks.com>
- Archit Pandey <architpandeynitk@gmail.com>
--Ariel Otilibili <otilibil@eurecom.fr> <ariel.otilibili@6wind.com>
-+Ariel Otilibili <ariel.otilibili@6wind.com> <otilibil@eurecom.fr>
- Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
- Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
- Arnaud Fiorini <arnaud.fiorini@polymtl.ca>
@@ -36 +24 @@
-index 814398ba4b..092bcb73aa 100644
+index 74f750dbb3..668b184b94 100644
@@ -39 +27 @@
-@@ -574,6 +574,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -570,6 +570,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -47 +35 @@
-@@ -601,11 +602,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -597,11 +598,10 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix integer overflow in interrupt unmap' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (32 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/af_xdp: fix use after free in zero-copy Tx' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak on failure' " Xueming Li
` (50 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ff9d3eb7f885b2e557e221c52b79c4d15a2d04c2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ff9d3eb7f885b2e557e221c52b79c4d15a2d04c2 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:54 +0800
Subject: [PATCH] net/hns3: fix integer overflow in interrupt unmap
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e401c04481c7a6a4199504d6f4696c48620ff093 ]
The number of interrupt vector may exceed the range of uint8_t.
So hns3_unmap_rx_interrupt() should use uint16_t for 'vec' variable.
Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 7a36673c95..9497e13f60 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -834,8 +834,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_hw *hw = &hns->hw;
- uint8_t base = RTE_INTR_VEC_ZERO_OFFSET;
- uint8_t vec = RTE_INTR_VEC_ZERO_OFFSET;
+ uint16_t base = RTE_INTR_VEC_ZERO_OFFSET;
+ uint16_t vec = RTE_INTR_VEC_ZERO_OFFSET;
uint16_t q_id;
if (dev->data->dev_conf.intr_conf.rxq == 0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.251063166 +0800
+++ 0034-net-hns3-fix-integer-overflow-in-interrupt-unmap.patch 2025-06-26 19:59:17.342418046 +0800
@@ -1 +1 @@
-From e401c04481c7a6a4199504d6f4696c48620ff093 Mon Sep 17 00:00:00 2001
+From ff9d3eb7f885b2e557e221c52b79c4d15a2d04c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e401c04481c7a6a4199504d6f4696c48620ff093 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 25a45212be..dc70bf3cff 100644
+index 7a36673c95..9497e13f60 100644
@@ -21 +23 @@
-@@ -882,8 +882,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
+@@ -834,8 +834,8 @@ hns3_unmap_rx_interrupt(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix memory leak on failure' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (33 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix integer overflow in interrupt unmap' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix extra wait for link up' " Xueming Li
` (49 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bee4d0630908981173a4d6ca8ee174041e03d711
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From bee4d0630908981173a4d6ca8ee174041e03d711 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:55 +0800
Subject: [PATCH] net/hns3: fix memory leak on failure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 1c27385dcef1384a1a10edd86bb843b06547b161 ]
When the hns3_dfx_reg_fetch_data() function returns from processing
failure, cmd_descs is not freed, which leads to leakage.
This patch fit it.
By the way, this patch uses calloc to apply for heap memory instead
of hugepage memory.
Fixes: ef1fbd355451 ("net/hns3: add more registers to dump")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_regs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 8c0c0a3027..c8b251ead8 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -444,7 +444,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
for (i = 0; i < opcode_num; i++)
max_bd_num = RTE_MAX(bd_num_list[i], max_bd_num);
- cmd_descs = rte_zmalloc(NULL, sizeof(*cmd_descs) * max_bd_num, 0);
+ cmd_descs = calloc(max_bd_num, sizeof(*cmd_descs));
if (cmd_descs == NULL)
return -ENOMEM;
@@ -457,8 +457,9 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
if (ret)
break;
reg_val += hns3_dfx_reg_fetch_data(cmd_descs, bd_num, reg_val);
+ free(cmd_descs);
}
- rte_free(cmd_descs);
+ free(cmd_descs);
*data = (void *)reg_val;
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.281190965 +0800
+++ 0035-net-hns3-fix-memory-leak-on-failure.patch 2025-06-26 19:59:17.342418046 +0800
@@ -1 +1 @@
-From 1c27385dcef1384a1a10edd86bb843b06547b161 Mon Sep 17 00:00:00 2001
+From bee4d0630908981173a4d6ca8ee174041e03d711 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1c27385dcef1384a1a10edd86bb843b06547b161 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 8a6ddbfe8c..5c74f9ae2e 100644
+index 8c0c0a3027..c8b251ead8 100644
@@ -25 +27 @@
-@@ -1270,7 +1270,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, struct rte_dev_reg_info *regs, uint32_t mo
+@@ -444,7 +444,7 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
@@ -34,4 +36,4 @@
-@@ -1290,13 +1290,14 @@ hns3_get_dfx_regs(struct hns3_hw *hw, struct rte_dev_reg_info *regs, uint32_t mo
- if (regs_num != hns3_reg_lists[i].entry_num) {
- hns3_err(hw, "Query register number differ from the list for module %s!",
- hns3_get_name_by_module(i));
+@@ -457,8 +457,9 @@ hns3_get_dfx_regs(struct hns3_hw *hw, void **data)
+ if (ret)
+ break;
+ reg_val += hns3_dfx_reg_fetch_data(cmd_descs, bd_num, reg_val);
@@ -39,5 +40,0 @@
- return -EINVAL;
- }
- hns3_fill_dfx_regs_name(hw, regs, hns3_reg_lists[i].reg_list, regs_num);
- regs->length += regs_num;
- data += regs_num;
@@ -46,0 +44 @@
+ *data = (void *)reg_val;
@@ -49 +46,0 @@
- }
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix extra wait for link up' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (34 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak on failure' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak for indirect flow action' " Xueming Li
` (48 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b243653db6b53c00cce7a850c3e95eff145fb340
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b243653db6b53c00cce7a850c3e95eff145fb340 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:56 +0800
Subject: [PATCH] net/hns3: fix extra wait for link up
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 ]
If the link auto-negotiation of the NIC is disabled,
or the flow control auto-negotiation is not supported,
it's unnecessary to wait for link establishment.
Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index dd450cddaa..f2020aafbd 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5308,12 +5308,6 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct hns3_mac *mac = &hw->mac;
- /*
- * When the flow control mode is obtained, the device may not complete
- * auto-negotiation. It is necessary to wait for link establishment.
- */
- (void)hns3_dev_link_update(dev, 1);
-
/*
* If the link auto-negotiation of the nic is disabled, or the flow
* control auto-negotiation is not supported, the forced flow control
@@ -5322,6 +5316,12 @@ hns3_get_current_fc_mode(struct rte_eth_dev *dev)
if (mac->link_autoneg == 0 || !pf->support_fc_autoneg)
return hw->requested_fc_mode;
+ /*
+ * When the flow control mode is obtained, the device may not complete
+ * auto-negotiation. It is necessary to wait for link establishment.
+ */
+ (void)hns3_dev_link_update(dev, 1);
+
return hns3_get_autoneg_fc_mode(hw);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.311328964 +0800
+++ 0036-net-hns3-fix-extra-wait-for-link-up.patch 2025-06-26 19:59:17.350418045 +0800
@@ -1 +1 @@
-From 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 Mon Sep 17 00:00:00 2001
+From b243653db6b53c00cce7a850c3e95eff145fb340 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7c8cbd3c8ae0cec66fbd5acb89a62ee9742c70b4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9f7119b734..20ad249b8b 100644
+index dd450cddaa..f2020aafbd 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix memory leak for indirect flow action' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (35 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix extra wait for link up' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix interrupt rollback' " Xueming Li
` (47 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=58f5aa2d977c5b1fc1a478a754f5239b608df87d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 58f5aa2d977c5b1fc1a478a754f5239b608df87d Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:57 +0800
Subject: [PATCH] net/hns3: fix memory leak for indirect flow action
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 18596f7be8f93e159e98704af12b1cc8af289dd6 ]
Currently, when the application creates an indirect action,
the hns3 driver allocates a memory for the structure
rte_flow_action_handle and returns this structure pointer to
application. When the application invokes the destroy function
to destroy the indirect action, the driver releases the memory.
However, when the application destroys all flows by using the
flush function before destroying the indirect action, the memory
is not released. This patch fix it by using uint64_t instead of
rte_flow_action_handle* to store indirect action avoids memory
leakage.
Fixes: fdfcb94d8fb3 ("net/hns3: support indirect counter flow action")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 41 ++++++++++++++++--------------------
drivers/net/hns3/hns3_flow.h | 9 ++++++--
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index db318854af..b5a46e5ff1 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -470,19 +470,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
struct hns3_fdir_rule *rule,
struct rte_flow_error *error)
{
- const struct rte_flow_action_handle *indir = action->conf;
+ struct rte_flow_action_handle indir;
- if (indir->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT)
+ indir.val64 = (uint64_t)action->conf;
+ if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
action, "Invalid indirect type");
- if (hns3_counter_lookup(dev, indir->counter_id) == NULL)
+ if (hns3_counter_lookup(dev, indir.counter_id) == NULL)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
action, "Counter id not exist");
- rule->act_cnt.id = indir->counter_id;
+ rule->act_cnt.id = indir.counter_id;
rule->flags |= (HNS3_RULE_FLAG_COUNTER | HNS3_RULE_FLAG_COUNTER_INDIR);
return 0;
@@ -2548,20 +2549,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
const struct rte_flow_action_count *act_count;
- struct rte_flow_action_handle *handle = NULL;
+ struct rte_flow_action_handle handle;
struct hns3_flow_counter *counter;
if (hns3_check_indir_action(conf, action, error))
return NULL;
- handle = rte_zmalloc("hns3 action handle",
- sizeof(struct rte_flow_action_handle), 0);
- if (handle == NULL) {
- rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
- NULL, "Failed to allocate action memory");
- return NULL;
- }
-
pthread_mutex_lock(&hw->flows_lock);
act_count = (const struct rte_flow_action_count *)action->conf;
@@ -2584,15 +2577,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
}
counter->indirect = true;
- handle->indirect_type = HNS3_INDIRECT_ACTION_TYPE_COUNT;
- handle->counter_id = counter->id;
+ handle.indirect_type = HNS3_INDIRECT_ACTION_TYPE_COUNT;
+ handle.counter_id = counter->id;
pthread_mutex_unlock(&hw->flows_lock);
- return handle;
+ return (struct rte_flow_action_handle *)handle.val64;
err_exit:
pthread_mutex_unlock(&hw->flows_lock);
- rte_free(handle);
return NULL;
}
@@ -2602,18 +2594,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_flow_action_handle indir;
struct hns3_flow_counter *counter;
pthread_mutex_lock(&hw->flows_lock);
- if (handle->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
+ indir.val64 = (uint64_t)handle;
+ if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
pthread_mutex_unlock(&hw->flows_lock);
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
handle, "Invalid indirect type");
}
- counter = hns3_counter_lookup(dev, handle->counter_id);
+ counter = hns3_counter_lookup(dev, indir.counter_id);
if (counter == NULL) {
pthread_mutex_unlock(&hw->flows_lock);
return rte_flow_error_set(error, EINVAL,
@@ -2628,8 +2622,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
handle, "Counter id in use");
}
- (void)hns3_counter_release(dev, handle->counter_id);
- rte_free(handle);
+ (void)hns3_counter_release(dev, indir.counter_id);
pthread_mutex_unlock(&hw->flows_lock);
return 0;
@@ -2642,12 +2635,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_flow_action_handle indir;
struct rte_flow flow;
int ret;
pthread_mutex_lock(&hw->flows_lock);
- if (handle->indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
+ indir.val64 = (uint64_t)handle;
+ if (indir.indirect_type != HNS3_INDIRECT_ACTION_TYPE_COUNT) {
pthread_mutex_unlock(&hw->flows_lock);
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
@@ -2655,7 +2650,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
}
memset(&flow, 0, sizeof(flow));
- flow.counter_id = handle->counter_id;
+ flow.counter_id = indir.counter_id;
ret = hns3_counter_query(dev, &flow,
(struct rte_flow_query_count *)data, error);
pthread_mutex_unlock(&hw->flows_lock);
diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h
index 1b49673f11..612890391d 100644
--- a/drivers/net/hns3/hns3_flow.h
+++ b/drivers/net/hns3/hns3_flow.h
@@ -50,8 +50,13 @@ enum {
};
struct rte_flow_action_handle {
- int indirect_type;
- uint32_t counter_id;
+ union {
+ uint64_t val64;
+ struct {
+ int indirect_type;
+ uint32_t counter_id;
+ };
+ };
};
union hns3_filter_conf {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.344195462 +0800
+++ 0037-net-hns3-fix-memory-leak-for-indirect-flow-action.patch 2025-06-26 19:59:17.354418045 +0800
@@ -1 +1 @@
-From 18596f7be8f93e159e98704af12b1cc8af289dd6 Mon Sep 17 00:00:00 2001
+From 58f5aa2d977c5b1fc1a478a754f5239b608df87d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 18596f7be8f93e159e98704af12b1cc8af289dd6 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 266934b45b..c0238d2bfa 100644
+index db318854af..b5a46e5ff1 100644
@@ -31 +33 @@
-@@ -473,19 +473,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
+@@ -470,19 +470,20 @@ hns3_handle_action_indirect(struct rte_eth_dev *dev,
@@ -56 +58 @@
-@@ -2726,20 +2727,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
+@@ -2548,20 +2549,12 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
@@ -78 +80 @@
-@@ -2762,15 +2755,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
+@@ -2584,15 +2577,14 @@ hns3_flow_action_create(struct rte_eth_dev *dev,
@@ -97 +99 @@
-@@ -2780,18 +2772,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
+@@ -2602,18 +2594,20 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
@@ -120 +122 @@
-@@ -2806,8 +2800,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
+@@ -2628,8 +2622,7 @@ hns3_flow_action_destroy(struct rte_eth_dev *dev,
@@ -130 +132 @@
-@@ -2820,12 +2813,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
+@@ -2642,12 +2635,14 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
@@ -146 +148 @@
-@@ -2833,7 +2828,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
+@@ -2655,7 +2650,7 @@ hns3_flow_action_query(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix interrupt rollback' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (36 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix memory leak for indirect flow action' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:00 ` patch 'net/hns3: fix divide by zero' " Xueming Li
` (46 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0af993b5f63286c876c09e9aa43bc4ac13aa58c9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0af993b5f63286c876c09e9aa43bc4ac13aa58c9 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:58 +0800
Subject: [PATCH] net/hns3: fix interrupt rollback
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9e911049ac5188be7e080aa8699c0d8e97b32110 ]
When the port is started, if the Tx queue fails to be started,
the map interrupt should be rolled back.
Fixes: fdfde7a4a0f8 ("net/hns3: fix mbuf leakage")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f2020aafbd..5fa288bf2f 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5122,7 +5122,7 @@ hns3_dev_start(struct rte_eth_dev *dev)
*/
ret = hns3_start_all_txqs(dev);
if (ret)
- goto map_rx_inter_err;
+ goto start_all_txqs_fail;
ret = hns3_start_all_rxqs(dev);
if (ret)
@@ -5155,6 +5155,8 @@ hns3_dev_start(struct rte_eth_dev *dev)
start_all_rxqs_fail:
hns3_stop_all_txqs(dev);
+start_all_txqs_fail:
+ hns3_unmap_rx_interrupt(dev);
map_rx_inter_err:
(void)hns3_do_stop(hns);
do_start_fail:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.375383561 +0800
+++ 0038-net-hns3-fix-interrupt-rollback.patch 2025-06-26 19:59:17.362418045 +0800
@@ -1 +1 @@
-From 9e911049ac5188be7e080aa8699c0d8e97b32110 Mon Sep 17 00:00:00 2001
+From 0af993b5f63286c876c09e9aa43bc4ac13aa58c9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9e911049ac5188be7e080aa8699c0d8e97b32110 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 20ad249b8b..2b56b6e44e 100644
+index f2020aafbd..5fa288bf2f 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix divide by zero' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (37 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix interrupt rollback' " Xueming Li
@ 2025-06-26 12:00 ` Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: fix resources release on reset' " Xueming Li
` (45 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:00 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=307bf0ec7685be9f7007450a427472f000848261
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 307bf0ec7685be9f7007450a427472f000848261 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:30:59 +0800
Subject: [PATCH] net/hns3: fix divide by zero
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 ]
Driver may encounter divide-by-zero if the total_tqps_num
and rss_size_max in hw structure from firmware are zero.
So add some verification to them.
Fixes: d51867db65c1 ("net/hns3: add initialization")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 5fa288bf2f..541f086443 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2544,6 +2544,10 @@ hns3_query_pf_resource(struct hns3_hw *hw)
req = (struct hns3_pf_res_cmd *)desc.data;
hw->total_tqps_num = rte_le_to_cpu_16(req->tqp_num) +
rte_le_to_cpu_16(req->ext_tqp_num);
+ if (hw->total_tqps_num == 0) {
+ PMD_INIT_LOG(ERR, "the total tqp number of the port is 0.");
+ return -EINVAL;
+ }
ret = hns3_get_pf_max_tqp_num(hw);
if (ret)
return ret;
@@ -2795,6 +2799,7 @@ hns3_check_media_type(struct hns3_hw *hw, uint8_t media_type)
static int
hns3_get_board_configuration(struct hns3_hw *hw)
{
+#define HNS3_RSS_SIZE_MAX_DEFAULT 64
struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
struct hns3_pf *pf = &hns->pf;
struct hns3_cfg cfg;
@@ -2813,6 +2818,11 @@ hns3_get_board_configuration(struct hns3_hw *hw)
hw->mac.media_type = cfg.media_type;
hw->rss_size_max = cfg.rss_size_max;
+ if (hw->rss_size_max == 0) {
+ PMD_INIT_LOG(WARNING, "rss_size_max is 0, already adjust to %u.",
+ HNS3_RSS_SIZE_MAX_DEFAULT);
+ hw->rss_size_max = HNS3_RSS_SIZE_MAX_DEFAULT;
+ }
memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
hw->mac.phy_addr = cfg.phy_addr;
hw->dcb_info.num_pg = 1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.409427860 +0800
+++ 0039-net-hns3-fix-divide-by-zero.patch 2025-06-26 19:59:17.366418045 +0800
@@ -1 +1 @@
-From a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 Mon Sep 17 00:00:00 2001
+From 307bf0ec7685be9f7007450a427472f000848261 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a88f60f32de6f94a5acbf2101cb5e527fac0b2d2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 2b56b6e44e..2d4e348442 100644
+index 5fa288bf2f..541f086443 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix resources release on reset' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (38 preceding siblings ...)
2025-06-26 12:00 ` patch 'net/hns3: fix divide by zero' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/nfp: standardize NFD3 Tx descriptor endianness' " Xueming Li
` (44 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=280d641cf8d867695326342bed4145c615d52912
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 280d641cf8d867695326342bed4145c615d52912 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Tue, 8 Apr 2025 16:31:00 +0800
Subject: [PATCH] net/hns3: fix resources release on reset
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]
Some resources, like, unmapping Rx interrupt, doesn't perform
when execute dev_stop on reset. This will lead to other issues.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 541f086443..99566375ea 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5219,20 +5219,23 @@ hns3_dev_stop(struct rte_eth_dev *dev)
struct hns3_hw *hw = &hns->hw;
PMD_INIT_FUNC_TRACE();
+ if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) != 0) {
+ hns3_warn(hw, "device is resetting, stop operation is not allowed.");
+ return -EBUSY;
+ }
+
dev->data->dev_started = 0;
hw->adapter_state = HNS3_NIC_STOPPING;
hns3_stop_rxtx_datapath(dev);
rte_spinlock_lock(&hw->lock);
- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
- hns3_tm_dev_stop_proc(hw);
- hns3_config_mac_tnl_int(hw, false);
- hns3_stop_tqps(hw);
- hns3_do_stop(hns);
- hns3_unmap_rx_interrupt(dev);
- hw->adapter_state = HNS3_NIC_CONFIGURED;
- }
+ hns3_tm_dev_stop_proc(hw);
+ hns3_config_mac_tnl_int(hw, false);
+ hns3_stop_tqps(hw);
+ hns3_do_stop(hns);
+ hns3_unmap_rx_interrupt(dev);
+ hw->adapter_state = HNS3_NIC_CONFIGURED;
hns3_rx_scattered_reset(dev);
rte_eal_alarm_cancel(hns3_service_handler, dev);
hns3_stop_report_lse(dev);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.444092958 +0800
+++ 0040-net-hns3-fix-resources-release-on-reset.patch 2025-06-26 19:59:17.374418044 +0800
@@ -1 +1 @@
-From 361eab82df67c09cb84a9e2e66c0d93a84be610d Mon Sep 17 00:00:00 2001
+From 280d641cf8d867695326342bed4145c615d52912 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 361eab82df67c09cb84a9e2e66c0d93a84be610d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 2d4e348442..9f99525e70 100644
+index 541f086443..99566375ea 100644
@@ -36 +38 @@
-- if (rte_atomic_load_explicit(&hw->reset.resetting, rte_memory_order_relaxed) == 0) {
+- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/nfp: standardize NFD3 Tx descriptor endianness' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (39 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/hns3: fix resources release on reset' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/nfp: standardize NFDk " Xueming Li
` (43 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Chaoyong He; +Cc: Xueming Li, Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b9ece5da287d02d3d2d1ca803c0be008c34f4870
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b9ece5da287d02d3d2d1ca803c0be008c34f4870 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 15 Apr 2025 10:54:52 +0800
Subject: [PATCH] net/nfp: standardize NFD3 Tx descriptor endianness
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 1095bb0f86fafee3c7dca7b2dd23075ae869f689 ]
The data endian of NFD3 Tx descriptor should be little, and the related
logic also should modify.
Fixes: 3745dd9dd86f ("net/nfp: adjust coding style for NFD3")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_ctrl.c | 4 ++--
drivers/net/nfp/nfd3/nfp_nfd3.h | 14 +++++++-------
drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c
index 574e4fa056..06d9126340 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
@@ -192,10 +192,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower,
*lmbuf = mbuf;
dma_addr = rte_mbuf_data_iova(mbuf);
- txds->data_len = mbuf->pkt_len;
+ txds->data_len = rte_cpu_to_le_16(mbuf->pkt_len);
txds->dma_len = txds->data_len;
txds->dma_addr_hi = (dma_addr >> 32) & 0xff;
- txds->dma_addr_lo = (dma_addr & 0xffffffff);
+ txds->dma_addr_lo = rte_cpu_to_le_32(dma_addr & 0xffffffff);
txds->offset_eop = FLOWER_PKT_DATA_OFFSET | NFD3_DESC_TX_EOP;
txq->wr_p++;
diff --git a/drivers/net/nfp/nfd3/nfp_nfd3.h b/drivers/net/nfp/nfd3/nfp_nfd3.h
index 3ba562cc3f..6e636a86b8 100644
--- a/drivers/net/nfp/nfd3/nfp_nfd3.h
+++ b/drivers/net/nfp/nfd3/nfp_nfd3.h
@@ -17,13 +17,13 @@
struct nfp_net_nfd3_tx_desc {
union {
struct {
- uint8_t dma_addr_hi; /**< High bits of host buf address */
- uint16_t dma_len; /**< Length to DMA for this desc */
+ uint8_t dma_addr_hi; /**< High bits of host buf address */
+ rte_le16_t dma_len; /**< Length to DMA for this desc */
/** Offset in buf where pkt starts + highest bit is eop flag */
uint8_t offset_eop;
- uint32_t dma_addr_lo; /**< Low 32bit of host buf addr */
+ rte_le32_t dma_addr_lo; /**< Low 32bit of host buf addr */
- uint16_t mss; /**< MSS to be used for LSO */
+ rte_le16_t mss; /**< MSS to be used for LSO */
uint8_t lso_hdrlen; /**< LSO, where the data starts */
uint8_t flags; /**< TX Flags, see @NFD3_DESC_TX_* */
@@ -32,11 +32,11 @@ struct nfp_net_nfd3_tx_desc {
uint8_t l3_offset; /**< L3 header offset */
uint8_t l4_offset; /**< L4 header offset */
};
- uint16_t vlan; /**< VLAN tag to add if indicated */
+ rte_le16_t vlan; /**< VLAN tag to add if indicated */
};
- uint16_t data_len; /**< Length of frame + meta data */
+ rte_le16_t data_len; /**< Length of frame + meta data */
} __rte_packed;
- uint32_t vals[4];
+ rte_le32_t vals[4];
};
};
diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
index b9da74bc99..1771e3adf2 100644
--- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
+++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
@@ -133,7 +133,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq,
if ((mb->ol_flags & RTE_MBUF_F_TX_VLAN) != 0) {
txd->flags |= NFD3_DESC_TX_VLAN;
- txd->vlan = mb->vlan_tci;
+ txd->vlan = rte_cpu_to_le_16(mb->vlan_tci);
}
}
@@ -298,7 +298,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
* Checksum and VLAN flags just in the first descriptor for a
* multisegment packet, but TSO info needs to be in all of them.
*/
- txd.data_len = pkt->pkt_len;
+ txd.data_len = rte_cpu_to_le_16((uint16_t)pkt->pkt_len);
nfp_net_nfd3_tx_tso(txq, &txd, pkt);
nfp_net_nfd3_tx_cksum(txq, &txd, pkt);
nfp_net_nfd3_tx_vlan(txq, &txd, pkt);
@@ -328,10 +328,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
dma_addr = rte_mbuf_data_iova(pkt);
/* Filling descriptors fields */
- txds->dma_len = dma_size;
+ txds->dma_len = rte_cpu_to_le_16(dma_size);
txds->data_len = txd.data_len;
txds->dma_addr_hi = (dma_addr >> 32) & 0xff;
- txds->dma_addr_lo = (dma_addr & 0xffffffff);
+ txds->dma_addr_lo = rte_cpu_to_le_32(dma_addr & 0xffffffff);
free_descs--;
txq->wr_p++;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.477643057 +0800
+++ 0041-net-nfp-standardize-NFD3-Tx-descriptor-endianness.patch 2025-06-26 19:59:17.378418044 +0800
@@ -1 +1 @@
-From 1095bb0f86fafee3c7dca7b2dd23075ae869f689 Mon Sep 17 00:00:00 2001
+From b9ece5da287d02d3d2d1ca803c0be008c34f4870 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1095bb0f86fafee3c7dca7b2dd23075ae869f689 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 23d1b770d8..6ac2caf367 100644
+index 574e4fa056..06d9126340 100644
@@ -25 +27 @@
-@@ -194,10 +194,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower,
+@@ -192,10 +192,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower,
@@ -39 +41 @@
-index 96ea23b3df..dc24f4fa1d 100644
+index 3ba562cc3f..6e636a86b8 100644
@@ -45 +47 @@
- struct __rte_packed_begin {
+ struct {
@@ -69 +71 @@
- } __rte_packed_end;
+ } __rte_packed;
@@ -76 +78 @@
-index 3ffcbb2576..6466a5a4fb 100644
+index b9da74bc99..1771e3adf2 100644
@@ -79 +81 @@
-@@ -139,7 +139,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq,
+@@ -133,7 +133,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq,
@@ -88 +90 @@
-@@ -300,7 +300,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
+@@ -298,7 +298,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
@@ -97 +99 @@
-@@ -330,10 +330,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
+@@ -328,10 +328,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/nfp: standardize NFDk Tx descriptor endianness' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (40 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/nfp: standardize NFD3 Tx descriptor endianness' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/qede: fix use after free' " Xueming Li
` (42 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Chaoyong He; +Cc: Xueming Li, Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8e944939140f16e08550dd1e846536fc607dd936
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8e944939140f16e08550dd1e846536fc607dd936 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Tue, 15 Apr 2025 10:54:53 +0800
Subject: [PATCH] net/nfp: standardize NFDk Tx descriptor endianness
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ae1baeca61cf11beea62364bcc0a80ff261abe7c ]
The data endian of NFDk Tx descriptor should be little, and the related
logic also should modify.
Fixes: d7f6d9b21ffa ("net/nfp: adjust coding style for NFDk")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfdk/nfp_nfdk.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/nfp/nfdk/nfp_nfdk.h b/drivers/net/nfp/nfdk/nfp_nfdk.h
index 2767fd51cd..a5e52824e8 100644
--- a/drivers/net/nfp/nfdk/nfp_nfdk.h
+++ b/drivers/net/nfp/nfdk/nfp_nfdk.h
@@ -106,19 +106,19 @@ struct nfp_net_nfdk_tx_desc {
union {
/** Address descriptor */
struct {
- uint16_t dma_addr_hi; /**< High bits of host buf address */
- uint16_t dma_len_type; /**< Length to DMA for this desc */
- uint32_t dma_addr_lo; /**< Low 32bit of host buf addr */
+ rte_le16_t dma_addr_hi; /**< High bits of host buf address */
+ rte_le16_t dma_len_type; /**< Length to DMA for this desc */
+ rte_le32_t dma_addr_lo; /**< Low 32bit of host buf addr */
};
/** TSO descriptor */
struct {
- uint16_t mss; /**< MSS to be used for LSO */
+ rte_le16_t mss; /**< MSS to be used for LSO */
uint8_t lso_hdrlen; /**< LSO, TCP payload offset */
uint8_t lso_totsegs; /**< LSO, total segments */
uint8_t l3_offset; /**< L3 header offset */
uint8_t l4_offset; /**< L4 header offset */
- uint16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
+ rte_le16_t lso_meta_res; /**< Rsvd bits in TSO metadata */
};
/** Metadata descriptor */
@@ -127,8 +127,8 @@ struct nfp_net_nfdk_tx_desc {
uint8_t reserved[7]; /**< Meta byte place holder */
};
- uint32_t vals[2];
- uint64_t raw;
+ rte_le32_t vals[2];
+ rte_le64_t raw;
};
};
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.509678555 +0800
+++ 0042-net-nfp-standardize-NFDk-Tx-descriptor-endianness.patch 2025-06-26 19:59:17.378418044 +0800
@@ -1 +1 @@
-From ae1baeca61cf11beea62364bcc0a80ff261abe7c Mon Sep 17 00:00:00 2001
+From 8e944939140f16e08550dd1e846536fc607dd936 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ae1baeca61cf11beea62364bcc0a80ff261abe7c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 29d862f6f0..64c2b31308 100644
+index 2767fd51cd..a5e52824e8 100644
@@ -23 +25 @@
-@@ -109,19 +109,19 @@ struct nfp_net_nfdk_tx_desc {
+@@ -106,19 +106,19 @@ struct nfp_net_nfdk_tx_desc {
@@ -48 +50 @@
-@@ -130,8 +130,8 @@ struct nfp_net_nfdk_tx_desc {
+@@ -127,8 +127,8 @@ struct nfp_net_nfdk_tx_desc {
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/qede: fix use after free' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (41 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/nfp: standardize NFDk " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'bus/fslmc: " Xueming Li
` (41 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f7c324657056f1fad001c3fd1f153a02b2c2ec81
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f7c324657056f1fad001c3fd1f153a02b2c2ec81 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 13 Mar 2025 10:22:03 -0700
Subject: [PATCH] net/qede: fix use after free
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ab8caba639ee6378055b2d8518e2a97b2212c737 ]
The loop cleaning up flowdir resources was using SLIST_FOREACH
but the inner loop would call rte_free. Found by building with
address sanitizer undefined check.
Also remove needless initialization, and null check.
Fixes: f5765f66f9bb ("net/qede: refactor flow director into generic aRFS")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/qede/qede_filter.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index e547b24a73..90f8b89681 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -12,6 +12,13 @@
#include "qede_ethdev.h"
+#ifndef SLIST_FOREACH_SAFE
+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = SLIST_FIRST((head)); \
+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
+ (var) = (tvar))
+#endif
+
/* VXLAN tunnel classification mapping */
const struct _qede_udp_tunn_types {
uint16_t rte_filter_type;
@@ -154,16 +161,13 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
- struct qede_arfs_entry *tmp = NULL;
+ struct qede_arfs_entry *tmp, *tmp2;
- SLIST_FOREACH(tmp, &qdev->arfs_info.arfs_list_head, list) {
- if (tmp) {
- if (tmp->mz)
- rte_memzone_free(tmp->mz);
- SLIST_REMOVE(&qdev->arfs_info.arfs_list_head, tmp,
- qede_arfs_entry, list);
- rte_free(tmp);
- }
+ SLIST_FOREACH_SAFE(tmp, &qdev->arfs_info.arfs_list_head, list, tmp2) {
+ if (tmp->mz)
+ rte_memzone_free(tmp->mz);
+ SLIST_REMOVE(&qdev->arfs_info.arfs_list_head, tmp, qede_arfs_entry, list);
+ rte_free(tmp);
}
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.538770654 +0800
+++ 0043-net-qede-fix-use-after-free.patch 2025-06-26 19:59:17.382418044 +0800
@@ -1 +1 @@
-From ab8caba639ee6378055b2d8518e2a97b2212c737 Mon Sep 17 00:00:00 2001
+From f7c324657056f1fad001c3fd1f153a02b2c2ec81 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ab8caba639ee6378055b2d8518e2a97b2212c737 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +19,2 @@
- drivers/net/qede/qede_filter.c | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
+ drivers/net/qede/qede_filter.c | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
@@ -21 +23 @@
-index 14fb4338e9..cecb58c997 100644
+index e547b24a73..90f8b89681 100644
@@ -38 +40 @@
-@@ -154,15 +161,12 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
+@@ -154,16 +161,13 @@ int qede_check_fdir_support(struct rte_eth_dev *eth_dev)
@@ -47 +49,2 @@
-- rte_memzone_free(tmp->mz);
+- if (tmp->mz)
+- rte_memzone_free(tmp->mz);
@@ -53 +56,2 @@
-+ rte_memzone_free(tmp->mz);
++ if (tmp->mz)
++ rte_memzone_free(tmp->mz);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'bus/fslmc: fix use after free' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (42 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/qede: fix use after free' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/null: fix packet copy' " Xueming Li
` (40 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Xueming Li, Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ed431a08683c81811b018ad9d3df28e8f9bb7f74
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ed431a08683c81811b018ad9d3df28e8f9bb7f74 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 16 Apr 2025 07:58:14 -0700
Subject: [PATCH] bus/fslmc: fix use after free
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 1cad17c43079268d9e15db62b3a1edd42df8d81e ]
The cleanup loop would dereference the dpio_dev after freeing.
Use TAILQ_FOREACH_SAFE to fix that.
Found by building with sanitizer undefined flag.
Fixes: e55d0494ab98 ("bus/fslmc: support secondary process")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 4aec7b2cd8..6bf3b15be9 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -38,6 +38,13 @@
#include "dpaa2_hw_dpio.h"
#include <mc/fsl_dpmng.h>
+#ifndef TAILQ_FOREACH_SAFE
+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = TAILQ_FIRST((head)); \
+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
+ (var) = (tvar))
+#endif
+
#define NUM_HOST_CPUS RTE_MAX_LCORE
struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
@@ -364,6 +371,7 @@ dpaa2_create_dpio_device(int vdev_fd,
int object_id)
{
struct dpaa2_dpio_dev *dpio_dev = NULL;
+ struct dpaa2_dpio_dev *dpio_tmp;
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info)};
struct qbman_swp_desc p_des;
struct dpio_attr attr;
@@ -549,7 +557,7 @@ err:
rte_free(dpio_dev);
/* For each element in the list, cleanup */
- TAILQ_FOREACH(dpio_dev, &dpio_dev_list, next) {
+ TAILQ_FOREACH_SAFE(dpio_dev, &dpio_dev_list, next, dpio_tmp) {
if (dpio_dev->dpio) {
dpio_disable(dpio_dev->dpio, CMD_PRI_LOW,
dpio_dev->token);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.568599453 +0800
+++ 0044-bus-fslmc-fix-use-after-free.patch 2025-06-26 19:59:17.386418044 +0800
@@ -1 +1 @@
-From 1cad17c43079268d9e15db62b3a1edd42df8d81e Mon Sep 17 00:00:00 2001
+From ed431a08683c81811b018ad9d3df28e8f9bb7f74 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 1cad17c43079268d9e15db62b3a1edd42df8d81e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bad25a0ec2..e32471d8b5 100644
+index 4aec7b2cd8..6bf3b15be9 100644
@@ -23 +25 @@
-@@ -39,6 +39,13 @@
+@@ -38,6 +38,13 @@
@@ -36,3 +38,3 @@
- RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_io_portal)
-@@ -412,6 +419,7 @@ dpaa2_create_dpio_device(int vdev_fd,
- struct rte_dpaa2_device *obj)
+ struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
+@@ -364,6 +371,7 @@ dpaa2_create_dpio_device(int vdev_fd,
+ int object_id)
@@ -45 +47 @@
-@@ -597,7 +605,7 @@ err:
+@@ -549,7 +557,7 @@ err:
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/null: fix packet copy' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (43 preceding siblings ...)
2025-06-26 12:01 ` patch 'bus/fslmc: " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'bus/vmbus: align ring buffer data to page boundary' " Xueming Li
` (39 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0fc340a7d8b42ba81b01e54cc00ae4fa07486349
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0fc340a7d8b42ba81b01e54cc00ae4fa07486349 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 1 Apr 2025 16:47:26 -0700
Subject: [PATCH] net/null: fix packet copy
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da ]
If doing copy on transmit, can potentially copy paste the data
in the mbuf. Change to only copy data from that segment.
Fixes: c743e50c475f ("null: new poll mode driver")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/null/rte_eth_null.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 7c46004f1e..5b732f28be 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -35,7 +35,7 @@ struct null_queue {
struct pmd_internals *internals;
struct rte_mempool *mb_pool;
- struct rte_mbuf *dummy_packet;
+ void *dummy_packet;
uint64_t rx_pkts;
uint64_t tx_pkts;
@@ -163,17 +163,17 @@ eth_null_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
static uint16_t
eth_null_copy_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
{
- int i;
struct null_queue *h = q;
- unsigned int packet_size;
+ unsigned int i;
if ((q == NULL) || (bufs == NULL))
return 0;
- packet_size = h->internals->packet_size;
for (i = 0; i < nb_bufs; i++) {
- rte_memcpy(h->dummy_packet, rte_pktmbuf_mtod(bufs[i], void *),
- packet_size);
+ struct rte_mbuf *m = bufs[i];
+ size_t len = RTE_MIN(h->internals->packet_size, m->data_len);
+
+ rte_memcpy(h->dummy_packet, rte_pktmbuf_mtod(m, void *), len);
rte_pktmbuf_free(bufs[i]);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.599372352 +0800
+++ 0045-net-null-fix-packet-copy.patch 2025-06-26 19:59:17.386418044 +0800
@@ -1 +1 @@
-From 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da Mon Sep 17 00:00:00 2001
+From 0fc340a7d8b42ba81b01e54cc00ae4fa07486349 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0ffd3bc09be5f77b26c16e501e4b4465b1bcb8da ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 6764cf2ec1..966748689f 100644
+index 7c46004f1e..5b732f28be 100644
@@ -28,2 +30,2 @@
- RTE_ATOMIC(uint64_t) rx_pkts;
- RTE_ATOMIC(uint64_t) tx_pkts;
+ uint64_t rx_pkts;
+ uint64_t tx_pkts;
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'bus/vmbus: align ring buffer data to page boundary' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (44 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/null: fix packet copy' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'bus/vmbus: use Hyper-V page size' " Xueming Li
` (38 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Long Li; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3b68507506481889a63c300fa7f8adac7b193ff5
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3b68507506481889a63c300fa7f8adac7b193ff5 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:47 -0700
Subject: [PATCH] bus/vmbus: align ring buffer data to page boundary
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit c54fa45817932057dd8f275fa1b8e4dcaede7813 ]
The ring buffer data region always starts at the system page boundary
after ring buffer head. The current code assumes the system page size is
4k. This is not always correct.
Fix this by using system page size for addressing ring buffer data.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/bus/vmbus/rte_vmbus_reg.h | 9 +++------
drivers/bus/vmbus/vmbus_bufring.c | 9 ++++++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/vmbus/rte_vmbus_reg.h b/drivers/bus/vmbus/rte_vmbus_reg.h
index a17ce40763..6257774f29 100644
--- a/drivers/bus/vmbus/rte_vmbus_reg.h
+++ b/drivers/bus/vmbus/rte_vmbus_reg.h
@@ -100,14 +100,11 @@ struct vmbus_bufring {
uint32_t value;
} feature_bits;
- /* Pad it to rte_mem_page_size() so that data starts on page boundary */
- uint8_t reserved2[4028];
-
/*
- * Ring data starts here + RingDataStartOffset
- * !!! DO NOT place any fields below this !!!
+ * This is the end of ring buffer head. The ring buffer data is system
+ * page aligned and starts at rte_mem_page_size() from the beginning
+ * of this structure
*/
- uint8_t data[];
} __rte_packed;
/*
diff --git a/drivers/bus/vmbus/vmbus_bufring.c b/drivers/bus/vmbus/vmbus_bufring.c
index c78619dc44..fcb97287dc 100644
--- a/drivers/bus/vmbus/vmbus_bufring.c
+++ b/drivers/bus/vmbus/vmbus_bufring.c
@@ -36,7 +36,10 @@ void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen)
{
br->vbr = buf;
br->windex = br->vbr->windex;
- br->dsize = blen - sizeof(struct vmbus_bufring);
+
+ /* The ring buffer data starts at the 2nd page of the ring buffer */
+ RTE_VERIFY(blen > rte_mem_page_size());
+ br->dsize = blen - rte_mem_page_size();
}
/*
@@ -72,7 +75,7 @@ static inline uint32_t
vmbus_txbr_copyto(const struct vmbus_br *tbr, uint32_t windex,
const void *src0, uint32_t cplen)
{
- uint8_t *br_data = tbr->vbr->data;
+ uint8_t *br_data = (uint8_t *)tbr->vbr + rte_mem_page_size();
uint32_t br_dsize = tbr->dsize;
const uint8_t *src = src0;
@@ -170,7 +173,7 @@ static inline uint32_t
vmbus_rxbr_copyfrom(const struct vmbus_br *rbr, uint32_t rindex,
void *dst0, size_t cplen)
{
- const uint8_t *br_data = rbr->vbr->data;
+ const uint8_t *br_data = (uint8_t *)rbr->vbr + rte_mem_page_size();
uint32_t br_dsize = rbr->dsize;
uint8_t *dst = dst0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.629813050 +0800
+++ 0046-bus-vmbus-align-ring-buffer-data-to-page-boundary.patch 2025-06-26 19:59:17.390418044 +0800
@@ -1 +1 @@
-From c54fa45817932057dd8f275fa1b8e4dcaede7813 Mon Sep 17 00:00:00 2001
+From 3b68507506481889a63c300fa7f8adac7b193ff5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit c54fa45817932057dd8f275fa1b8e4dcaede7813 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 54a26d12bd..fb7e3043ec 100644
+index a17ce40763..6257774f29 100644
@@ -25 +27 @@
-@@ -100,14 +100,11 @@ struct __rte_packed_begin vmbus_bufring {
+@@ -100,14 +100,11 @@ struct vmbus_bufring {
@@ -40 +42 @@
- } __rte_packed_end;
+ } __rte_packed;
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'bus/vmbus: use Hyper-V page size' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (45 preceding siblings ...)
2025-06-26 12:01 ` patch 'bus/vmbus: align ring buffer data to page boundary' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/netvsc: " Xueming Li
` (37 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Long Li; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f3f3b4cf9498454015aeb925eb93d2908a3ad2ad
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From f3f3b4cf9498454015aeb925eb93d2908a3ad2ad Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:48 -0700
Subject: [PATCH] bus/vmbus: use Hyper-V page size
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]
Hyper-V uses 4k page size, regardless of the system page size used.
Define Hyper-V page size for use in drivers.
The interrupt and monitor pages mapped from Hyper-V via kernel are always
4k in sizes. Use Hyper-V page size to map them.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/bus/vmbus/bus_vmbus_driver.h | 4 ++++
drivers/bus/vmbus/linux/vmbus_uio.c | 2 +-
drivers/bus/vmbus/vmbus_common_uio.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index e2475a642d..879cbd5bbf 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -14,6 +14,10 @@ extern "C" {
#include <rte_compat.h>
#include <dev_driver.h>
+#define HYPERV_PAGE_SHIFT 12
+#define HYPERV_PAGE_SIZE (1 << HYPERV_PAGE_SHIFT)
+#define HYPERV_PAGE_MASK (HYPERV_PAGE_SIZE - 1)
+
struct vmbus_channel;
struct vmbus_mon_page;
diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 26edef342d..d4522f2e21 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -268,7 +268,7 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
}
file_size = sb.st_size;
- if (file_size == 0 || (file_size & (rte_mem_page_size() - 1))) {
+ if (file_size == 0 || (file_size & (HYPERV_PAGE_SIZE - 1))) {
VMBUS_LOG(ERR, "incorrect size %s: %zu",
ring_path, file_size);
diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c
index 4d4613513c..13289cd9a4 100644
--- a/drivers/bus/vmbus/vmbus_common_uio.c
+++ b/drivers/bus/vmbus/vmbus_common_uio.c
@@ -201,7 +201,7 @@ vmbus_uio_map_resource(struct rte_vmbus_device *dev)
}
dev->int_page = (uint32_t *)((char *)uio_res->maps[HV_INT_PAGE_MAP].addr
- + (rte_mem_page_size() >> 1));
+ + (HYPERV_PAGE_SIZE >> 1));
dev->monitor_page = uio_res->maps[HV_MON_PAGE_MAP].addr;
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.660326449 +0800
+++ 0047-bus-vmbus-use-Hyper-V-page-size.patch 2025-06-26 19:59:17.390418044 +0800
@@ -1 +1 @@
-From 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 Mon Sep 17 00:00:00 2001
+From f3f3b4cf9498454015aeb925eb93d2908a3ad2ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 30f24d33f33bbb29b1fba32b01e8c8d77400a5d5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index bc394208de..0a56275437 100644
+index e2475a642d..879cbd5bbf 100644
@@ -26,3 +28,3 @@
-@@ -14,6 +14,10 @@
- extern "C" {
- #endif
+@@ -14,6 +14,10 @@ extern "C" {
+ #include <rte_compat.h>
+ #include <dev_driver.h>
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/netvsc: use Hyper-V page size' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (46 preceding siblings ...)
2025-06-26 12:01 ` patch 'bus/vmbus: use Hyper-V page size' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/netvsc: add stats counters from VF' " Xueming Li
` (36 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Long Li; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8622aa0e758603798b8ae0167358ee005dee7421
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 8622aa0e758603798b8ae0167358ee005dee7421 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Apr 2025 12:32:50 -0700
Subject: [PATCH] net/netvsc: use Hyper-V page size
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 2e81551053fcfc7d57b8907a2a8720805298d723 ]
The driver should always use Hyper-V page size for implementing RNDIS and
calculating PFN (Page Frame Number) for communicating with Hyper-V VSP.
It should not use system page size as it may be different to the Hyper-V
page size.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/netvsc/hn_rndis.c | 14 +++++++-------
drivers/net/netvsc/hn_rxtx.c | 16 ++++++++--------
drivers/net/netvsc/hn_var.h | 4 ----
3 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 1ba75ee804..690d1289c2 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -67,7 +67,7 @@ hn_rndis_rid(struct hn_data *hv)
static void *hn_rndis_alloc(size_t size)
{
- return rte_zmalloc("RNDIS", size, rte_mem_page_size());
+ return rte_zmalloc("RNDIS", size, HYPERV_PAGE_SIZE);
}
#ifdef RTE_LIBRTE_NETVSC_DEBUG_DUMP
@@ -265,17 +265,17 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
return -EINVAL;
}
- if (unlikely(reqlen > rte_mem_page_size())) {
+ if (unlikely(reqlen > HYPERV_PAGE_SIZE)) {
PMD_DRV_LOG(ERR, "RNDIS request %u greater than page size",
reqlen);
return -EINVAL;
}
- sg.page = addr / rte_mem_page_size();
- sg.ofs = addr & PAGE_MASK;
+ sg.page = addr / HYPERV_PAGE_SIZE;
+ sg.ofs = addr & HYPERV_PAGE_MASK;
sg.len = reqlen;
- if (sg.ofs + reqlen > rte_mem_page_size()) {
+ if (sg.ofs + reqlen > HYPERV_PAGE_SIZE) {
PMD_DRV_LOG(ERR, "RNDIS request crosses page boundary");
return -EINVAL;
}
@@ -480,7 +480,7 @@ hn_rndis_query(struct hn_data *hv, uint32_t oid,
return -ENOMEM;
comp_len = sizeof(*comp) + odlen;
- comp = rte_zmalloc("QUERY", comp_len, rte_mem_page_size());
+ comp = rte_zmalloc("QUERY", comp_len, HYPERV_PAGE_SIZE);
if (!comp) {
error = -ENOMEM;
goto done;
@@ -737,7 +737,7 @@ hn_rndis_set(struct hn_data *hv, uint32_t oid, const void *data, uint32_t dlen)
int error;
reqlen = sizeof(*req) + dlen;
- req = rte_zmalloc("RNDIS_SET", reqlen, rte_mem_page_size());
+ req = rte_zmalloc("RNDIS_SET", reqlen, HYPERV_PAGE_SIZE);
if (!req)
return -ENOMEM;
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index eea120ae82..1db0cecd96 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1443,10 +1443,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
while (m) {
unsigned int size = rte_pktmbuf_data_len(m);
- unsigned int offs = rte_mbuf_data_iova(m) & PAGE_MASK;
+ unsigned int offs = rte_mbuf_data_iova(m) & HYPERV_PAGE_MASK;
- slots += (offs + size + rte_mem_page_size() - 1) /
- rte_mem_page_size();
+ slots += (offs + size + HYPERV_PAGE_SIZE - 1) /
+ HYPERV_PAGE_SIZE;
m = m->next;
}
@@ -1461,13 +1461,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
while (m) {
rte_iova_t addr = rte_mbuf_data_iova(m);
- unsigned int page = addr / rte_mem_page_size();
- unsigned int offset = addr & PAGE_MASK;
+ unsigned int page = addr / HYPERV_PAGE_SIZE;
+ unsigned int offset = addr & HYPERV_PAGE_MASK;
unsigned int len = rte_pktmbuf_data_len(m);
while (len > 0) {
unsigned int bytes = RTE_MIN(len,
- rte_mem_page_size() - offset);
+ HYPERV_PAGE_SIZE - offset);
sg[segs].page = page;
sg[segs].ofs = offset;
@@ -1510,8 +1510,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
addr = txq->tx_rndis_iova +
((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
- sg[0].page = addr / rte_mem_page_size();
- sg[0].ofs = addr & PAGE_MASK;
+ sg[0].page = addr / HYPERV_PAGE_SIZE;
+ sg[0].ofs = addr & HYPERV_PAGE_MASK;
sg[0].len = RNDIS_PACKET_MSG_OFFSET_ABS(hn_rndis_pktlen(txd->rndis_pkt));
segs = 1;
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index e37946804d..628c6a5d4b 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -31,10 +31,6 @@
#define HN_RX_EXTMBUF_ENABLE 0
-#ifndef PAGE_MASK
-#define PAGE_MASK (rte_mem_page_size() - 1)
-#endif
-
struct hn_data;
struct hn_txdesc;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.691900848 +0800
+++ 0048-net-netvsc-use-Hyper-V-page-size.patch 2025-06-26 19:59:17.394418044 +0800
@@ -1 +1 @@
-From 2e81551053fcfc7d57b8907a2a8720805298d723 Mon Sep 17 00:00:00 2001
+From 8622aa0e758603798b8ae0167358ee005dee7421 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2e81551053fcfc7d57b8907a2a8720805298d723 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index b2dae6474a..24723ff842 100644
+index 1ba75ee804..690d1289c2 100644
@@ -76 +78 @@
-index 9d3948e03d..c79d971904 100644
+index eea120ae82..1db0cecd96 100644
@@ -79 +81 @@
-@@ -1431,10 +1431,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
+@@ -1443,10 +1443,10 @@ static unsigned int hn_get_slots(const struct rte_mbuf *m)
@@ -93 +95 @@
-@@ -1449,13 +1449,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
+@@ -1461,13 +1461,13 @@ static unsigned int hn_fill_sg(struct vmbus_gpa *sg,
@@ -110 +112 @@
-@@ -1498,8 +1498,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
+@@ -1510,8 +1510,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
@@ -122 +124 @@
-index 0f638bc5fd..f946b3d8ef 100644
+index e37946804d..628c6a5d4b 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/netvsc: add stats counters from VF' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (47 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/netvsc: " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'app/testpmd: relax number of TCs in DCB command' " Xueming Li
` (35 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Long Li; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1abe716ddfac7129f36dc6c77e0f3c2c5b8d0fdc
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1abe716ddfac7129f36dc6c77e0f3c2c5b8d0fdc Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 23 Apr 2025 11:57:32 -0700
Subject: [PATCH] net/netvsc: add stats counters from VF
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 0bb9b5aef16d3ba83066e03a87faf96da292c042 ]
The netvsc driver should add per-queue and rx_nombuf counters from VF.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/netvsc/hn_ethdev.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index f848157b49..88b32e442e 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -809,8 +809,8 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
stats->oerrors += txq->stats.errors;
if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
- stats->q_opackets[i] = txq->stats.packets;
- stats->q_obytes[i] = txq->stats.bytes;
+ stats->q_opackets[i] += txq->stats.packets;
+ stats->q_obytes[i] += txq->stats.bytes;
}
}
@@ -826,12 +826,12 @@ static int hn_dev_stats_get(struct rte_eth_dev *dev,
stats->imissed += rxq->stats.ring_full;
if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
- stats->q_ipackets[i] = rxq->stats.packets;
- stats->q_ibytes[i] = rxq->stats.bytes;
+ stats->q_ipackets[i] += rxq->stats.packets;
+ stats->q_ibytes[i] += rxq->stats.bytes;
}
}
- stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
+ stats->rx_nombuf += dev->data->rx_mbuf_alloc_failed;
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.725595046 +0800
+++ 0049-net-netvsc-add-stats-counters-from-VF.patch 2025-06-26 19:59:17.398418043 +0800
@@ -1 +1 @@
-From 0bb9b5aef16d3ba83066e03a87faf96da292c042 Mon Sep 17 00:00:00 2001
+From 1abe716ddfac7129f36dc6c77e0f3c2c5b8d0fdc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 0bb9b5aef16d3ba83066e03a87faf96da292c042 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index e5b052d569..ca626ccf60 100644
+index f848157b49..88b32e442e 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'app/testpmd: relax number of TCs in DCB command' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (48 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/netvsc: add stats counters from VF' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/mana: check vendor ID when probing RDMA device' " Xueming Li
` (34 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b448d39192cfb93928c9b654d8ee4be97cab7206
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b448d39192cfb93928c9b654d8ee4be97cab7206 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 24 Apr 2025 14:17:46 +0800
Subject: [PATCH] app/testpmd: relax number of TCs in DCB command
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 5f2695ee948ddaf36050f2d6b58a3437248c1663 ]
Currently, the "port config 0 dcb ..." command only supports 4 or 8
TCs. Other number of TCs may be used in actual applications.
This commit removes this restriction.
Fixes: 900550de04a7 ("app/testpmd: add dcb support")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test-pmd/cmdline.c | 4 ++--
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d40f0fb7bb..553fd8c422 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3130,9 +3130,9 @@ cmd_config_dcb_parsed(void *parsed_result,
return;
}
- if ((res->num_tcs != RTE_ETH_4_TCS) && (res->num_tcs != RTE_ETH_8_TCS)) {
+ if (res->num_tcs <= 1 || res->num_tcs > RTE_ETH_8_TCS) {
fprintf(stderr,
- "The invalid number of traffic class, only 4 or 8 allowed.\n");
+ "The invalid number of traffic class, only 2~8 allowed.\n");
return;
}
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 45d34d2632..9a0dd2e5d8 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2142,7 +2142,7 @@ Set the DCB mode for an individual port::
testpmd> port config (port_id) dcb vt (on|off) (traffic_class) pfc (on|off)
-The traffic class should be 4 or 8.
+The traffic class could be 2~8.
port config - Burst
~~~~~~~~~~~~~~~~~~~
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.755470945 +0800
+++ 0050-app-testpmd-relax-number-of-TCs-in-DCB-command.patch 2025-06-26 19:59:17.410418043 +0800
@@ -1 +1 @@
-From 5f2695ee948ddaf36050f2d6b58a3437248c1663 Mon Sep 17 00:00:00 2001
+From b448d39192cfb93928c9b654d8ee4be97cab7206 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 5f2695ee948ddaf36050f2d6b58a3437248c1663 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b4089d281b..44fae89821 100644
+index d40f0fb7bb..553fd8c422 100644
@@ -24 +26 @@
-@@ -3472,9 +3472,9 @@ cmd_config_dcb_parsed(void *parsed_result,
+@@ -3130,9 +3130,9 @@ cmd_config_dcb_parsed(void *parsed_result,
@@ -37 +39 @@
-index eeef49500f..38bc00705f 100644
+index 45d34d2632..9a0dd2e5d8 100644
@@ -40 +42 @@
-@@ -2167,7 +2167,7 @@ Set the DCB mode for an individual port::
+@@ -2142,7 +2142,7 @@ Set the DCB mode for an individual port::
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mana: check vendor ID when probing RDMA device' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (49 preceding siblings ...)
2025-06-26 12:01 ` patch 'app/testpmd: relax number of TCs in DCB command' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: fix CRC data segment' " Xueming Li
` (33 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Long Li; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2e2c96c0385d790636c1adee23c938ac5ad01200
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2e2c96c0385d790636c1adee23c938ac5ad01200 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 12 May 2025 14:52:02 -0700
Subject: [PATCH] net/mana: check vendor ID when probing RDMA device
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit be4ed96378811e572860cac558bff54b5c361992 ]
The RDMA kernel driver may expose two MANA RDMA devices, for RC and RAW
QP types. The purpose is to support fast service mode at SOC. Depending
on kernel version, the probe may fail if DPDK picks up the wrong device.
Add check for vendor_part_id and RAW QP capability when probing the MANA
device. This check is compatible with all kernel versions.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/mana/mana.c | 14 ++++++++++++++
drivers/net/mana/mana.h | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index c0ff132fe1..ea164bc259 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -1486,6 +1486,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
continue;
}
+ if (dev_attr.orig_attr.vendor_part_id) {
+ if (dev_attr.orig_attr.vendor_part_id !=
+ GDMA_DEVICE_MANA) {
+ DRV_LOG(INFO, "Skip device vendor part id %x",
+ dev_attr.orig_attr.vendor_part_id);
+ continue;
+ }
+ if (!dev_attr.raw_packet_caps) {
+ DRV_LOG(INFO,
+ "Skip device without RAW support");
+ continue;
+ }
+ }
+
for (port = 1; port <= dev_attr.orig_attr.phys_port_cnt;
port++) {
struct rte_ether_addr addr;
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 7931a443a4..31b949ef33 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -12,6 +12,10 @@ struct mana_shared_data {
RTE_ATOMIC(uint32_t) secondary_cnt;
};
+/* vendor_part_id returned from ibv_query_device */
+#define GDMA_DEVICE_MANA 2
+#define GDMA_DEVICE_MANA_IB 3
+
#define MANA_MAX_MTU 9000
#define MIN_RX_BUF_SIZE 1024
#define MANA_MAX_MAC_ADDR 1
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.798058343 +0800
+++ 0051-net-mana-check-vendor-ID-when-probing-RDMA-device.patch 2025-06-26 19:59:17.414418043 +0800
@@ -1 +1 @@
-From be4ed96378811e572860cac558bff54b5c361992 Mon Sep 17 00:00:00 2001
+From 2e2c96c0385d790636c1adee23c938ac5ad01200 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit be4ed96378811e572860cac558bff54b5c361992 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 2934da29f7..c42a987a30 100644
+index c0ff132fe1..ea164bc259 100644
@@ -26 +28 @@
-@@ -1490,6 +1490,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
+@@ -1486,6 +1486,20 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,
@@ -48 +50 @@
-index 855d98911b..6309cae76b 100644
+index 7931a443a4..31b949ef33 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: fix CRC data segment' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (50 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/mana: check vendor ID when probing RDMA device' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/tap: fix qdisc add failure handling' " Xueming Li
` (32 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=25938ace6365eb3b15f2178657c77c427ce6993e
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 25938ace6365eb3b15f2178657c77c427ce6993e Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 16 May 2025 15:15:18 +0800
Subject: [PATCH] net/hns3: fix CRC data segment
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ]
When the packet is received into a multisegment mbuf and
the last segment contains only CRC data, the driver should
not release this segment. Otherwise, the application cannot
look the CRC data. This patch fixes it.
Fixes: 8973d7c4ca12 ("net/hns3: support keeping CRC")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ab4789c2f1..58aa6edff4 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2383,18 +2383,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
}
static inline void
-recalculate_data_len(struct rte_mbuf *first_seg, struct rte_mbuf *last_seg,
- struct rte_mbuf *rxm, struct hns3_rx_queue *rxq,
- uint16_t data_len)
+recalculate_data_len(struct rte_mbuf *last_seg, struct rte_mbuf *rxm,
+ struct hns3_rx_queue *rxq)
{
+ uint16_t data_len = rxm->data_len;
uint8_t crc_len = rxq->crc_len;
if (data_len <= crc_len) {
- rte_pktmbuf_free_seg(rxm);
- first_seg->nb_segs--;
+ rxm->data_len = 0;
last_seg->data_len = (uint16_t)(last_seg->data_len -
(crc_len - data_len));
- last_seg->next = NULL;
} else
rxm->data_len = (uint16_t)(data_len - crc_len);
}
@@ -2725,8 +2723,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
rxm->next = NULL;
if (unlikely(rxq->crc_len > 0)) {
first_seg->pkt_len -= rxq->crc_len;
- recalculate_data_len(first_seg, last_seg, rxm, rxq,
- rxm->data_len);
+ recalculate_data_len(last_seg, rxm, rxq);
}
first_seg->port = rxq->port_id;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.828784142 +0800
+++ 0052-net-hns3-fix-CRC-data-segment.patch 2025-06-26 19:59:17.418418043 +0800
@@ -1 +1 @@
-From 7a99b6ca9d079e9364ba61d3fe802a4761739c8f Mon Sep 17 00:00:00 2001
+From 25938ace6365eb3b15f2178657c77c427ce6993e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7a99b6ca9d079e9364ba61d3fe802a4761739c8f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bb7ffee12c..49b6f16ccd 100644
+index ab4789c2f1..58aa6edff4 100644
@@ -23 +25 @@
-@@ -2386,18 +2386,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
+@@ -2383,18 +2383,16 @@ hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
@@ -46 +48 @@
-@@ -2728,8 +2726,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2725,8 +2723,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/tap: fix qdisc add failure handling' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (51 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/hns3: fix CRC data segment' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " Xueming Li
` (31 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Yan Lu; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9a33966ea38cc61e79b9577faeee47ce713fe3ad
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9a33966ea38cc61e79b9577faeee47ce713fe3ad Mon Sep 17 00:00:00 2001
From: Yan Lu <luyan@cmss.chinamobile.com>
Date: Wed, 21 May 2025 09:33:13 +0800
Subject: [PATCH] net/tap: fix qdisc add failure handling
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 02a68649e6fb55d8975c726e3073ee9d12c20bac ]
The errno variable was assigned a positive value in the previous handling,
but here it is compared against -EEXIST,
When the tap already exists, this would falsely report an error.
Fixes: 6fc6de7e0eaf ("net/tap: update netlink error code management")
Signed-off-by: Yan Lu <luyan@cmss.chinamobile.com>
---
.mailmap | 1 +
drivers/net/tap/tap_tcmsgs.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 20fa4a22ba..b4e75a6046 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1639,6 +1639,7 @@ Yanglong Wu <yanglong.wu@intel.com>
Yang Ming <ming.1.yang@nokia-sbell.com>
Yang Zhang <zy107165@alibaba-inc.com>
Yanjie Xu <yanjie.xu@intel.com>
+Yan Lu <luyan@cmss.chinamobile.com>
Yan Xia <yanx.xia@intel.com>
Yao-Po Wang <blue119@gmail.com>
Yao Zhao <yao.zhao@windriver.com>
diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
index a3aae3c814..24a0423a0e 100644
--- a/drivers/net/tap/tap_tcmsgs.c
+++ b/drivers/net/tap/tap_tcmsgs.c
@@ -261,7 +261,7 @@ qdisc_create_multiq(int nlsk_fd, unsigned int ifindex)
int err = 0;
err = qdisc_add_multiq(nlsk_fd, ifindex);
- if (err < 0 && errno != -EEXIST) {
+ if (err < 0 && errno != EEXIST) {
TAP_LOG(ERR, "Could not add multiq qdisc (%d): %s",
errno, strerror(errno));
return -1;
@@ -287,7 +287,7 @@ qdisc_create_ingress(int nlsk_fd, unsigned int ifindex)
int err = 0;
err = qdisc_add_ingress(nlsk_fd, ifindex);
- if (err < 0 && errno != -EEXIST) {
+ if (err < 0 && errno != EEXIST) {
TAP_LOG(ERR, "Could not add ingress qdisc (%d): %s",
errno, strerror(errno));
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.861836541 +0800
+++ 0053-net-tap-fix-qdisc-add-failure-handling.patch 2025-06-26 19:59:17.422418042 +0800
@@ -1 +1 @@
-From 02a68649e6fb55d8975c726e3073ee9d12c20bac Mon Sep 17 00:00:00 2001
+From 9a33966ea38cc61e79b9577faeee47ce713fe3ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 02a68649e6fb55d8975c726e3073ee9d12c20bac ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 59ee5f7d30..df3674cc7f 100644
+index 20fa4a22ba..b4e75a6046 100644
@@ -23 +25,2 @@
-@@ -1746,6 +1746,7 @@ Yang Ming <ming.1.yang@nokia-sbell.com>
+@@ -1639,6 +1639,7 @@ Yanglong Wu <yanglong.wu@intel.com>
+ Yang Ming <ming.1.yang@nokia-sbell.com>
@@ -25 +27,0 @@
- Yaniv Rosner <yrosner@nvidia.com>
@@ -32 +34 @@
-index 1755b57519..caca9445c8 100644
+index a3aae3c814..24a0423a0e 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix VLAN stripping on hairpin queue' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (52 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/tap: fix qdisc add failure handling' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'mem: fix lockup on address space shortage' " Xueming Li
` (30 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Xueming Li, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1f7a996079c1bf45760c9b9448f2fd0e43b344fc
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1f7a996079c1bf45760c9b9448f2fd0e43b344fc Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Fri, 25 Apr 2025 21:49:13 +0200
Subject: [PATCH] net/mlx5: fix VLAN stripping on hairpin queue
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 ]
Rx hairpin queues support VLAN stripping,
but if port was started and application attempted
to configure stripping on hairpin queue,
segfault was triggered because of NULL dereference.
Underlying function, which was updating the RQ was passing
wrong object handle for hairpin queues.
This patch fixes that.
Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_devx.c | 2 ++
drivers/net/mlx5/mlx5_vlan.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 3f8fb9512b..47e86197b8 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -48,6 +48,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
rq_attr.state = MLX5_RQC_STATE_RDY;
rq_attr.vsd = (on ? 0 : 1);
rq_attr.modify_bitmask = MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_VSD;
+ if (rxq->ctrl->is_hairpin)
+ return mlx5_devx_cmd_modify_rq(rxq->ctrl->obj->rq, &rq_attr);
return mlx5_devx_cmd_modify_rq(rxq->devx_rq.rq, &rq_attr);
}
diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index e7161b66fe..d0459024f1 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -108,7 +108,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
dev->data->port_id, queue);
return;
}
- DRV_LOG(DEBUG, "port %u set VLAN stripping offloads %d for port %uqueue %d",
+ DRV_LOG(DEBUG, "port %u set VLAN stripping offloads %d for port %u queue %d",
dev->data->port_id, on, rxq_data->port_id, queue);
if (rxq->ctrl->obj == NULL) {
/* Update related bits in RX queue. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.894527839 +0800
+++ 0054-net-mlx5-fix-VLAN-stripping-on-hairpin-queue.patch 2025-06-26 19:59:17.426418042 +0800
@@ -1 +1 @@
-From 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 Mon Sep 17 00:00:00 2001
+From 1f7a996079c1bf45760c9b9448f2fd0e43b344fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 468334f07a9298fb4ff05e6cdcbbde64b0da4aa2 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 9711746edb..6c79a634f9 100644
+index 3f8fb9512b..47e86197b8 100644
@@ -28 +30 @@
-@@ -88,6 +88,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
+@@ -48,6 +48,8 @@ mlx5_rxq_obj_modify_rq_vlan_strip(struct mlx5_rxq_priv *rxq, int on)
@@ -38 +40 @@
-index 43a314a679..7c7ac78dfe 100644
+index e7161b66fe..d0459024f1 100644
@@ -41 +43 @@
-@@ -107,7 +107,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+@@ -108,7 +108,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'mem: fix lockup on address space shortage' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (53 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/mlx5: fix VLAN stripping on hairpin queue' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'test/malloc: improve resiliency' " Xueming Li
` (29 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, Dmitry Kozlyuk, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e4963bf825ca86b4c429e50fcee8df590a55da6c
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e4963bf825ca86b4c429e50fcee8df590a55da6c Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Thu, 3 Apr 2025 10:57:36 +0800
Subject: [PATCH] mem: fix lockup on address space shortage
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]
When the process address space is insufficient, mmap will fail,
which will cause an infinite loop.
This patch stops attempting mmap if it fails and
the requested size cannot be reduced.
Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/eal_common_memory.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index d9433db623..e4ea05c46e 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -101,8 +101,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
mapped_addr = eal_mem_reserve(
requested_addr, (size_t)map_sz, reserve_flags);
- if ((mapped_addr == NULL) && allow_shrink)
- *size -= page_sz;
+ if (mapped_addr == NULL) {
+ if (allow_shrink)
+ *size -= page_sz;
+ else
+ break;
+ }
if ((mapped_addr != NULL) && addr_is_hint &&
(mapped_addr != requested_addr)) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.926829938 +0800
+++ 0055-mem-fix-lockup-on-address-space-shortage.patch 2025-06-26 19:59:17.430418042 +0800
@@ -1 +1 @@
-From 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e Mon Sep 17 00:00:00 2001
+From e4963bf825ca86b4c429e50fcee8df590a55da6c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index a2f64408f4..bfa36b8268 100644
+index d9433db623..e4ea05c46e 100644
@@ -25 +27 @@
-@@ -102,8 +102,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
+@@ -101,8 +101,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'test/malloc: improve resiliency' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (54 preceding siblings ...)
2025-06-26 12:01 ` patch 'mem: fix lockup on address space shortage' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'trace: fix overflow in per-lcore trace buffer' " Xueming Li
` (28 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a62f48920d70c3d208363392290fd57c97200b4d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From a62f48920d70c3d208363392290fd57c97200b4d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 26 Mar 2025 17:13:24 +0000
Subject: [PATCH] test/malloc: improve resiliency
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7777215715d475b5e884179de39ff4bc6b8cbf72 ]
The test case "test_multi_alloc_statistics" was brittle in that it did
some allocations and frees and then checked statistics without
considering the initial state of the malloc heaps. This meant that,
depending on what allocations/frees were done beforehand, the test can
sometimes fail.
We can improve resiliency by running the test using a new malloc heap,
which means it is unaffected by any previous allocations.
Bugzilla ID: 1579
Fixes: a40a1f8231b4 ("app: various tests update")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test/test_malloc.c | 77 +++++++++++++++++++++++++++++++++++-------
1 file changed, 64 insertions(+), 13 deletions(-)
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index cd579c503c..084c21480b 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -25,6 +25,7 @@
#include <rte_malloc.h>
#include <rte_cycles.h>
#include <rte_random.h>
+#include <rte_eal_paging.h>
#include <rte_string_fns.h>
#define N 10000
@@ -267,11 +268,48 @@ test_str_to_size(void)
static int
test_multi_alloc_statistics(void)
{
+ int ret = -1; /* default return is error, cleared at end on success */
int socket = 0;
struct rte_malloc_socket_stats pre_stats, post_stats ,first_stats, second_stats;
size_t size = 2048;
int align = 1024;
int overhead = 0;
+ const size_t pgsz = rte_mem_page_size();
+ const size_t heap_size = (1 << 22);
+
+ if (pgsz > heap_size) {
+ printf("Page size (%zu) is bigger than heap size, skipping alloc stats test\n",
+ pgsz);
+ return TEST_SKIPPED;
+ }
+ if (heap_size % pgsz != 0) {
+ printf("Heap size (%zu) is not a multiple of page size (%zu), skipping alloc stats test\n",
+ heap_size, pgsz);
+ return TEST_SKIPPED;
+ }
+
+ if (rte_malloc_heap_create(__func__) != 0) {
+ printf("Failed to create test malloc heap\n");
+ goto end;
+ }
+
+ /* Allocate some memory using malloc and add it to our test heap. */
+ void *unaligned_memory = malloc(heap_size + pgsz);
+ if (unaligned_memory == NULL) {
+ printf("Failed to allocate memory\n");
+ goto cleanup_empty_heap;
+ }
+ void *memory = RTE_PTR_ALIGN(unaligned_memory, pgsz);
+ if (rte_malloc_heap_memory_add(__func__, memory, heap_size, NULL,
+ heap_size / pgsz, pgsz) != 0) {
+ printf("Failed to add memory to heap\n");
+ goto cleanup_allocated_memory;
+ }
+ socket = rte_malloc_heap_get_socket(__func__);
+ if (socket < 0) {
+ printf("Failed to get socket for test malloc heap.\n");
+ goto cleanup_all;
+ }
/* Dynamically calculate the overhead by allocating one cacheline and
* then comparing what was allocated from the heap.
@@ -280,7 +318,7 @@ test_multi_alloc_statistics(void)
void *dummy = rte_malloc_socket(NULL, RTE_CACHE_LINE_SIZE, 0, socket);
if (dummy == NULL)
- return -1;
+ goto cleanup_all;
rte_malloc_get_socket_stats(socket, &post_stats);
@@ -295,7 +333,8 @@ test_multi_alloc_statistics(void)
void *p1 = rte_malloc_socket("stats", size , align, socket);
if (!p1)
- return -1;
+ goto cleanup_all;
+
rte_free(p1);
rte_malloc_dump_stats(stdout, "stats");
@@ -308,7 +347,7 @@ test_multi_alloc_statistics(void)
(post_stats.alloc_count != pre_stats.alloc_count) ||
(post_stats.free_count != pre_stats.free_count)) {
printf("Malloc statistics are incorrect - freed alloc\n");
- return -1;
+ goto cleanup_all;
}
/* Check two consecutive allocations */
size = 1024;
@@ -316,12 +355,12 @@ test_multi_alloc_statistics(void)
rte_malloc_get_socket_stats(socket,&pre_stats);
void *p2 = rte_malloc_socket("add", size ,align, socket);
if (!p2)
- return -1;
+ goto cleanup_all;
rte_malloc_get_socket_stats(socket,&first_stats);
void *p3 = rte_malloc_socket("add2", size,align, socket);
if (!p3)
- return -1;
+ goto cleanup_all;
rte_malloc_get_socket_stats(socket,&second_stats);
@@ -333,34 +372,34 @@ test_multi_alloc_statistics(void)
if(second_stats.heap_totalsz_bytes != first_stats.heap_totalsz_bytes) {
printf("Incorrect heap statistics: Total size \n");
- return -1;
+ goto cleanup_all;
}
/* Check allocated size is equal to two additions plus overhead */
if(second_stats.heap_allocsz_bytes !=
size + overhead + first_stats.heap_allocsz_bytes) {
printf("Incorrect heap statistics: Allocated size \n");
- return -1;
+ goto cleanup_all;
}
/* Check that allocation count increments correctly i.e. +1 */
if (second_stats.alloc_count != first_stats.alloc_count + 1) {
printf("Incorrect heap statistics: Allocated count \n");
- return -1;
+ goto cleanup_all;
}
if (second_stats.free_count != first_stats.free_count){
printf("Incorrect heap statistics: Free count \n");
- return -1;
+ goto cleanup_all;
}
/* Make sure that we didn't touch our greatest chunk: 2 * 11M) */
if (post_stats.greatest_free_size != pre_stats.greatest_free_size) {
printf("Incorrect heap statistics: Greatest free size \n");
- return -1;
+ goto cleanup_all;
}
/* Free size must equal the original free size minus the new allocation*/
if (first_stats.heap_freesz_bytes <= second_stats.heap_freesz_bytes) {
printf("Incorrect heap statistics: Free size \n");
- return -1;
+ goto cleanup_all;
}
if ((post_stats.heap_totalsz_bytes != pre_stats.heap_totalsz_bytes) ||
@@ -369,9 +408,21 @@ test_multi_alloc_statistics(void)
(post_stats.alloc_count != pre_stats.alloc_count) ||
(post_stats.free_count != pre_stats.free_count)) {
printf("Malloc statistics are incorrect - freed alloc\n");
- return -1;
+ goto cleanup_all;
}
- return 0;
+
+ /* set return value as success before cleanup */
+ ret = 0;
+
+ /* cleanup */
+cleanup_all:
+ rte_malloc_heap_memory_remove(__func__, memory, heap_size);
+cleanup_allocated_memory:
+ free(unaligned_memory);
+cleanup_empty_heap:
+ rte_malloc_heap_destroy(__func__);
+end:
+ return ret;
}
#ifdef RTE_EXEC_ENV_WINDOWS
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.958247337 +0800
+++ 0056-test-malloc-improve-resiliency.patch 2025-06-26 19:59:17.430418042 +0800
@@ -1 +1 @@
-From 7777215715d475b5e884179de39ff4bc6b8cbf72 Mon Sep 17 00:00:00 2001
+From a62f48920d70c3d208363392290fd57c97200b4d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7777215715d475b5e884179de39ff4bc6b8cbf72 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 02a7d8ef20..d6f8da3b24 100644
+index cd579c503c..084c21480b 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'trace: fix overflow in per-lcore trace buffer' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (55 preceding siblings ...)
2025-06-26 12:01 ` patch 'test/malloc: improve resiliency' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'common/cnxk: fix E-tag pattern parsing' " Xueming Li
` (27 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Oleksandr Nahnybida; +Cc: Xueming Li, Sunil Kumar Kori, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d4506d1aba3c11b1a500ae58c02de67a5623aad1
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d4506d1aba3c11b1a500ae58c02de67a5623aad1 Mon Sep 17 00:00:00 2001
From: Oleksandr Nahnybida <oleksandrn@interfacemasters.com>
Date: Thu, 24 Apr 2025 20:08:18 +0300
Subject: [PATCH] trace: fix overflow in per-lcore trace buffer
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3c440cdfe87a2925af1be023e66bdf0bffc423a4 ]
Offset should be aligned first before checking if there is free space for
another write.
Bugzilla ID: 1665
Fixes: 032a7e5499a0 ("trace: implement provider payload")
Signed-off-by: Oleksandr Nahnybida <oleksandrn@interfacemasters.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
lib/eal/include/rte_trace_point.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/eal/include/rte_trace_point.h b/lib/eal/include/rte_trace_point.h
index 41e2a7f99e..ea49eca1f8 100644
--- a/lib/eal/include/rte_trace_point.h
+++ b/lib/eal/include/rte_trace_point.h
@@ -323,7 +323,7 @@ __rte_trace_mem_get(uint64_t in)
return NULL;
}
/* Check the wrap around case */
- uint32_t offset = trace->offset;
+ uint32_t offset = RTE_ALIGN_CEIL(trace->offset, __RTE_TRACE_EVENT_HEADER_SZ);
if (unlikely((offset + sz) >= trace->len)) {
/* Disable the trace event if it in DISCARD mode */
if (unlikely(in & __RTE_TRACE_FIELD_ENABLE_DISCARD))
@@ -331,8 +331,6 @@ __rte_trace_mem_get(uint64_t in)
offset = 0;
}
- /* Align to event header size */
- offset = RTE_ALIGN_CEIL(offset, __RTE_TRACE_EVENT_HEADER_SZ);
void *mem = RTE_PTR_ADD(&trace->mem[0], offset);
offset += sz;
trace->offset = offset;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.987758935 +0800
+++ 0057-trace-fix-overflow-in-per-lcore-trace-buffer.patch 2025-06-26 19:59:17.434418042 +0800
@@ -1 +1 @@
-From 3c440cdfe87a2925af1be023e66bdf0bffc423a4 Mon Sep 17 00:00:00 2001
+From d4506d1aba3c11b1a500ae58c02de67a5623aad1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3c440cdfe87a2925af1be023e66bdf0bffc423a4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 8a317d31d2..343e0271b3 100644
+index 41e2a7f99e..ea49eca1f8 100644
@@ -23 +25 @@
-@@ -328,7 +328,7 @@ __rte_trace_mem_get(uint64_t in)
+@@ -323,7 +323,7 @@ __rte_trace_mem_get(uint64_t in)
@@ -32 +34 @@
-@@ -336,8 +336,6 @@ __rte_trace_mem_get(uint64_t in)
+@@ -331,8 +331,6 @@ __rte_trace_mem_get(uint64_t in)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'common/cnxk: fix E-tag pattern parsing' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (56 preceding siblings ...)
2025-06-26 12:01 ` patch 'trace: fix overflow in per-lcore trace buffer' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'common/cnxk: fix CQ tail drop' " Xueming Li
` (26 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Satheesh Paul; +Cc: Xueming Li, Kiran Kumar K, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=26f01ea8285ae3eb02870a4667f58657019d5441
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 26f01ea8285ae3eb02870a4667f58657019d5441 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Thu, 22 May 2025 15:41:16 +0530
Subject: [PATCH] common/cnxk: fix E-tag pattern parsing
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ]
E-tag pattern parsing was using wrong length leading
to a segfault. Fixing this by using the correct length
of the pattern item.
Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
drivers/common/cnxk/roc_npc.c | 5 +++--
drivers/common/cnxk/roc_npc_parse.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index 9ea96a524c..9c95e57876 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -820,10 +820,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
pst->mcam_data = (uint8_t *)flow->mcam_data;
pst->mcam_mask = (uint8_t *)flow->mcam_mask;
- while (pattern->type != ROC_NPC_ITEM_TYPE_END &&
- layer < PLT_DIM(parse_stage_funcs)) {
+ while (pattern->type != ROC_NPC_ITEM_TYPE_END && layer < PLT_DIM(parse_stage_funcs)) {
/* Skip place-holders */
pattern = npc_parse_skip_void_and_any_items(pattern);
+ if (pattern->type == ROC_NPC_ITEM_TYPE_END)
+ break;
pst->pattern = pattern;
rc = parse_stage_funcs[layer](pst);
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 3c288070fb..3ee8752dae 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -505,6 +505,7 @@ npc_parse_lb(struct npc_parse_state *pst)
*/
lt = NPC_LT_LB_ETAG;
lflags = 0;
+ info.len = pattern->size;
last_pattern = pst->pattern;
pattern = npc_parse_skip_void_and_any_items(pst->pattern + 1);
@@ -519,7 +520,6 @@ npc_parse_lb(struct npc_parse_state *pst)
lflags = NPC_F_ETAG_CTAG;
last_pattern = pattern;
}
- info.len = pattern->size;
} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_QINQ) {
info.hw_mask = NULL;
info.len = pattern->size;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.017497834 +0800
+++ 0058-common-cnxk-fix-E-tag-pattern-parsing.patch 2025-06-26 19:59:17.438418042 +0800
@@ -1 +1 @@
-From a610e32b96768b84436ba523bc97af88df4d6963 Mon Sep 17 00:00:00 2001
+From 26f01ea8285ae3eb02870a4667f58657019d5441 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit a610e32b96768b84436ba523bc97af88df4d6963 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 1f2461e026..50106b8773 100644
+index 9ea96a524c..9c95e57876 100644
@@ -24 +26 @@
-@@ -995,10 +995,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
+@@ -820,10 +820,11 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],
@@ -39 +41 @@
-index b52024f434..37b43995db 100644
+index 3c288070fb..3ee8752dae 100644
@@ -42 +44 @@
-@@ -531,6 +531,7 @@ npc_parse_lb(struct npc_parse_state *pst)
+@@ -505,6 +505,7 @@ npc_parse_lb(struct npc_parse_state *pst)
@@ -50 +52 @@
-@@ -545,7 +546,6 @@ npc_parse_lb(struct npc_parse_state *pst)
+@@ -519,7 +520,6 @@ npc_parse_lb(struct npc_parse_state *pst)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'common/cnxk: fix CQ tail drop' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (57 preceding siblings ...)
2025-06-26 12:01 ` patch 'common/cnxk: fix E-tag pattern parsing' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/cnxk: fix descriptor count update on reconfig' " Xueming Li
` (25 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=589cb58bb089e8287dcaf43b9e1421aaa7716504
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 589cb58bb089e8287dcaf43b9e1421aaa7716504 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Wed, 28 May 2025 17:21:16 +0530
Subject: [PATCH] common/cnxk: fix CQ tail drop
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit dc8f10bb36bbd9dd961e4baba693181add66c962 ]
CQ tail drop feature is currently supposed to be enabled
when inline IPsec is disabled. But since XQE drop is not
enabled, CQ tail drop is implicitly disabled. Fix the same.
Fixes: c8c967e11717 ("common/cnxk: support enabling AURA tail drop for RQ")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/common/cnxk/roc_nix.h | 2 ++
drivers/common/cnxk/roc_nix_queue.c | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 250d710c07..3d507cace7 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -354,6 +354,8 @@ struct roc_nix_rq {
bool lpb_drop_ena;
/* SPB aura drop enable */
bool spb_drop_ena;
+ /* XQE drop enable */
+ bool xqe_drop_ena;
/* End of Input parameters */
struct roc_nix *roc_nix;
uint64_t meta_aura_handle;
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index f96d5c3a96..4ffc3a70da 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -368,7 +368,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
aq->rq.rq_int_ena = 0;
/* Many to one reduction */
aq->rq.qint_idx = rq->qid % qints;
- aq->rq.xqe_drop_ena = 1;
+ aq->rq.xqe_drop_ena = rq->xqe_drop_ena;
/* If RED enabled, then fill enable for all cases */
if (rq->red_pass && (rq->red_pass >= rq->red_drop)) {
@@ -452,6 +452,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
aq->rq.wqe_skip = rq->wqe_skip;
aq->rq.wqe_caching = 1;
+ aq->rq.xqe_drop_ena = 0;
aq->rq.good_utag = rq->tag_mask >> 24;
aq->rq.bad_utag = rq->tag_mask >> 24;
aq->rq.ltag = rq->tag_mask & BITMASK_ULL(24, 0);
@@ -471,6 +472,8 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
aq->rq.bad_utag = rq->tag_mask >> 24;
aq->rq.ltag = rq->tag_mask & BITMASK_ULL(24, 0);
aq->rq.cq = rq->cqid;
+ if (rq->xqe_drop_ena)
+ aq->rq.xqe_drop_ena = 1;
}
if (rq->ipsech_ena) {
@@ -519,7 +522,6 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
aq->rq.rq_int_ena = 0;
/* Many to one reduction */
aq->rq.qint_idx = rq->qid % qints;
- aq->rq.xqe_drop_ena = 0;
aq->rq.lpb_drop_ena = rq->lpb_drop_ena;
aq->rq.spb_drop_ena = rq->spb_drop_ena;
@@ -564,6 +566,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
aq->rq_mask.bad_utag = ~aq->rq_mask.bad_utag;
aq->rq_mask.ltag = ~aq->rq_mask.ltag;
aq->rq_mask.cq = ~aq->rq_mask.cq;
+ aq->rq_mask.xqe_drop_ena = ~aq->rq_mask.xqe_drop_ena;
}
if (rq->ipsech_ena)
@@ -675,6 +678,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
rq->roc_nix = roc_nix;
rq->tc = ROC_NIX_PFC_CLASS_INVALID;
+ /* Enable XQE/CQ drop on cn10k to count pkt drops only when inline is disabled */
+ if (roc_model_is_cn10k() && !roc_nix_inl_inb_is_enabled(roc_nix))
+ rq->xqe_drop_ena = true;
+
if (is_cn9k)
rc = nix_rq_cn9k_cfg(dev, rq, nix->qints, false, ena);
else
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.048455733 +0800
+++ 0059-common-cnxk-fix-CQ-tail-drop.patch 2025-06-26 19:59:17.442418042 +0800
@@ -1 +1 @@
-From dc8f10bb36bbd9dd961e4baba693181add66c962 Mon Sep 17 00:00:00 2001
+From 589cb58bb089e8287dcaf43b9e1421aaa7716504 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit dc8f10bb36bbd9dd961e4baba693181add66c962 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 80392e7e1b..1e543d8f11 100644
+index 250d710c07..3d507cace7 100644
@@ -23 +25 @@
-@@ -355,6 +355,8 @@ struct roc_nix_rq {
+@@ -354,6 +354,8 @@ struct roc_nix_rq {
@@ -33 +35 @@
-index e852211ba4..39bd051c94 100644
+index f96d5c3a96..4ffc3a70da 100644
@@ -36 +38 @@
-@@ -530,7 +530,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
+@@ -368,7 +368,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
@@ -45 +47 @@
-@@ -613,6 +613,7 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -452,6 +452,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -53 +55 @@
-@@ -632,6 +633,8 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -471,6 +472,8 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -62 +64 @@
-@@ -680,7 +683,6 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -519,7 +522,6 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -70 +72 @@
-@@ -725,6 +727,7 @@ nix_rq_cn10k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cf
+@@ -564,6 +566,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
@@ -78 +80 @@
-@@ -950,6 +953,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
+@@ -675,6 +678,10 @@ roc_nix_rq_init(struct roc_nix *roc_nix, struct roc_nix_rq *rq, bool ena)
@@ -88 +90 @@
- else if (roc_model_is_cn10k())
+ else
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/cnxk: fix descriptor count update on reconfig' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (58 preceding siblings ...)
2025-06-26 12:01 ` patch 'common/cnxk: fix CQ tail drop' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'ethdev: fix error struct in flow configure' " Xueming Li
` (24 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Rahul Bhansali; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9e7d0ee5fc5fce17d7d21e6d10ca5e2f61963725
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9e7d0ee5fc5fce17d7d21e6d10ca5e2f61963725 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Wed, 28 May 2025 17:21:19 +0530
Subject: [PATCH] net/cnxk: fix descriptor count update on reconfig
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ad23295cb8217390b9f966ad5ee10a4e21f9c20b ]
In Rx queue setup, input descriptors count is updated as per
requirement, and stored. But during port reconfig , this
descriptor count will change again in rx queue setup.
Hence, will need to store the initial input descriptor count.
Fixes: a86144cd9ded ("net/cnxk: add Rx queue setup and release")
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index f0cf376e7d..bcb4790aa9 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -626,6 +626,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
struct roc_nix *nix = &dev->nix;
struct cnxk_eth_rxq_sp *rxq_sp;
struct rte_mempool_ops *ops;
+ uint32_t desc_cnt = nb_desc;
const char *platform_ops;
struct roc_nix_rq *rq;
struct roc_nix_cq *cq;
@@ -747,7 +748,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
rxq_sp->qconf.conf.rx = *rx_conf;
/* Queue config should reflect global offloads */
rxq_sp->qconf.conf.rx.offloads = dev->rx_offloads;
- rxq_sp->qconf.nb_desc = nb_desc;
+ rxq_sp->qconf.nb_desc = desc_cnt;
rxq_sp->qconf.mp = lpb_pool;
rxq_sp->tc = 0;
rxq_sp->tx_pause = (dev->fc_cfg.mode == RTE_ETH_FC_FULL ||
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.080887032 +0800
+++ 0060-net-cnxk-fix-descriptor-count-update-on-reconfig.patch 2025-06-26 19:59:17.446418041 +0800
@@ -1 +1 @@
-From ad23295cb8217390b9f966ad5ee10a4e21f9c20b Mon Sep 17 00:00:00 2001
+From 9e7d0ee5fc5fce17d7d21e6d10ca5e2f61963725 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ad23295cb8217390b9f966ad5ee10a4e21f9c20b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 85fdb4dc91..fc17841bca 100644
+index f0cf376e7d..bcb4790aa9 100644
@@ -23 +25 @@
-@@ -653,6 +653,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
+@@ -626,6 +626,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
@@ -31 +33 @@
-@@ -778,7 +779,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
+@@ -747,7 +748,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'ethdev: fix error struct in flow configure' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (59 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/cnxk: fix descriptor count update on reconfig' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/ice/base: fix integer overflow' " Xueming Li
` (23 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=87abb5b57dcf720c4ec72799664d16fcae1736b8
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 87abb5b57dcf720c4ec72799664d16fcae1736b8 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Thu, 29 May 2025 08:56:10 +0300
Subject: [PATCH] ethdev: fix error struct in flow configure
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit af7ac22d8da82398065d5f3c799c17a7cec3a6af ]
rte_flow_configure() returned error value w/o filling the
error struct which caused a crash on complain function.
Filling the error struct fixed the issue.
Fixes: 4ff58b734bc9 ("ethdev: introduce flow engine configuration")
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
---
lib/ethdev/rte_flow.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index fa2a8fedce..cce9e08168 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -1675,21 +1675,21 @@ rte_flow_configure(uint16_t port_id,
RTE_FLOW_LOG(INFO,
"Device with port_id=%"PRIu16" is not configured.\n",
port_id);
- return -EINVAL;
+ goto error;
}
if (dev->data->dev_started != 0) {
RTE_FLOW_LOG(INFO,
"Device with port_id=%"PRIu16" already started.\n",
port_id);
- return -EINVAL;
+ goto error;
}
if (port_attr == NULL) {
RTE_FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.\n", port_id);
- return -EINVAL;
+ goto error;
}
if (queue_attr == NULL) {
RTE_FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.\n", port_id);
- return -EINVAL;
+ goto error;
}
if ((port_attr->flags & RTE_FLOW_PORT_FLAG_SHARE_INDIRECT) &&
!rte_eth_dev_is_valid_port(port_attr->host_port_id)) {
@@ -1710,6 +1710,10 @@ rte_flow_configure(uint16_t port_id,
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL, rte_strerror(ENOTSUP));
+error:
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL, rte_strerror(EINVAL));
}
struct rte_flow_pattern_template *
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.115243030 +0800
+++ 0061-ethdev-fix-error-struct-in-flow-configure.patch 2025-06-26 19:59:17.446418041 +0800
@@ -1 +1 @@
-From af7ac22d8da82398065d5f3c799c17a7cec3a6af Mon Sep 17 00:00:00 2001
+From 87abb5b57dcf720c4ec72799664d16fcae1736b8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit af7ac22d8da82398065d5f3c799c17a7cec3a6af ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9f8d8f3dc2..fe8f43caff 100644
+index fa2a8fedce..cce9e08168 100644
@@ -23,3 +25,3 @@
-@@ -1725,21 +1725,21 @@ rte_flow_configure(uint16_t port_id,
- FLOW_LOG(INFO,
- "Device with port_id=%"PRIu16" is not configured.",
+@@ -1675,21 +1675,21 @@ rte_flow_configure(uint16_t port_id,
+ RTE_FLOW_LOG(INFO,
+ "Device with port_id=%"PRIu16" is not configured.\n",
@@ -31,2 +33,2 @@
- FLOW_LOG(INFO,
- "Device with port_id=%"PRIu16" already started.",
+ RTE_FLOW_LOG(INFO,
+ "Device with port_id=%"PRIu16" already started.\n",
@@ -38 +40 @@
- FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.", port_id);
+ RTE_FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.\n", port_id);
@@ -43 +45 @@
- FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.", port_id);
+ RTE_FLOW_LOG(ERR, "Port %"PRIu16" queue info is NULL.\n", port_id);
@@ -49 +51 @@
-@@ -1760,6 +1760,10 @@ rte_flow_configure(uint16_t port_id,
+@@ -1710,6 +1710,10 @@ rte_flow_configure(uint16_t port_id,
@@ -59 +61 @@
- RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_flow_pattern_template_create, 22.03)
+ struct rte_flow_pattern_template *
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ice/base: fix integer overflow' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (60 preceding siblings ...)
2025-06-26 12:01 ` patch 'ethdev: fix error struct in flow configure' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/ice/base: fix typo in device ID description' " Xueming Li
` (22 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Lukasz Krakowiak; +Cc: Xueming Li, Dhanya Pillai, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=5d990d209f1e697665e7821e321d213f94d890a9
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 5d990d209f1e697665e7821e321d213f94d890a9 Mon Sep 17 00:00:00 2001
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Date: Tue, 27 May 2025 13:17:22 +0000
Subject: [PATCH] net/ice/base: fix integer overflow
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 152ebcea022feb1498fed591f92ebcf394a16ea7 ]
Fix integer overflow in power of two calculation. Flagged by internal
static analysis.
Fixes: aa1cd410fa64 ("net/ice/base: add flow module")
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index d13105070b..9d442e7e98 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -25,7 +25,7 @@
*/
static inline bool ice_is_pow2(u64 val)
{
- return (val && !(val & (val - 1)));
+ return val != 0 && (val & (val - 1)) == 0;
}
/**
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.145926029 +0800
+++ 0062-net-ice-base-fix-integer-overflow.patch 2025-06-26 19:59:17.450418041 +0800
@@ -1 +1 @@
-From 152ebcea022feb1498fed591f92ebcf394a16ea7 Mon Sep 17 00:00:00 2001
+From 5d990d209f1e697665e7821e321d213f94d890a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 152ebcea022feb1498fed591f92ebcf394a16ea7 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- drivers/net/intel/ice/base/ice_type.h | 2 +-
+ drivers/net/ice/base/ice_type.h | 2 +-
@@ -19,4 +21,4 @@
-diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
-index 297a5ea890..ae3b944d6e 100644
---- a/drivers/net/intel/ice/base/ice_type.h
-+++ b/drivers/net/intel/ice/base/ice_type.h
+diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
+index d13105070b..9d442e7e98 100644
+--- a/drivers/net/ice/base/ice_type.h
++++ b/drivers/net/ice/base/ice_type.h
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/ice/base: fix typo in device ID description' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (61 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/ice/base: fix integer overflow' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP key command race condition' " Xueming Li
` (21 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Lukasz Krakowiak; +Cc: Xueming Li, Dhanya Pillai, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3aaa3155ba23ac636c7f2b2725721b084cc77344
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3aaa3155ba23ac636c7f2b2725721b084cc77344 Mon Sep 17 00:00:00 2001
From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Date: Tue, 27 May 2025 13:17:24 +0000
Subject: [PATCH] net/ice/base: fix typo in device ID description
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 ]
Fix typo in desc for dev ID 579F.
Fixes: 6fd3889c1779 ("net/ice/base: support E824S and E825 devices")
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_devids.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
index 19478d2db1..f78a9408d7 100644
--- a/drivers/net/ice/base/ice_devids.h
+++ b/drivers/net/ice/base/ice_devids.h
@@ -72,7 +72,7 @@
#define ICE_DEV_ID_E825C_QSFP 0x579D
/* Intel(R) Ethernet Connection E825-C for SFP */
#define ICE_DEV_ID_E825C_SFP 0x579E
-/* Intel(R) Ethernet Connection E825-C 1GbE */
+/* Intel(R) Ethernet Connection E825-C 10GbE */
#define ICE_DEV_ID_E825C_SGMII 0x579F
#define ICE_DEV_ID_C825X 0x0DCD
#endif /* _ICE_DEVIDS_H_ */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.177855227 +0800
+++ 0063-net-ice-base-fix-typo-in-device-ID-description.patch 2025-06-26 19:59:17.454418041 +0800
@@ -1 +1 @@
-From e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 Mon Sep 17 00:00:00 2001
+From 3aaa3155ba23ac636c7f2b2725721b084cc77344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e54cf1fec8517f9ec1ec6bdca6fd9e6b0dd2c307 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- drivers/net/intel/ice/base/ice_devids.h | 2 +-
+ drivers/net/ice/base/ice_devids.h | 2 +-
@@ -18,6 +20,6 @@
-diff --git a/drivers/net/intel/ice/base/ice_devids.h b/drivers/net/intel/ice/base/ice_devids.h
-index 807b5d0c29..20c6dbd4a5 100644
---- a/drivers/net/intel/ice/base/ice_devids.h
-+++ b/drivers/net/intel/ice/base/ice_devids.h
-@@ -90,7 +90,7 @@
- #define ICE_DEV_ID_E825C_QSFP 0x579D
+diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
+index 19478d2db1..f78a9408d7 100644
+--- a/drivers/net/ice/base/ice_devids.h
++++ b/drivers/net/ice/base/ice_devids.h
+@@ -72,7 +72,7 @@
+ #define ICE_DEV_ID_E825C_QSFP 0x579D
@@ -25 +27 @@
- #define ICE_DEV_ID_E825C_SFP 0x579E
+ #define ICE_DEV_ID_E825C_SFP 0x579E
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'common/dpaax: fix PDCP key command race condition' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (62 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/ice/base: fix typo in device ID description' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " Xueming Li
` (20 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2510a08552031c49a6db3b1662355c10726e4b0e
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2510a08552031c49a6db3b1662355c10726e4b0e Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 21 May 2025 12:26:50 +0530
Subject: [PATCH] common/dpaax: fix PDCP key command race condition
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ]
A race condition between loading the key into CAAM’s internal
memory and initiating cryptographic operations can cause SEC
errors in PDCP AES algorithm combinations.
To mitigate this, the CALM instruction is added for the
12-bit SN case, and the older version of the descriptor
is used for the 18-bit SN case.
Fixes: 6127fff842a7 ("common/dpaax: remove outdated caamflib code")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/pdcp.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 27dd5c4347..9a87b2c6b6 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
* Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019-2023 NXP
+ * Copyright 2019-2025 NXP
*/
#ifndef __DESC_PDCP_H__
@@ -1981,8 +1981,7 @@ pdcp_insert_uplane_no_int_op(struct program *p,
KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
cipherdata->keylen, INLINE_KEY(cipherdata));
- if ((sn_size == PDCP_SN_SIZE_15) ||
- (rta_sec_era >= RTA_SEC_ERA_10)) {
+ if (sn_size == PDCP_SN_SIZE_15) {
PROTOCOL(p, dir, OP_PCLID_LTE_PDCP_USER,
(uint16_t)cipherdata->algtype);
return 0;
@@ -2747,6 +2746,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
(uint64_t)cipherdata->key, cipherdata->keylen,
INLINE_KEY(cipherdata));
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
if (authdata)
PROTOCOL(p, OP_TYPE_ENCAP_PROTOCOL,
OP_PCLID_LTE_PDCP_USER_RN,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.208401026 +0800
+++ 0064-common-dpaax-fix-PDCP-key-command-race-condition.patch 2025-06-26 19:59:17.458418041 +0800
@@ -1 +1 @@
-From 684faacc0fde7110c31c640669381dbf19f447f8 Mon Sep 17 00:00:00 2001
+From 2510a08552031c49a6db3b1662355c10726e4b0e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 9ada3905c5..f4379ede2c 100644
+index 27dd5c4347..9a87b2c6b6 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'common/dpaax: fix PDCP AES only 12-bit SN' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (63 preceding siblings ...)
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP key command race condition' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'crypto/dpaa2_sec: fix uninitialized variable' " Xueming Li
` (19 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0b7a18a4432e4dbf0ac84257d63399581600e42e
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0b7a18a4432e4dbf0ac84257d63399581600e42e Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 21 May 2025 12:26:51 +0530
Subject: [PATCH] common/dpaax: fix PDCP AES only 12-bit SN
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 ]
This workaround fixes the invalid key command SEC error.
Fixes: 6127fff842a7 ("common/dpaax: remove outdated caamflib code")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/pdcp.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 9a87b2c6b6..dc5f7cedff 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -619,7 +619,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,
KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
cipherdata->keylen, INLINE_KEY(cipherdata));
- if ((sn_size != PDCP_SN_SIZE_18 &&
+ if ((authdata && sn_size != PDCP_SN_SIZE_18 &&
!(rta_sec_era == RTA_SEC_ERA_8 &&
authdata->algtype == 0))
|| (rta_sec_era == RTA_SEC_ERA_10)) {
@@ -631,6 +631,7 @@ pdcp_insert_cplane_enc_only_op(struct program *p,
(uint16_t)cipherdata->algtype << 8);
return 0;
}
+
/* Non-proto is supported only for 5bit cplane and 18bit uplane */
switch (sn_size) {
case PDCP_SN_SIZE_5:
@@ -2719,7 +2720,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
case PDCP_CIPHER_TYPE_AES:
case PDCP_CIPHER_TYPE_SNOW:
case PDCP_CIPHER_TYPE_NULL:
- if (rta_sec_era == RTA_SEC_ERA_8 &&
+ if (rta_sec_era >= RTA_SEC_ERA_8 &&
authdata && authdata->algtype == 0){
err = pdcp_insert_uplane_with_int_op(p, swap,
cipherdata, authdata,
@@ -2729,6 +2730,17 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf,
return err;
break;
}
+ if (rta_sec_era >= RTA_SEC_ERA_8 &&
+ cipherdata->algtype == PDCP_CIPHER_TYPE_AES
+ && !authdata
+ && sn_size == PDCP_SN_SIZE_12) {
+ err = pdcp_insert_cplane_enc_only_op(p, swap, cipherdata,
+ authdata,
+ OP_TYPE_ENCAP_PROTOCOL, sn_size);
+ if (err)
+ return err;
+ break;
+ }
if (pdb_type != PDCP_PDB_TYPE_FULL_PDB) {
pr_err("PDB type must be FULL for PROTO desc\n");
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.239639625 +0800
+++ 0065-common-dpaax-fix-PDCP-AES-only-12-bit-SN.patch 2025-06-26 19:59:17.462418041 +0800
@@ -1 +1 @@
-From f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 Mon Sep 17 00:00:00 2001
+From 0b7a18a4432e4dbf0ac84257d63399581600e42e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f0ccfc4ddc7a01f4544b8a2913cc3d3f7c8b8832 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index f4379ede2c..c90eff26a8 100644
+index 9a87b2c6b6..dc5f7cedff 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/dpaa2_sec: fix uninitialized variable' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (64 preceding siblings ...)
2025-06-26 12:01 ` patch 'common/dpaax: fix PDCP AES only 12-bit SN' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: add request check on request side' " Xueming Li
` (18 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c7f8e70eff827fe2441742ed5d810d642e2cd7ea
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From c7f8e70eff827fe2441742ed5d810d642e2cd7ea Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Wed, 21 May 2025 12:26:54 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix uninitialized variable
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit db4bef492253c23c0ff3e4c4a8124eb5af09f971 ]
Fixes the uninitialized variable.
Fixes: 1182b364312c ("crypto/dpaax_sec: set authdata in non-auth case")
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index b9826c4fcf..bbccd3fdbe 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3584,6 +3584,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
session->auth_key.data = NULL;
session->auth_key.length = 0;
session->auth_alg = 0;
+ authdata.algtype = PDCP_AUTH_TYPE_NULL;
}
authdata.key = (size_t)session->auth_key.data;
authdata.keylen = session->auth_key.length;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.269804624 +0800
+++ 0066-crypto-dpaa2_sec-fix-uninitialized-variable.patch 2025-06-26 19:59:17.466418041 +0800
@@ -1 +1 @@
-From db4bef492253c23c0ff3e4c4a8124eb5af09f971 Mon Sep 17 00:00:00 2001
+From c7f8e70eff827fe2441742ed5d810d642e2cd7ea Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit db4bef492253c23c0ff3e4c4a8124eb5af09f971 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 925d2709d2..5995eb58d8 100644
+index b9826c4fcf..bbccd3fdbe 100644
@@ -20 +22 @@
-@@ -3576,6 +3576,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3584,6 +3584,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/virtio: add request check on request side' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (65 preceding siblings ...)
2025-06-26 12:01 ` patch 'crypto/dpaa2_sec: fix uninitialized variable' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver cleanup' " Xueming Li
` (17 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Radu Nicolau; +Cc: Xueming Li, Fan Zhang, Yu Jiang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1356ebb2564d202abc4d80a33fc601bef7674432
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 1356ebb2564d202abc4d80a33fc601bef7674432 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Fri, 23 May 2025 14:04:50 +0000
Subject: [PATCH] crypto/virtio: add request check on request side
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9771f037ec8c6592126be49ca50953d1a14a0335 ]
Add same request checks on the request side.
Fixes: b2866f473369 ("vhost/crypto: fix missed request check for copy mode")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
---
drivers/crypto/virtio/virtio_rxtx.c | 40 +++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 01977c7ec4..d645e757f5 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -107,6 +107,40 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq,
return i;
}
+static __rte_always_inline uint8_t
+virtqueue_crypto_check_cipher_request(struct virtio_crypto_cipher_data_req *req)
+{
+ if (likely((req->para.iv_len <= VIRTIO_CRYPTO_MAX_IV_SIZE) &&
+ (req->para.src_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.dst_data_len >= req->para.src_data_len) &&
+ (req->para.dst_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE)))
+ return VIRTIO_CRYPTO_OK;
+ return VIRTIO_CRYPTO_BADMSG;
+}
+
+static __rte_always_inline uint8_t
+virtqueue_crypto_check_chain_request(struct virtio_crypto_alg_chain_data_req *req)
+{
+ if (likely((req->para.iv_len <= VIRTIO_CRYPTO_MAX_IV_SIZE) &&
+ (req->para.src_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.dst_data_len >= req->para.src_data_len) &&
+ (req->para.dst_data_len <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.cipher_start_src_offset <
+ RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.len_to_cipher <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.hash_start_src_offset <
+ RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.len_to_hash <= RTE_MBUF_DEFAULT_BUF_SIZE) &&
+ (req->para.cipher_start_src_offset + req->para.len_to_cipher <=
+ req->para.src_data_len) &&
+ (req->para.hash_start_src_offset + req->para.len_to_hash <=
+ req->para.src_data_len) &&
+ (req->para.dst_data_len + req->para.hash_result_len <=
+ RTE_MBUF_DEFAULT_BUF_SIZE)))
+ return VIRTIO_CRYPTO_OK;
+ return VIRTIO_CRYPTO_BADMSG;
+}
+
static int
virtqueue_crypto_sym_pkt_header_arrange(
struct rte_crypto_op *cop,
@@ -142,6 +176,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
sym_op->cipher.data.offset);
req_data->u.sym_req.u.cipher.para.dst_data_len =
req_data->u.sym_req.u.cipher.para.src_data_len;
+ if (virtqueue_crypto_check_cipher_request(
+ &req_data->u.sym_req.u.cipher) != VIRTIO_CRYPTO_OK)
+ return -1;
break;
case VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING:
req_data->u.sym_req.op_type =
@@ -181,6 +218,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
VIRTIO_CRYPTO_SYM_HASH_MODE_AUTH)
req_data->u.sym_req.u.chain.para.hash_result_len =
chain_para->u.mac_param.hash_result_len;
+ if (virtqueue_crypto_check_chain_request(
+ &req_data->u.sym_req.u.chain) != VIRTIO_CRYPTO_OK)
+ return -1;
break;
default:
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.302178122 +0800
+++ 0067-crypto-virtio-add-request-check-on-request-side.patch 2025-06-26 19:59:17.466418041 +0800
@@ -1 +1 @@
-From 9771f037ec8c6592126be49ca50953d1a14a0335 Mon Sep 17 00:00:00 2001
+From 1356ebb2564d202abc4d80a33fc601bef7674432 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9771f037ec8c6592126be49ca50953d1a14a0335 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index a7f1bd9753..00988e18b1 100644
+index 01977c7ec4..d645e757f5 100644
@@ -22 +24 @@
-@@ -193,6 +193,40 @@ virtqueue_dequeue_burst_rx_packed(struct virtqueue *vq,
+@@ -107,6 +107,40 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq,
@@ -60 +62 @@
- static inline int
+ static int
@@ -63 +65 @@
-@@ -228,6 +262,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -142,6 +176,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
@@ -73 +75 @@
-@@ -267,6 +304,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
+@@ -181,6 +218,9 @@ virtqueue_crypto_sym_pkt_header_arrange(
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/virtio: fix driver cleanup' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (66 preceding siblings ...)
2025-06-26 12:01 ` patch 'crypto/virtio: add request check on request side' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver ID' " Xueming Li
` (16 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Radu Nicolau; +Cc: Xueming Li, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d9ed369aa2b3f96f22f72f6878f49e77fc8b0f16
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From d9ed369aa2b3f96f22f72f6878f49e77fc8b0f16 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 29 May 2025 11:45:53 +0000
Subject: [PATCH] crypto/virtio: fix driver cleanup
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6adb7f4ae156341958463db80951d8f528932e9f ]
Improper cleanup resulted in a segfault when more
than 1 device was used
Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/virtio/virtio_cryptodev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 332e109876..d99b53b2ef 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -779,8 +779,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
cryptodev->enqueue_burst = NULL;
cryptodev->dequeue_burst = NULL;
- rte_free(cryptodev->data);
- cryptodev->data = NULL;
+ rte_cryptodev_pmd_release_device(cryptodev);
VIRTIO_CRYPTO_DRV_LOG_INFO("dev_uninit completed");
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.334099721 +0800
+++ 0068-crypto-virtio-fix-driver-cleanup.patch 2025-06-26 19:59:17.470418040 +0800
@@ -1 +1 @@
-From 6adb7f4ae156341958463db80951d8f528932e9f Mon Sep 17 00:00:00 2001
+From d9ed369aa2b3f96f22f72f6878f49e77fc8b0f16 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6adb7f4ae156341958463db80951d8f528932e9f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f591cf0c7a..299898e585 100644
+index 332e109876..d99b53b2ef 100644
@@ -22 +24 @@
-@@ -625,8 +625,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
+@@ -779,8 +779,7 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/virtio: fix driver ID' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (67 preceding siblings ...)
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver cleanup' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " Xueming Li
` (15 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Rajesh Mudimadugula; +Cc: Xueming Li, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=9c9ce1e0cef63b173df003aa9d5f0d975ed85cf2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 9c9ce1e0cef63b173df003aa9d5f0d975ed85cf2 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Date: Wed, 28 May 2025 10:53:47 +0000
Subject: [PATCH] crypto/virtio: fix driver ID
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 9843181aa5e764fd6876f50e8a795353e9261cb1 ]
This patch corrects driver id for virtio and virtio_user
pmds.
Fixes: 25500d4b8076 ("crypto/virtio: support device init")
Signed-off-by: Rajesh Mudimadugula <rmudimadugul@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/virtio/virtio_cryptodev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index d99b53b2ef..c208e76c7a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -731,7 +731,6 @@ crypto_virtio_create(const char *name, struct rte_pci_device *pci_dev,
if (cryptodev == NULL)
return -ENODEV;
- cryptodev->driver_id = cryptodev_virtio_driver_id;
cryptodev->dev_ops = &virtio_crypto_dev_ops;
cryptodev->enqueue_burst = virtio_crypto_pkt_tx_burst;
@@ -755,6 +754,7 @@ crypto_virtio_create(const char *name, struct rte_pci_device *pci_dev,
if (virtio_crypto_init_device(cryptodev,
VIRTIO_CRYPTO_PMD_GUEST_FEATURES) < 0)
+ cryptodev->driver_id = cryptodev_virtio_driver_id;
return -1;
rte_cryptodev_pmd_probing_finish(cryptodev);
@@ -1392,7 +1392,7 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
PMD_INIT_FUNC_TRACE();
if (info != NULL) {
- info->driver_id = cryptodev_virtio_driver_id;
+ info->driver_id = dev->driver_id;
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
/* No limit of number of sessions */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.370336119 +0800
+++ 0069-crypto-virtio-fix-driver-ID.patch 2025-06-26 19:59:17.474418040 +0800
@@ -1 +1 @@
-From 9843181aa5e764fd6876f50e8a795353e9261cb1 Mon Sep 17 00:00:00 2001
+From 9c9ce1e0cef63b173df003aa9d5f0d975ed85cf2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 9843181aa5e764fd6876f50e8a795353e9261cb1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +17,2 @@
- drivers/crypto/virtio/virtio_cryptodev.c | 4 ++--
- drivers/crypto/virtio/virtio_user_cryptodev.c | 5 +++--
- 2 files changed, 5 insertions(+), 4 deletions(-)
+ drivers/crypto/virtio/virtio_cryptodev.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -20 +21 @@
-index 299898e585..d661ce8025 100644
+index d99b53b2ef..c208e76c7a 100644
@@ -23,3 +24,3 @@
-@@ -550,7 +550,6 @@ crypto_virtio_dev_init(struct rte_cryptodev *cryptodev, uint64_t features,
- {
- struct virtio_crypto_hw *hw;
+@@ -731,7 +731,6 @@ crypto_virtio_create(const char *name, struct rte_pci_device *pci_dev,
+ if (cryptodev == NULL)
+ return -ENODEV;
@@ -31,3 +32 @@
-@@ -599,6 +598,7 @@ crypto_virtio_create(const char *name, struct rte_pci_device *pci_dev,
- if (cryptodev == NULL)
- return -ENODEV;
+@@ -755,6 +754,7 @@ crypto_virtio_create(const char *name, struct rte_pci_device *pci_dev,
@@ -34,0 +34,2 @@
+ if (virtio_crypto_init_device(cryptodev,
+ VIRTIO_CRYPTO_PMD_GUEST_FEATURES) < 0)
@@ -36,2 +36,0 @@
- if (crypto_virtio_dev_init(cryptodev, VIRTIO_CRYPTO_PMD_GUEST_FEATURES,
- pci_dev) < 0)
@@ -39 +38,3 @@
-@@ -1694,7 +1694,7 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
+
+ rte_cryptodev_pmd_probing_finish(cryptodev);
+@@ -1392,7 +1392,7 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
@@ -48,30 +48,0 @@
-diff --git a/drivers/crypto/virtio/virtio_user_cryptodev.c b/drivers/crypto/virtio/virtio_user_cryptodev.c
-index 992e8fb43b..4daa188e1d 100644
---- a/drivers/crypto/virtio/virtio_user_cryptodev.c
-+++ b/drivers/crypto/virtio/virtio_user_cryptodev.c
-@@ -26,6 +26,8 @@
-
- #define virtio_user_get_dev(hwp) container_of(hwp, struct virtio_user_dev, hw)
-
-+uint8_t cryptodev_virtio_user_driver_id;
-+
- static void
- virtio_user_read_dev_config(struct virtio_crypto_hw *hw, size_t offset,
- void *dst, int length __rte_unused)
-@@ -460,6 +462,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev)
- goto end;
- }
-
-+ cryptodev->driver_id = cryptodev_virtio_user_driver_id;
- if (crypto_virtio_dev_init(cryptodev, VIRTIO_USER_CRYPTO_PMD_GUEST_FEATURES,
- NULL) < 0) {
- PMD_INIT_LOG(ERR, "crypto_virtio_dev_init fails");
-@@ -563,8 +566,6 @@ static struct rte_vdev_driver virtio_user_driver = {
-
- static struct cryptodev_driver virtio_crypto_drv;
-
--uint8_t cryptodev_virtio_user_driver_id;
--
- RTE_PMD_REGISTER_VDEV(crypto_virtio_user, virtio_user_driver);
- RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
- virtio_user_driver.driver,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'ethdev: keep promiscuous/allmulti value before disabling' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (68 preceding siblings ...)
2025-06-26 12:01 ` patch 'crypto/virtio: fix driver ID' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'eal: fix return value of lcore role' " Xueming Li
` (14 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Sunyang Wu; +Cc: Xueming Li, Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=aad19713c88057e2d0a1b636a615a5c42fdee439
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From aad19713c88057e2d0a1b636a615a5c42fdee439 Mon Sep 17 00:00:00 2001
From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Date: Thu, 22 May 2025 15:42:42 +0800
Subject: [PATCH] ethdev: keep promiscuous/allmulti value before disabling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 00add16978762a8bcd98cd9465503194dc4c1e9a ]
The values were reset to 0 before calling the driver function
for disabling promiscuous or allmulticast,
which could lead the driver to skip disabling.
The values of the promiscuous and allmulticast variables
are set after calling the driver, according to the return value.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/ethdev/rte_ethdev.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 86fd457f78..704fc3eae2 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2891,10 +2891,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
if (*dev->dev_ops->promiscuous_disable == NULL)
return -ENOTSUP;
- dev->data->promiscuous = 0;
diag = (*dev->dev_ops->promiscuous_disable)(dev);
- if (diag != 0)
- dev->data->promiscuous = 1;
+ if (diag == 0)
+ dev->data->promiscuous = 0;
diag = eth_err(port_id, diag);
@@ -2956,10 +2955,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
if (*dev->dev_ops->allmulticast_disable == NULL)
return -ENOTSUP;
- dev->data->all_multicast = 0;
+
diag = (*dev->dev_ops->allmulticast_disable)(dev);
- if (diag != 0)
- dev->data->all_multicast = 1;
+ if (diag == 0)
+ dev->data->all_multicast = 0;
diag = eth_err(port_id, diag);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.405382318 +0800
+++ 0070-ethdev-keep-promiscuous-allmulti-value-before-disabl.patch 2025-06-26 19:59:17.478418040 +0800
@@ -1 +1 @@
-From 00add16978762a8bcd98cd9465503194dc4c1e9a Mon Sep 17 00:00:00 2001
+From aad19713c88057e2d0a1b636a615a5c42fdee439 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 00add16978762a8bcd98cd9465503194dc4c1e9a ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index d4197322a0..dd7c00bc94 100644
+index 86fd457f78..704fc3eae2 100644
@@ -29,2 +31,2 @@
-@@ -3044,10 +3044,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
- if (dev->dev_ops->promiscuous_disable == NULL)
+@@ -2891,10 +2891,9 @@ rte_eth_promiscuous_disable(uint16_t port_id)
+ if (*dev->dev_ops->promiscuous_disable == NULL)
@@ -34 +36 @@
- diag = dev->dev_ops->promiscuous_disable(dev);
+ diag = (*dev->dev_ops->promiscuous_disable)(dev);
@@ -42 +44 @@
-@@ -3112,10 +3111,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
+@@ -2956,10 +2955,10 @@ rte_eth_allmulticast_disable(uint16_t port_id)
@@ -44 +46 @@
- if (dev->dev_ops->allmulticast_disable == NULL)
+ if (*dev->dev_ops->allmulticast_disable == NULL)
@@ -48 +50 @@
- diag = dev->dev_ops->allmulticast_disable(dev);
+ diag = (*dev->dev_ops->allmulticast_disable)(dev);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'eal: fix return value of lcore role' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (69 preceding siblings ...)
2025-06-26 12:01 ` patch 'ethdev: keep promiscuous/allmulti value before disabling' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'eal: warn if no lcore is available' " Xueming Li
` (13 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Pavan Nikhilesh
Cc: Xueming Li, Morten Brørup, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2c14d75f3b5a0833b63307b5f690e818a13a5595
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 2c14d75f3b5a0833b63307b5f690e818a13a5595 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 21 May 2025 01:47:26 +0530
Subject: [PATCH] eal: fix return value of lcore role
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde ]
Update rte_lcore_has_role() to return false instead of a
negative value for invalid lcore IDs, removing the need
for callers to pre-validate the ID.
Fixes: b0a1502a277c ("eal: make semantics of lcore role function more intuitive")
Suggested-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
lib/eal/common/eal_common_lcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c
index 208e73b465..5c6378fa97 100644
--- a/lib/eal/common/eal_common_lcore.c
+++ b/lib/eal/common/eal_common_lcore.c
@@ -79,7 +79,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
struct rte_config *cfg = rte_eal_get_configuration();
if (lcore_id >= RTE_MAX_LCORE)
- return -EINVAL;
+ return 0;
return cfg->lcore_role[lcore_id] == role;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.439903217 +0800
+++ 0071-eal-fix-return-value-of-lcore-role.patch 2025-06-26 19:59:17.478418040 +0800
@@ -1 +1 @@
-From 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde Mon Sep 17 00:00:00 2001
+From 2c14d75f3b5a0833b63307b5f690e818a13a5595 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 65e03bc2f35109cb33ad4a6e244d5ea90e78fcde ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 294267177d..9dd6c72055 100644
+index 208e73b465..5c6378fa97 100644
@@ -28 +30 @@
-@@ -87,7 +87,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
+@@ -79,7 +79,7 @@ rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'eal: warn if no lcore is available' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (70 preceding siblings ...)
2025-06-26 12:01 ` patch 'eal: fix return value of lcore role' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'test/lcore: fix race in per-lcore test' " Xueming Li
` (12 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: David Marchand; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=78136965e47224fb44e6e26699aac1f03cc68e05
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 78136965e47224fb44e6e26699aac1f03cc68e05 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 8 May 2025 07:19:15 +0200
Subject: [PATCH] eal: warn if no lcore is available
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 2ea1d30dc938866a983156473579d10bddb4951e ]
On systems with more cpu than RTE_MAX_LCORE, starting DPDK with
cores >= RTE_MAX_LCORE ends up with an ambiguous error log.
Example with RTE_MAX_LCORE=8:
$ taskset -c 8 ./build/app/dpdk-testpmd
EAL: Detected CPU lcores: 8
EAL: Detected NUMA nodes: 1
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
Cannot init EAL: Invalid argument
Add a better hint to help the user.
Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/eal_common_options.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index aec51736f2..110d95940d 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -2025,6 +2025,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
if (!core_parsed)
eal_auto_detect_cores(cfg);
+ if (cfg->lcore_count == 0) {
+ RTE_LOG(ERR, EAL, "No detected lcore is enabled, please check the core list\n");
+ return -1;
+ }
+
if (internal_conf->process_type == RTE_PROC_AUTO)
internal_conf->process_type = eal_proc_type_detect();
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.467822615 +0800
+++ 0072-eal-warn-if-no-lcore-is-available.patch 2025-06-26 19:59:17.482418040 +0800
@@ -1 +1 @@
-From 2ea1d30dc938866a983156473579d10bddb4951e Mon Sep 17 00:00:00 2001
+From 78136965e47224fb44e6e26699aac1f03cc68e05 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 2ea1d30dc938866a983156473579d10bddb4951e ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index b6fff7ec05..b194d0ee06 100644
+index aec51736f2..110d95940d 100644
@@ -32 +34 @@
-@@ -2052,6 +2052,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
+@@ -2025,6 +2025,11 @@ eal_adjust_config(struct internal_config *internal_cfg)
@@ -37 +39 @@
-+ EAL_LOG(ERR, "No detected lcore is enabled, please check the core list");
++ RTE_LOG(ERR, EAL, "No detected lcore is enabled, please check the core list\n");
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'test/lcore: fix race in per-lcore test' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (71 preceding siblings ...)
2025-06-26 12:01 ` patch 'eal: warn if no lcore is available' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'bus: cleanup device lists' " Xueming Li
` (11 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: David Marchand; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e492f88b843f26e254df7d04f9d7e92c2cfce519
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 17 Mar 2025 15:30:15 +0100
Subject: [PATCH] test/lcore: fix race in per-lcore test
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ]
In some CI, this unit test can fail, as the main thread may get
rescheduled while lcores execute the callback waiting 100ms.
Bugzilla ID: 1668
Fixes: af75078fece3 ("first public release")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_per_lcore.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 63c5c80c24..9c72f0fa21 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -59,17 +59,29 @@ display_vars(__rte_unused void *arg)
}
static int
-test_per_lcore_delay(__rte_unused void *arg)
+test_per_lcore_delay(void *arg)
{
+ RTE_ATOMIC(bool) *wait;
+
rte_delay_ms(100);
printf("wait 100ms on lcore %u\n", rte_lcore_id());
+ if (arg == NULL)
+ return 0;
+
+ wait = arg;
+ while (rte_atomic_load_explicit(wait, rte_memory_order_relaxed)) {
+ rte_delay_ms(100);
+ printf("wait 100ms on lcore %u\n", rte_lcore_id());
+ }
+
return 0;
}
static int
test_per_lcore(void)
{
+ RTE_ATOMIC(bool) wait = true;
unsigned lcore_id;
int ret;
@@ -86,7 +98,7 @@ test_per_lcore(void)
}
/* test if it could do remote launch twice at the same time or not */
- ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MAIN);
+ ret = rte_eal_mp_remote_launch(test_per_lcore_delay, &wait, SKIP_MAIN);
if (ret < 0) {
printf("It fails to do remote launch but it should able to do\n");
return -1;
@@ -97,6 +109,7 @@ test_per_lcore(void)
printf("It does remote launch successfully but it should not at this time\n");
return -1;
}
+ rte_atomic_store_explicit(&wait, false, rte_memory_order_relaxed);
RTE_LCORE_FOREACH_WORKER(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.500877614 +0800
+++ 0073-test-lcore-fix-race-in-per-lcore-test.patch 2025-06-26 19:59:17.486418040 +0800
@@ -1 +1 @@
-From 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 Mon Sep 17 00:00:00 2001
+From e492f88b843f26e254df7d04f9d7e92c2cfce519 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 7c37826c2b87966f3b11b2c74dc720fcc1e0e6f5 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'bus: cleanup device lists' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (72 preceding siblings ...)
2025-06-26 12:01 ` patch 'test/lcore: fix race in per-lcore test' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'eal/linux: unregister alarm callback before free' " Xueming Li
` (10 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Xueming Li, Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0e5825dac707e01523e30fbad2bf6e30ad64bb73
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0e5825dac707e01523e30fbad2bf6e30ad64bb73 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 20 Feb 2025 16:09:06 +0800
Subject: [PATCH] bus: cleanup device lists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]
Although eal_bus_cleanup() is not invoked for multiple times, this is a
good programming habit to remove the device object from list when
cleanup bus.
Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")
Fixes: 62b906cf06ba ("bus/uacce: introduce UACCE bus")
Fixes: 65780eada9d9 ("bus/vmbus: support cleanup")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
drivers/bus/pci/pci_common.c | 1 +
drivers/bus/vdev/vdev.c | 1 +
drivers/bus/vmbus/vmbus_common.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 1b3fe4783e..df0ad15100 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -455,6 +455,7 @@ free:
rte_intr_instance_free(dev->vfio_req_intr_handle);
dev->vfio_req_intr_handle = NULL;
+ TAILQ_REMOVE(&rte_pci_bus.device_list, dev, next);
pci_free(RTE_PCI_DEVICE_INTERNAL(dev));
}
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index ec7abe7cda..ae79cfd049 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -596,6 +596,7 @@ vdev_cleanup(void)
dev->device.driver = NULL;
free:
+ TAILQ_REMOVE(&vdev_device_list, dev, next);
free(dev);
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 8a965d10d9..4dac5a6298 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -238,6 +238,7 @@ rte_vmbus_cleanup(void)
dev->driver = NULL;
dev->device.driver = NULL;
+ TAILQ_REMOVE(&rte_vmbus_bus.device_list, dev, next);
free(dev);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.531433713 +0800
+++ 0074-bus-cleanup-device-lists.patch 2025-06-26 19:59:17.494418039 +0800
@@ -1 +1 @@
-From 398bb775edc5434ad94578a5e6c49fa1328acc0f Mon Sep 17 00:00:00 2001
+From 0e5825dac707e01523e30fbad2bf6e30ad64bb73 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -22 +23,0 @@
- drivers/bus/uacce/uacce.c | 1 +
@@ -25 +26 @@
- 4 files changed, 4 insertions(+)
+ 3 files changed, 3 insertions(+)
@@ -28 +29 @@
-index 5df4086f31..c88634f790 100644
+index 1b3fe4783e..df0ad15100 100644
@@ -31 +32 @@
-@@ -451,6 +451,7 @@ free:
+@@ -455,6 +455,7 @@ free:
@@ -39,12 +39,0 @@
-diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
-index 9b8ac23952..f5343ed87a 100644
---- a/drivers/bus/uacce/uacce.c
-+++ b/drivers/bus/uacce/uacce.c
-@@ -455,6 +455,7 @@ uacce_cleanup(void)
- dev->device.driver = NULL;
-
- free:
-+ TAILQ_REMOVE(&uacce_bus.device_list, dev, next);
- memset(dev, 0, sizeof(*dev));
- free(dev);
- }
@@ -52 +41 @@
-index beee8c4033..be375f63dc 100644
+index ec7abe7cda..ae79cfd049 100644
@@ -55 +44 @@
-@@ -603,6 +603,7 @@ vdev_cleanup(void)
+@@ -596,6 +596,7 @@ vdev_cleanup(void)
@@ -64 +53 @@
-index ac04ee11f8..a787d8b18d 100644
+index 8a965d10d9..4dac5a6298 100644
@@ -67 +56 @@
-@@ -240,6 +240,7 @@ rte_vmbus_cleanup(void)
+@@ -238,6 +238,7 @@ rte_vmbus_cleanup(void)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'eal/linux: unregister alarm callback before free' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (73 preceding siblings ...)
2025-06-26 12:01 ` patch 'bus: cleanup device lists' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'eal/freebsd: " Xueming Li
` (9 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Rui Ferreira; +Cc: Xueming Li, Konstantin Ananyev, Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=57bb5ce25eaf5ed693a387b152b476c68e16c041
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 57bb5ce25eaf5ed693a387b152b476c68e16c041 Mon Sep 17 00:00:00 2001
From: Rui Ferreira <rui.ferreira1@h-partners.com>
Date: Fri, 30 May 2025 09:18:43 +0100
Subject: [PATCH] eal/linux: unregister alarm callback before free
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit d84bf0d9aeb474d89a412b6af8e947b16bfcb895 ]
This was flagged by Address sanitizer as a use after free. The
intr_handle ptr is shared between the main thread and the interrupt
thread. The interrupt thread can dereference the ptr after free (from
the alarm callback). free is called when the main thread cleans up.
The interrupt thread never terminates (eal_intr_thread_main) so
use rte_intr_callback_unregister_sync during cleanup to
ensure the callback is removed before freeing the ptr.
To be more defensive clear out the pointer and registration
variable if we can unregister.
rte_intr_callback_unregister_sync may (optionally) use traces
so the alarm cleanup must happen before eal_trace_fini to avoid
accessing freed memory.
Bugzilla ID: 1683
Fixes: 90b13ab8d4f7 ("alarm: remove direct access to interrupt handle")
Signed-off-by: Rui Ferreira <rui.ferreira1@h-partners.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
.mailmap | 1 +
lib/eal/linux/eal.c | 2 +-
lib/eal/linux/eal_alarm.c | 9 ++++++++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index b4e75a6046..b1e5e00cb7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1255,6 +1255,7 @@ Rosen Xu <rosen.xu@intel.com>
Roy Franz <roy.franz@cavium.com>
Roy Pledge <roy.pledge@nxp.com>
Roy Shterman <roy.shterman@vastdata.com>
+Rui Ferreira <rui.ferreira1@h-partners.com>
Ruifeng Wang <ruifeng.wang@arm.com>
Rushil Gupta <rushilg@google.com>
Ryan E Hall <ryan.e.hall@intel.com>
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 57da058cec..b3b69a090a 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1371,10 +1371,10 @@ rte_eal_cleanup(void)
#endif
rte_mp_channel_cleanup();
eal_bus_cleanup();
+ rte_eal_alarm_cleanup();
rte_trace_save();
eal_trace_fini();
eal_mp_dev_hotplug_cleanup();
- rte_eal_alarm_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
rte_eal_malloc_heap_cleanup();
diff --git a/lib/eal/linux/eal_alarm.c b/lib/eal/linux/eal_alarm.c
index 766ba2c251..8f98726a57 100644
--- a/lib/eal/linux/eal_alarm.c
+++ b/lib/eal/linux/eal_alarm.c
@@ -56,7 +56,14 @@ static void eal_alarm_callback(void *arg);
void
rte_eal_alarm_cleanup(void)
{
- rte_intr_instance_free(intr_handle);
+ /* unregister callback using intr_handle in interrupt thread */
+ int ret = rte_intr_callback_unregister_sync(intr_handle,
+ eal_alarm_callback, (void *)-1);
+ if (ret >= 0) {
+ rte_intr_instance_free(intr_handle);
+ intr_handle = NULL;
+ handler_registered = 0;
+ }
}
int
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.562834711 +0800
+++ 0075-eal-linux-unregister-alarm-callback-before-free.patch 2025-06-26 19:59:17.498418039 +0800
@@ -1 +1 @@
-From d84bf0d9aeb474d89a412b6af8e947b16bfcb895 Mon Sep 17 00:00:00 2001
+From 57bb5ce25eaf5ed693a387b152b476c68e16c041 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit d84bf0d9aeb474d89a412b6af8e947b16bfcb895 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index fb90483bee..9135f06efc 100644
+index b4e75a6046..b1e5e00cb7 100644
@@ -39 +41 @@
-@@ -1339,6 +1339,7 @@ Rosen Xu <rosen.xu@altera.com> <rosen.xu@intel.com>
+@@ -1255,6 +1255,7 @@ Rosen Xu <rosen.xu@intel.com>
@@ -45 +46,0 @@
- Rupesh Chiluka <rchiluka@marvell.com>
@@ -46,0 +48 @@
+ Ryan E Hall <ryan.e.hall@intel.com>
@@ -48 +50 @@
-index 20f777b8b0..de90ab3b86 100644
+index 57da058cec..b3b69a090a 100644
@@ -51 +53 @@
-@@ -1328,10 +1328,10 @@ rte_eal_cleanup(void)
+@@ -1371,10 +1371,10 @@ rte_eal_cleanup(void)
@@ -64 +66 @@
-index b216a007a3..eb6a21d4f0 100644
+index 766ba2c251..8f98726a57 100644
@@ -67 +69 @@
-@@ -57,7 +57,14 @@ static void eal_alarm_callback(void *arg);
+@@ -56,7 +56,14 @@ static void eal_alarm_callback(void *arg);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'eal/freebsd: unregister alarm callback before free' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (74 preceding siblings ...)
2025-06-26 12:01 ` patch 'eal/linux: unregister alarm callback before free' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'bus/pci/bsd: fix device existence check' " Xueming Li
` (8 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Rui Ferreira; +Cc: Xueming Li, Bruce Richardson, Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fd527a32b73d9ad30e41ae138f0bfd60084bca2b
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From fd527a32b73d9ad30e41ae138f0bfd60084bca2b Mon Sep 17 00:00:00 2001
From: Rui Ferreira <rui.ferreira1@h-partners.com>
Date: Fri, 30 May 2025 09:18:44 +0100
Subject: [PATCH] eal/freebsd: unregister alarm callback before free
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit cf1937a96dcf63f6e00e3181654a845edb1fd682 ]
Unregister callback on cleanup to avoid use after free from the
interrupt thread (eal_intr_thread_main).
To be more defensive, set ptr to NULL if we can unregister.
rte_intr_callback_unregister_sync may (optionally) use traces
so the alarm cleanup must happen before eal_trace_fini to avoid
accessing freed memory.
Bugzilla ID: 1683
Fixes: 90b13ab8d4f7 ("alarm: remove direct access to interrupt handle")
Signed-off-by: Rui Ferreira <rui.ferreira1@h-partners.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
lib/eal/freebsd/eal.c | 2 +-
lib/eal/freebsd/eal_alarm.c | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 568e06e9ed..eb62bfdcd3 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -927,9 +927,9 @@ rte_eal_cleanup(void)
rte_service_finalize();
rte_mp_channel_cleanup();
eal_bus_cleanup();
+ rte_eal_alarm_cleanup();
rte_trace_save();
eal_trace_fini();
- rte_eal_alarm_cleanup();
/* after this point, any DPDK pointers will become dangling */
rte_eal_memory_detach();
eal_cleanup_config(internal_conf);
diff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c
index e5b0909a45..965f729157 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -49,7 +49,13 @@ static void eal_alarm_callback(void *arg);
void
rte_eal_alarm_cleanup(void)
{
- rte_intr_instance_free(intr_handle);
+ /* unregister callback using intr_handle in interrupt thread */
+ int ret = rte_intr_callback_unregister_sync(intr_handle,
+ eal_alarm_callback, (void *)-1);
+ if (ret >= 0) {
+ rte_intr_instance_free(intr_handle);
+ intr_handle = NULL;
+ }
}
int
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.596366410 +0800
+++ 0076-eal-freebsd-unregister-alarm-callback-before-free.patch 2025-06-26 19:59:17.502418039 +0800
@@ -1 +1 @@
-From cf1937a96dcf63f6e00e3181654a845edb1fd682 Mon Sep 17 00:00:00 2001
+From fd527a32b73d9ad30e41ae138f0bfd60084bca2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit cf1937a96dcf63f6e00e3181654a845edb1fd682 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index d6fffa2170..45adfad668 100644
+index 568e06e9ed..eb62bfdcd3 100644
@@ -31 +33 @@
-@@ -906,9 +906,9 @@ rte_eal_cleanup(void)
+@@ -927,9 +927,9 @@ rte_eal_cleanup(void)
@@ -43 +45 @@
-index 28f285fdef..c03e281e67 100644
+index e5b0909a45..965f729157 100644
@@ -46 +48 @@
-@@ -50,7 +50,13 @@ static void eal_alarm_callback(void *arg);
+@@ -49,7 +49,13 @@ static void eal_alarm_callback(void *arg);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'bus/pci/bsd: fix device existence check' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (75 preceding siblings ...)
2025-06-26 12:01 ` patch 'eal/freebsd: " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " Xueming Li
` (7 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Jake Freeland; +Cc: Xueming Li, Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=74a2941c3ba5886ca89f73df018798978757e96d
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 74a2941c3ba5886ca89f73df018798978757e96d Mon Sep 17 00:00:00 2001
From: Jake Freeland <jfree@freebsd.org>
Date: Tue, 6 May 2025 12:40:44 -0500
Subject: [PATCH] bus/pci/bsd: fix device existence check
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c ]
Use open(2) instead of access(2) to check for the existence of the target
device. This avoids a possible race condition where the device file is
removed after a successful call to access(2) but before open(2).
This also fixes any potential bugs associated with passing open(2)-style
flags into access(2). i.e. access(2) does not formally support the O_RDWR
flag.
Fixes: 764bf26873b9 ("add FreeBSD support")
Signed-off-by: Jake Freeland <jfree@freebsd.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/bus/pci/bsd/pci.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
index 27f12590d4..933a43a9f5 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -105,20 +105,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
{
char devname[PATH_MAX]; /* contains the /dev/uioX */
struct rte_pci_addr *loc;
+ int fd;
loc = &dev->addr;
snprintf(devname, sizeof(devname), "/dev/uio@pci:%u:%u:%u",
dev->addr.bus, dev->addr.devid, dev->addr.function);
- if (access(devname, O_RDWR) < 0) {
- RTE_LOG(WARNING, EAL, " "PCI_PRI_FMT" not managed by UIO driver, "
- "skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
- return 1;
+ fd = open(devname, O_RDWR);
+ if (fd < 0) {
+ if (errno == ENOENT) {
+ RTE_LOG(WARNING, EAL, " "PCI_PRI_FMT" not managed by UIO driver, "
+ "skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
+ return 1;
+ }
+ RTE_LOG(ERR, EAL, "Failed to open device file for " PCI_PRI_FMT " (%s)",
+ loc->domain, loc->bus, loc->devid, loc->function, devname);
+ return -1;
}
/* save fd if in primary process */
- if (rte_intr_fd_set(dev->intr_handle, open(devname, O_RDWR))) {
+ if (rte_intr_fd_set(dev->intr_handle, fd)) {
RTE_LOG(WARNING, EAL, "Failed to save fd");
goto error;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.627862309 +0800
+++ 0077-bus-pci-bsd-fix-device-existence-check.patch 2025-06-26 19:59:17.506418039 +0800
@@ -1 +1 @@
-From 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c Mon Sep 17 00:00:00 2001
+From 74a2941c3ba5886ca89f73df018798978757e96d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 6d4e6dbccc3bd965bfd5e5836d7cb21c1b1f9c6c ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 2508e36a85..3f13e1d6ac 100644
+index 27f12590d4..933a43a9f5 100644
@@ -27 +29 @@
-@@ -106,20 +106,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -105,20 +105,27 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -39,2 +41,2 @@
-- PCI_LOG(WARNING, " "PCI_PRI_FMT" not managed by UIO driver, skipping",
-- loc->domain, loc->bus, loc->devid, loc->function);
+- RTE_LOG(WARNING, EAL, " "PCI_PRI_FMT" not managed by UIO driver, "
+- "skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
@@ -45,2 +47,2 @@
-+ PCI_LOG(WARNING, PCI_PRI_FMT" not managed by UIO driver, skipping",
-+ loc->domain, loc->bus, loc->devid, loc->function);
++ RTE_LOG(WARNING, EAL, " "PCI_PRI_FMT" not managed by UIO driver, "
++ "skipping\n", loc->domain, loc->bus, loc->devid, loc->function);
@@ -49 +51 @@
-+ PCI_LOG(ERR, "Failed to open device file for " PCI_PRI_FMT " (%s)",
++ RTE_LOG(ERR, EAL, "Failed to open device file for " PCI_PRI_FMT " (%s)",
@@ -57 +59 @@
- PCI_LOG(WARNING, "Failed to save fd");
+ RTE_LOG(WARNING, EAL, "Failed to save fd");
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'power/intel_uncore: fix crash closing uninitialized driver' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (76 preceding siblings ...)
2025-06-26 12:01 ` patch 'bus/pci/bsd: fix device existence check' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'crypto/qat: fix size calculation for memset' " Xueming Li
` (6 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Xueming Li, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=16af361233f7d8a9bcf818a8e7062a94cc656381
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 16af361233f7d8a9bcf818a8e7062a94cc656381 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 15 May 2025 17:58:53 +0100
Subject: [PATCH] power/intel_uncore: fix crash closing uninitialized driver
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 74c4b081825123350578f18dc838ec0bf69ba03b ]
When the power_intel_uncore_autotest unit test is run as an unprivileged
user which cannot init the power library, it crashes the unit test
binary due to calling "rte_power_uncore_exit" after the first test case
(initialization) fails. This crash is due to trying to write to NULL
file handles.
Fix the crash by checking each file handle is non-null before writing to
it and closing it.
Fixes: 60b8a661a957 ("power: add Intel uncore frequency control")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
lib/power/power_intel_uncore.c | 35 +++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/lib/power/power_intel_uncore.c b/lib/power/power_intel_uncore.c
index be174dce44..2a6977e332 100644
--- a/lib/power/power_intel_uncore.c
+++ b/lib/power/power_intel_uncore.c
@@ -307,27 +307,28 @@ power_intel_uncore_exit(unsigned int pkg, unsigned int die)
ui = &uncore_info[pkg][die];
- if (fprintf(ui->f_cur_min, "%u", ui->org_min_freq) < 0) {
- RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
- "pkg %02u die %02u\n", ui->pkg, ui->die);
- return -1;
+ if (ui->f_cur_min != NULL) {
+ if (fprintf(ui->f_cur_min, "%u", ui->org_min_freq) < 0) {
+ RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+ "pkg %02u die %02u\n", ui->pkg, ui->die);
+ return -1;
+ }
+ fflush(ui->f_cur_min);
+ fclose(ui->f_cur_min);
+ ui->f_cur_min = NULL;
}
- if (fprintf(ui->f_cur_max, "%u", ui->org_max_freq) < 0) {
- RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
- "pkg %02u die %02u\n", ui->pkg, ui->die);
- return -1;
+ if (ui->f_cur_max != NULL) {
+ if (fprintf(ui->f_cur_max, "%u", ui->org_max_freq) < 0) {
+ RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+ "pkg %02u die %02u\n", ui->pkg, ui->die);
+ return -1;
+ }
+ fflush(ui->f_cur_max);
+ fclose(ui->f_cur_max);
+ ui->f_cur_max = NULL;
}
- fflush(ui->f_cur_min);
- fflush(ui->f_cur_max);
-
- /* Close FD of setting freq */
- fclose(ui->f_cur_min);
- fclose(ui->f_cur_max);
- ui->f_cur_min = NULL;
- ui->f_cur_max = NULL;
-
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.659116207 +0800
+++ 0078-power-intel_uncore-fix-crash-closing-uninitialized-d.patch 2025-06-26 19:59:17.506418039 +0800
@@ -1 +1 @@
-From 74c4b081825123350578f18dc838ec0bf69ba03b Mon Sep 17 00:00:00 2001
+From 16af361233f7d8a9bcf818a8e7062a94cc656381 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 74c4b081825123350578f18dc838ec0bf69ba03b ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- drivers/power/intel_uncore/intel_uncore.c | 35 ++++++++++++-----------
+ lib/power/power_intel_uncore.c | 35 +++++++++++++++++-----------------
@@ -24,4 +26,4 @@
-diff --git a/drivers/power/intel_uncore/intel_uncore.c b/drivers/power/intel_uncore/intel_uncore.c
-index 804ad5d755..6759ea1445 100644
---- a/drivers/power/intel_uncore/intel_uncore.c
-+++ b/drivers/power/intel_uncore/intel_uncore.c
+diff --git a/lib/power/power_intel_uncore.c b/lib/power/power_intel_uncore.c
+index be174dce44..2a6977e332 100644
+--- a/lib/power/power_intel_uncore.c
++++ b/lib/power/power_intel_uncore.c
@@ -33,2 +35,2 @@
-- POWER_LOG(ERR, "Fail to write original uncore frequency for "
-- "pkg %02u die %02u", ui->pkg, ui->die);
+- RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+- "pkg %02u die %02u\n", ui->pkg, ui->die);
@@ -38,2 +40,2 @@
-+ POWER_LOG(ERR, "Fail to write original uncore frequency for pkg %02u die %02u",
-+ ui->pkg, ui->die);
++ RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
++ "pkg %02u die %02u\n", ui->pkg, ui->die);
@@ -48,2 +50,2 @@
-- POWER_LOG(ERR, "Fail to write original uncore frequency for "
-- "pkg %02u die %02u", ui->pkg, ui->die);
+- RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
+- "pkg %02u die %02u\n", ui->pkg, ui->die);
@@ -53,2 +55,2 @@
-+ POWER_LOG(ERR, "Fail to write original uncore frequency for pkg %02u die %02u",
-+ ui->pkg, ui->die);
++ RTE_LOG(ERR, POWER, "Fail to write original uncore frequency for "
++ "pkg %02u die %02u\n", ui->pkg, ui->die);
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'crypto/qat: fix size calculation for memset' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (77 preceding siblings ...)
2025-06-26 12:01 ` patch 'power/intel_uncore: fix crash closing uninitialized driver' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " Xueming Li
` (5 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Xueming Li, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bedd4b04981354f3c6c3f0c617310840bfd4925f
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From bedd4b04981354f3c6c3f0c617310840bfd4925f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 20 Feb 2025 08:27:14 -0800
Subject: [PATCH] crypto/qat: fix size calculation for memset
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 99763482361f08c77c9752985d7a7fd9adecd719 ]
The memset was always doing 0 bytes since size computed later.
Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
Fixes: 3a80d7fb2ecd ("crypto/qat: support SHA3 plain hash")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/crypto/qat/qat_sym_session.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index f6dd96497c..4002593df6 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2174,7 +2174,7 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
return 0;
}
-int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
+static int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
const uint8_t *authkey,
uint32_t authkeylen,
uint32_t aad_length,
@@ -2443,27 +2443,27 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
break;
case ICP_QAT_HW_AUTH_ALGO_SHA3_224:
/* Plain SHA3-224 */
- memset(cdesc->cd_cur_ptr, 0, state1_size);
state1_size = qat_hash_get_state1_size(
cdesc->qat_hash_alg);
+ memset(cdesc->cd_cur_ptr, 0, state1_size);
break;
case ICP_QAT_HW_AUTH_ALGO_SHA3_256:
/* Plain SHA3-256 */
- memset(cdesc->cd_cur_ptr, 0, state1_size);
state1_size = qat_hash_get_state1_size(
cdesc->qat_hash_alg);
+ memset(cdesc->cd_cur_ptr, 0, state1_size);
break;
case ICP_QAT_HW_AUTH_ALGO_SHA3_384:
/* Plain SHA3-384 */
- memset(cdesc->cd_cur_ptr, 0, state1_size);
state1_size = qat_hash_get_state1_size(
cdesc->qat_hash_alg);
+ memset(cdesc->cd_cur_ptr, 0, state1_size);
break;
case ICP_QAT_HW_AUTH_ALGO_SHA3_512:
/* Plain SHA3-512 */
- memset(cdesc->cd_cur_ptr, 0, state1_size);
state1_size = qat_hash_get_state1_size(
cdesc->qat_hash_alg);
+ memset(cdesc->cd_cur_ptr, 0, state1_size);
break;
case ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC:
state1_size = ICP_QAT_HW_AES_XCBC_MAC_STATE1_SZ;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.690592806 +0800
+++ 0079-crypto-qat-fix-size-calculation-for-memset.patch 2025-06-26 19:59:17.510418039 +0800
@@ -1 +1 @@
-From 99763482361f08c77c9752985d7a7fd9adecd719 Mon Sep 17 00:00:00 2001
+From bedd4b04981354f3c6c3f0c617310840bfd4925f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 99763482361f08c77c9752985d7a7fd9adecd719 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7f370f03fb..5d831b3106 100644
+index f6dd96497c..4002593df6 100644
@@ -23 +25 @@
-@@ -2346,7 +2346,7 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
+@@ -2174,7 +2174,7 @@ int qat_sym_cd_cipher_set(struct qat_sym_session *cdesc,
@@ -32 +34 @@
-@@ -2620,27 +2620,27 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
+@@ -2443,27 +2443,27 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: avoid setting kernel MTU if not needed' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (78 preceding siblings ...)
2025-06-26 12:01 ` patch 'crypto/qat: fix size calculation for memset' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'doc: add kernel options required for mlx5' " Xueming Li
` (4 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Xueming Li, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ca9827ee06b30c13d157fd518ad1594b90c16667
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From ca9827ee06b30c13d157fd518ad1594b90c16667 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 28 May 2025 11:36:44 +0200
Subject: [PATCH] net/mlx5: avoid setting kernel MTU if not needed
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]
This patch checks whether the Kernel MTU has the same value
as the requested one at port configuration time, and skip
setting it if it is the same.
Doing this, we can avoid the application to require
NET_ADMIN capability, as in v23.11.
Fixes: 10859ecf09c4 ("net/mlx5: fix MTU configuration")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 4218aef032..3762797fe2 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -669,6 +669,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
ret = mlx5_get_mtu(dev, &kern_mtu);
if (ret)
return ret;
+
+ if (kern_mtu == mtu) {
+ priv->mtu = mtu;
+ DRV_LOG(DEBUG, "port %u adapter MTU was already set to %u",
+ dev->data->port_id, mtu);
+ return 0;
+ }
+
/* Set kernel interface MTU first. */
ret = mlx5_set_mtu(dev, mtu);
if (ret)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.720653005 +0800
+++ 0080-net-mlx5-avoid-setting-kernel-MTU-if-not-needed.patch 2025-06-26 19:59:17.514418039 +0800
@@ -1 +1 @@
-From f1f9113a08b202d302ba9448d351c04da48ff46d Mon Sep 17 00:00:00 2001
+From ca9827ee06b30c13d157fd518ad1594b90c16667 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit f1f9113a08b202d302ba9448d351c04da48ff46d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index a50320075c..b7df39ace9 100644
+index 4218aef032..3762797fe2 100644
@@ -26 +28 @@
-@@ -678,6 +678,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -669,6 +669,14 @@ mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'doc: add kernel options required for mlx5' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (79 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/mlx5: avoid setting kernel MTU if not needed' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " Xueming Li
` (3 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Jaromír Smrček; +Cc: Xueming Li, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=87853e3523bd30dd0f4f3b733f5d485a3eb95c25
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 87853e3523bd30dd0f4f3b733f5d485a3eb95c25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jarom=C3=ADr=20Smr=C4=8Dek?= <4plague@gmail.com>
Date: Tue, 10 Jun 2025 10:02:43 +0300
Subject: [PATCH] doc: add kernel options required for mlx5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 3101799fce0016061ff7aa9c3c2ad7155aff1073 ]
On some kernels (Debian 6.6, 6.9 and 6.10 tested),
there is a missing option for "TC recirculation"
that prevents MLX5 driver to include CONFIG_MLX5_CLS_ACT
in the compilation, thus preventing PF1
from properly working in multiport-eswitch mode.
Fixes: 11c73de9ef63 ("net/mlx5: probe multi-port E-Switch device")
Signed-off-by: Jaromír Smrček <4plague@gmail.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
.mailmap | 1 +
doc/guides/nics/mlx5.rst | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index b1e5e00cb7..e0202fab03 100644
--- a/.mailmap
+++ b/.mailmap
@@ -605,6 +605,7 @@ Jan Medala <jan.medala@outlook.com> <jan@semihalf.com>
Jan Remes <remes@netcope.com>
Jan Viktorin <viktorin@cesnet.cz> <viktorin@rehivetech.com>
Jan Wickbom <jan.wickbom@ericsson.com>
+Jaromír Smrček <4plague@gmail.com>
Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
Jason He <jason.he@broadcom.com>
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index d1c3284ca1..7c9e0350d4 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1485,7 +1485,7 @@ Supported HCAs:
Supported mlx5 kernel modules versions:
-- Upstream Linux - from version 6.3.
+- Upstream Linux - from version 6.3 with CONFIG_NET_TC_SKB_EXT and CONFIG_MLX5_CLS_ACT enabled.
- Modules packaged in MLNX_OFED - from version v23.04-0.5.3.3.
Configuration
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.749784004 +0800
+++ 0081-doc-add-kernel-options-required-for-mlx5.patch 2025-06-26 19:59:17.518418038 +0800
@@ -1 +1 @@
-From 3101799fce0016061ff7aa9c3c2ad7155aff1073 Mon Sep 17 00:00:00 2001
+From 87853e3523bd30dd0f4f3b733f5d485a3eb95c25 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 3101799fce0016061ff7aa9c3c2ad7155aff1073 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 3dec1492aa..8483d96ec5 100644
+index b1e5e00cb7..e0202fab03 100644
@@ -29 +31,3 @@
-@@ -645,6 +645,7 @@ Jan Viktorin <viktorin@cesnet.cz> <viktorin@rehivetech.com>
+@@ -605,6 +605,7 @@ Jan Medala <jan.medala@outlook.com> <jan@semihalf.com>
+ Jan Remes <remes@netcope.com>
+ Jan Viktorin <viktorin@cesnet.cz> <viktorin@rehivetech.com>
@@ -31,2 +34,0 @@
- Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
- Janardhanan Arumugam <janardhanan.arumugam@intel.com>
@@ -38 +40 @@
-index 9957802d44..c1dcb9ca68 100644
+index d1c3284ca1..7c9e0350d4 100644
@@ -41 +43 @@
-@@ -1761,7 +1761,7 @@ Supported HCAs:
+@@ -1485,7 +1485,7 @@ Supported HCAs:
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/mlx5: fix hypervisor detection in VLAN workaround' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (80 preceding siblings ...)
2025-06-26 12:01 ` patch 'doc: add kernel options required for mlx5' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: check requirement for hardware GRO' " Xueming Li
` (2 subsequent siblings)
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Xueming Li, Bing Zhao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bd6d0822b1057ce25dd0e9f9cf9dfc90b4624fd7
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From bd6d0822b1057ce25dd0e9f9cf9dfc90b4624fd7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 6 Dec 2024 16:26:05 +0200
Subject: [PATCH] net/mlx5: fix hypervisor detection in VLAN workaround
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 8518a4e55980b23dfc7d855aefbef0df02e450e0 ]
The mlx5 PMD provides a specific workaround for the VMware ESXi
hypervisor, enabling on-demand routing configuration to virtual
machines. This workaround activates when the device type is
a Virtual Function and either an ESXi hypervisor is detected
or the hypervisor type is unknown.
For non-x86 architectures the function rte_hypervisor_get()
consistently returns an unknown type, which triggers the workaround
automatically without any actual needs. If there are VLAN support
requirements, this can lead to failures in inserting default control
flows.
Do not trigger the workaround for unknown hypervisor type
in non-x86 environments.
Fixes: dfedf3e3f9d2 ("net/mlx5: add workaround for VLAN in virtual machine")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_vlan_os.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c
index 81611a8d3f..353484de3f 100644
--- a/drivers/net/mlx5/linux/mlx5_vlan_os.c
+++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c
@@ -112,16 +112,16 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex)
/* Check whether there is desired virtual environment */
hv_type = rte_hypervisor_get();
switch (hv_type) {
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_X86_64)
+ /* Always misdetected on ARM archs, let's ignore this */
case RTE_HYPERVISOR_UNKNOWN:
+#endif
case RTE_HYPERVISOR_VMWARE:
- /*
- * The "white list" of configurations
- * to engage the workaround.
- */
+ /* The list of configurations to engage the workaround. */
break;
default:
/*
- * The configuration is not found in the "white list".
+ * The configuration is not found in the list.
* We should not engage the VLAN workaround.
*/
return NULL;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.782646602 +0800
+++ 0082-net-mlx5-fix-hypervisor-detection-in-VLAN-workaround.patch 2025-06-26 19:59:17.522418038 +0800
@@ -1 +1 @@
-From 8518a4e55980b23dfc7d855aefbef0df02e450e0 Mon Sep 17 00:00:00 2001
+From bd6d0822b1057ce25dd0e9f9cf9dfc90b4624fd7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 8518a4e55980b23dfc7d855aefbef0df02e450e0 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: check requirement for hardware GRO' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (81 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/mlx5: fix hypervisor detection in VLAN workaround' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " Xueming Li
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b779239d616c0adf67eb23fd41f7ad78cfceb877
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From b779239d616c0adf67eb23fd41f7ad78cfceb877 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:49 +0800
Subject: [PATCH] net/hns3: check requirement for hardware GRO
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit ae68b5d91c632a1dde839123f27b0317cf094170 ]
The HIP08 platform requires that data address be 64-byte aligned
for the GRO feature.
Most applications already use 64-byte aligned. So a check is added
to avoid using the GRO function when 64-byte aligned is used.
Fixes: d14c995b775a ("net/hns3: check Rx DMA address alignmnent")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 58aa6edff4..1fb34e286d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -276,12 +276,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
static int
hns3_check_rx_dma_addr(struct hns3_hw *hw, uint64_t dma_addr)
{
+ uint64_t rx_offload = hw->data->dev_conf.rxmode.offloads;
uint64_t rem;
rem = dma_addr & (hw->rx_dma_addr_align - 1);
if (rem > 0) {
- hns3_err(hw, "The IO address of the beginning of the mbuf data "
- "must be %u-byte aligned", hw->rx_dma_addr_align);
+ hns3_err(hw,
+ "mbuf DMA address must be %u-byte aligned",
+ hw->rx_dma_addr_align);
+ return -EINVAL;
+ }
+
+ /*
+ * This check is for HIP08 network engine. The GRO function
+ * requires that mbuf DMA address is 64-byte aligned.
+ */
+ rem = dma_addr & (HNS3_RX_DMA_ADDR_ALIGN_128 - 1);
+ if ((rx_offload & RTE_ETH_RX_OFFLOAD_TCP_LRO) && rem > 0) {
+ hns3_err(hw,
+ "GRO requires that mbuf DMA address be 64-byte aligned");
return -EINVAL;
}
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.812153701 +0800
+++ 0083-net-hns3-check-requirement-for-hardware-GRO.patch 2025-06-26 19:59:17.526418038 +0800
@@ -1 +1 @@
-From ae68b5d91c632a1dde839123f27b0317cf094170 Mon Sep 17 00:00:00 2001
+From b779239d616c0adf67eb23fd41f7ad78cfceb877 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit ae68b5d91c632a1dde839123f27b0317cf094170 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index bde46733b0..f9fde3948a 100644
+index 58aa6edff4..1fb34e286d 100644
@@ -24 +26 @@
-@@ -281,12 +281,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
+@@ -276,12 +276,25 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: allow Tx vector when fast free not enabled' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (82 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/hns3: check requirement for hardware GRO' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
2025-06-26 12:01 ` patch 'net/hns3: allow Rx vector mode with VLAN filter' " Xueming Li
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3d7e04bac2aa0d92954601f0351cbffcd7e5dd85
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 3d7e04bac2aa0d92954601f0351cbffcd7e5dd85 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:50 +0800
Subject: [PATCH] net/hns3: allow Tx vector when fast free not enabled
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit e05cb702ca70aecdf01041274cd6ffc9233a726d ]
Currently, the Tx vector algorithm is only enabled
when tx_offload is RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE.
If no offloads are enabled, then vector algorithm can also be used.
The vector algorithm does not support other transmit offloads.
Fixes: e31f123db06b ("net/hns3: support NEON Tx")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_rxtx_vec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index 9708ec614e..c3d288ea5a 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -16,11 +16,11 @@
int
hns3_tx_check_vec_support(struct rte_eth_dev *dev)
{
- struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
+ uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
- /* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */
- if (txmode->offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
+ /* Only support when Tx offloads is RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE or 0. */
+ if (tx_offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE && tx_offloads != 0)
return -ENOTSUP;
/*
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.847708400 +0800
+++ 0084-net-hns3-allow-Tx-vector-when-fast-free-not-enabled.patch 2025-06-26 19:59:17.530418038 +0800
@@ -1 +1 @@
-From e05cb702ca70aecdf01041274cd6ffc9233a726d Mon Sep 17 00:00:00 2001
+From 3d7e04bac2aa0d92954601f0351cbffcd7e5dd85 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e05cb702ca70aecdf01041274cd6ffc9233a726d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bf37ce51b1..9fb66ea2de 100644
+index 9708ec614e..c3d288ea5a 100644
^ permalink raw reply [flat|nested] 86+ messages in thread
* patch 'net/hns3: allow Rx vector mode with VLAN filter' has been queued to stable release 23.11.5
2025-06-26 12:00 patch has been queued to stable release 23.11.5 Xueming Li
` (83 preceding siblings ...)
2025-06-26 12:01 ` patch 'net/hns3: allow Tx vector when fast free not enabled' " Xueming Li
@ 2025-06-26 12:01 ` Xueming Li
84 siblings, 0 replies; 86+ messages in thread
From: Xueming Li @ 2025-06-26 12:01 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=0eac3df6add5d7b2c278b3f44e5d0ff479ea7741
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 0eac3df6add5d7b2c278b3f44e5d0ff479ea7741 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Mon, 9 Jun 2025 21:06:51 +0800
Subject: [PATCH] net/hns3: allow Rx vector mode with VLAN filter
Cc: Xueming Li <xuemingl@nvidia.com>
[ upstream commit 4d345eb5ef9827aec1547d7dfc9afcf363359b46 ]
When the RTE_ETH_RX_OFFLOAD_VLAN_FILTER offload flag was set,
the driver would not select the Rx vector algorithm.
But VLAN filtering does not impact data layout so it
is possible to use Rx vector algorithm in this case.
Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_rxtx_vec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index c3d288ea5a..b24bd47e58 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -184,9 +184,12 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
{
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
- RTE_ETH_RX_OFFLOAD_VLAN |
+ RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
+ RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
+ RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+
if (dev->data->scattered_rx)
return -ENOTSUP;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:20.880658198 +0800
+++ 0085-net-hns3-allow-Rx-vector-mode-with-VLAN-filter.patch 2025-06-26 19:59:17.530418038 +0800
@@ -1 +1 @@
-From 4d345eb5ef9827aec1547d7dfc9afcf363359b46 Mon Sep 17 00:00:00 2001
+From 0eac3df6add5d7b2c278b3f44e5d0ff479ea7741 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit 4d345eb5ef9827aec1547d7dfc9afcf363359b46 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- drivers/net/hns3/hns3_rxtx_vec.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ drivers/net/hns3/hns3_rxtx_vec.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
@@ -20 +22 @@
-index 9fb66ea2de..daadd7e19f 100644
+index c3d288ea5a..b24bd47e58 100644
@@ -23 +25 @@
-@@ -184,7 +184,9 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
+@@ -184,9 +184,12 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
@@ -31,2 +33,5 @@
- RTE_ETH_RX_OFFLOAD_TIMESTAMP |
- RTE_ETH_RX_OFFLOAD_KEEP_CRC;
+ RTE_ETH_RX_OFFLOAD_TIMESTAMP;
+
++
+ if (dev->data->scattered_rx)
+ return -ENOTSUP;
^ permalink raw reply [flat|nested] 86+ messages in thread