* patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 @ 2022-11-03 9:26 luca.boccassi 2022-11-03 9:26 ` patch 'eal: fix side effect in some pointer arithmetic macros' " luca.boccassi ` (98 more replies) 0 siblings, 99 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Mattias Rönnblom; +Cc: Olivier Matz, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/370afad50d5df10bd6feb291aaaf3aced7f71531 Thanks. Luca Boccassi --- From 370afad50d5df10bd6feb291aaaf3aced7f71531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com> Date: Mon, 11 Jul 2022 14:11:32 +0200 Subject: [PATCH] net: accept unaligned data in checksum routines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 1c9a7fba5c90e0422b517404499ed106f647bcff ] __rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its data through an uint16_t pointer, which allowed the compiler to assume the data was 16-bit aligned. This in turn would, with certain architectures and compiler flag combinations, result in code with SIMD load or store instructions with restrictions on data alignment. This patch keeps the old algorithm, but data is read using memcpy() instead of direct pointer access, forcing the compiler to always generate code that handles unaligned input. The __may_alias__ GCC attribute is no longer needed. The data on which the Internet checksum functions operates are almost always 16-bit aligned, but there are exceptions. In particular, the PDCP protocol header may (literally) have an odd size. Performance impact seems to range from none to a very slight regression. Bugzilla ID: 1035 Fixes: 6006818cfb26 ("net: new checksum functions") Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> --- lib/librte_net/rte_ip.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index 52ef3c8cc1..ac59ee1339 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -134,18 +134,21 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr) static inline uint32_t __rte_raw_cksum(const void *buf, size_t len, uint32_t sum) { - /* extend strict-aliasing rules */ - typedef uint16_t __attribute__((__may_alias__)) u16_p; - const u16_p *u16_buf = (const u16_p *)buf; - const u16_p *end = u16_buf + len / sizeof(*u16_buf); + const void *end; - for (; u16_buf != end; ++u16_buf) - sum += *u16_buf; + for (end = RTE_PTR_ADD(buf, RTE_ALIGN_FLOOR(len, sizeof(uint16_t))); + buf != end; buf = RTE_PTR_ADD(buf, sizeof(uint16_t))) { + uint16_t v; + + memcpy(&v, buf, sizeof(uint16_t)); + sum += v; + } /* if length is odd, keeping it byte order independent */ if (unlikely(len % 2)) { uint16_t left = 0; - *(unsigned char *)&left = *(const unsigned char *)end; + + memcpy(&left, end, 1); sum += left; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.614123807 +0000 +++ 0001-net-accept-unaligned-data-in-checksum-routines.patch 2022-11-03 09:27:25.293420892 +0000 @@ -1 +1 @@ -From 1c9a7fba5c90e0422b517404499ed106f647bcff Mon Sep 17 00:00:00 2001 +From 370afad50d5df10bd6feb291aaaf3aced7f71531 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 1c9a7fba5c90e0422b517404499ed106f647bcff ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org @@ -34 +35 @@ - lib/net/rte_ip.h | 17 ++++++++++------- + lib/librte_net/rte_ip.h | 17 ++++++++++------- @@ -37,5 +38,5 @@ -diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h -index b502481670..ecd250e9be 100644 ---- a/lib/net/rte_ip.h -+++ b/lib/net/rte_ip.h -@@ -160,18 +160,21 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr) +diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h +index 52ef3c8cc1..ac59ee1339 100644 +--- a/lib/librte_net/rte_ip.h ++++ b/lib/librte_net/rte_ip.h +@@ -134,18 +134,21 @@ rte_ipv4_hdr_len(const struct rte_ipv4_hdr *ipv4_hdr) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eal: fix side effect in some pointer arithmetic macros' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'app/testpmd: restore ixgbe bypass commands' " luca.boccassi ` (97 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Dmitry Kozlyuk Cc: Morten Brørup, Bruce Richardson, Chengwen Feng, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1aa7dc7481d5bbacc6c86dfb87a81ff6c0eeda12 Thanks. Luca Boccassi --- From 1aa7dc7481d5bbacc6c86dfb87a81ff6c0eeda12 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Date: Sat, 27 Aug 2022 14:32:19 +0300 Subject: [PATCH] eal: fix side effect in some pointer arithmetic macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 1a7374c95678183aef6f40b64074752831a33d26 ] RTE_PTR_SUB(ptr, x) and RTE_PTR_ALIGN_FLOOR() worked incorrectly if "ptr" was an expression: uint32_t arr[3]; RTE_PTR_SUB(arr + 1, sizeof(arr[0])); // expected: (uint32_t *)((uintptr_t)(arr + 1) - 4) == arr // actual: (uint32_t *)((uintptr_t) arr + 1 - 4) != arr RTE_PTR_ALIGN_FLOOR(arr + 2, sizeof(arr[0])); // expected: RTE_ALIGN_FLOOR((uintptr_t)(arr + 2), 4) == &arr[2] // actual: RTE_ALIGN_FLOOR((uintptr_t) arr + 2, 4) == &arr[0] Fix the macros and extend the relevant unit test. Convert uses of a custom test failure macro to RTE_TEST_ASSERT*(). Fixes: af75078fece3 ("first public release") Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> --- app/test/test_common.c | 52 ++++++++++++++++++++--------- lib/librte_eal/include/rte_common.h | 4 +-- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/app/test/test_common.c b/app/test/test_common.c index 12bd1cad90..181c8be3be 100644 --- a/app/test/test_common.c +++ b/app/test/test_common.c @@ -25,27 +25,49 @@ test_macros(int __rte_unused unused_parm) #define SMALLER 0x1000U #define BIGGER 0x2000U #define PTR_DIFF BIGGER - SMALLER -#define FAIL_MACRO(x)\ - {printf(#x "() test failed!\n");\ - return -1;} uintptr_t unused = 0; + uint32_t arr[3]; RTE_SET_USED(unused); - if ((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF) != BIGGER) - FAIL_MACRO(RTE_PTR_ADD); - if ((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF) != SMALLER) - FAIL_MACRO(RTE_PTR_SUB); - if (RTE_PTR_DIFF(BIGGER, SMALLER) != PTR_DIFF) - FAIL_MACRO(RTE_PTR_DIFF); - if (RTE_MAX(SMALLER, BIGGER) != BIGGER) - FAIL_MACRO(RTE_MAX); - if (RTE_MIN(SMALLER, BIGGER) != SMALLER) - FAIL_MACRO(RTE_MIN); + RTE_TEST_ASSERT_EQUAL((uintptr_t)RTE_PTR_ADD(SMALLER, PTR_DIFF), BIGGER, + "RTE_PTR_ADD"); + RTE_TEST_ASSERT_EQUAL((uintptr_t)RTE_PTR_SUB(BIGGER, PTR_DIFF), SMALLER, + "RTE_PTR_SUB"); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_DIFF(BIGGER, SMALLER), PTR_DIFF, + "RTE_PTR_DIFF"); + RTE_TEST_ASSERT_EQUAL(RTE_MAX(SMALLER, BIGGER), BIGGER, + "RTE_MAX"); + RTE_TEST_ASSERT_EQUAL(RTE_MIN(SMALLER, BIGGER), SMALLER, + "RTE_MIN"); - if (strncmp(RTE_STR(test), "test", sizeof("test"))) - FAIL_MACRO(RTE_STR); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_ADD(arr + 1, sizeof(arr[0])), &arr[2], + "RTE_PTR_ADD(expr, x)"); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_SUB(arr + 1, sizeof(arr[0])), &arr[0], + "RTE_PTR_SUB(expr, x)"); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN_FLOOR(arr + 2, 4), &arr[2], + "RTE_PTR_ALIGN_FLOOR(expr, x)"); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN_CEIL(arr + 2, 4), &arr[2], + "RTE_PTR_ALIGN_CEIL(expr, x)"); + RTE_TEST_ASSERT_EQUAL(RTE_PTR_ALIGN(arr + 2, 4), &arr[2], + "RTE_PTR_ALIGN(expr, x)"); + + RTE_TEST_ASSERT_EQUAL( + RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(&arr[1], 1), 4), &arr[1], + "RTE_PTR_ALIGN_FLOOR(x < y/2, y)"); + RTE_TEST_ASSERT_EQUAL( + RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(&arr[1], 3), 4), &arr[1], + "RTE_PTR_ALIGN_FLOOR(x > y/2, y)"); + RTE_TEST_ASSERT_EQUAL( + RTE_PTR_ALIGN_CEIL(RTE_PTR_ADD(&arr[1], 3), 4), &arr[2], + "RTE_PTR_ALIGN_CEIL(x < y/2, y)"); + RTE_TEST_ASSERT_EQUAL( + RTE_PTR_ALIGN_CEIL(RTE_PTR_ADD(&arr[1], 1), 4), &arr[2], + "RTE_PTR_ALIGN_CEIL(x > y/2, y)"); + + RTE_TEST_ASSERT(strncmp(RTE_STR(test), "test", sizeof("test")) == 0, + "RTE_STR"); return 0; } diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 677b52a2f8..853adcb249 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -255,7 +255,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) /** * subtract a byte-value offset from a pointer */ -#define RTE_PTR_SUB(ptr, x) ((void*)((uintptr_t)ptr - (x))) +#define RTE_PTR_SUB(ptr, x) ((void *)((uintptr_t)(ptr) - (x))) /** * get the difference between two pointer values, i.e. how far apart @@ -280,7 +280,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) * must be a power-of-two value. */ #define RTE_PTR_ALIGN_FLOOR(ptr, align) \ - ((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)ptr, align)) + ((typeof(ptr))RTE_ALIGN_FLOOR((uintptr_t)(ptr), align)) /** * Macro to align a value to a given power-of-two. The resultant value -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.658313581 +0000 +++ 0002-eal-fix-side-effect-in-some-pointer-arithmetic-macro.patch 2022-11-03 09:27:25.293420892 +0000 @@ -1 +1 @@ -From 1a7374c95678183aef6f40b64074752831a33d26 Mon Sep 17 00:00:00 2001 +From 1aa7dc7481d5bbacc6c86dfb87a81ff6c0eeda12 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 1a7374c95678183aef6f40b64074752831a33d26 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -33,3 +34,3 @@ - app/test/test_common.c | 56 +++++++++++++++++++++++++----------- - lib/eal/include/rte_common.h | 4 +-- - 2 files changed, 41 insertions(+), 19 deletions(-) + app/test/test_common.c | 52 ++++++++++++++++++++--------- + lib/librte_eal/include/rte_common.h | 4 +-- + 2 files changed, 39 insertions(+), 17 deletions(-) @@ -38 +39 @@ -index ef177cecb1..f89e1eb7ee 100644 +index 12bd1cad90..181c8be3be 100644 @@ -41 +42 @@ -@@ -25,31 +25,53 @@ test_macros(int __rte_unused unused_parm) +@@ -25,27 +25,49 @@ test_macros(int __rte_unused unused_parm) @@ -50 +50,0 @@ - unsigned int smaller = SMALLER, bigger = BIGGER; @@ -55,3 +54,0 @@ - RTE_SWAP(smaller, bigger); -- if (smaller != BIGGER && bigger != SMALLER) -- FAIL_MACRO(RTE_SWAP); @@ -68,2 +64,0 @@ -+ RTE_TEST_ASSERT(smaller == BIGGER && bigger == SMALLER, -+ "RTE_SWAP"); @@ -112,5 +107,5 @@ -diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h -index a96cc2a138..d517e9f75f 100644 ---- a/lib/eal/include/rte_common.h -+++ b/lib/eal/include/rte_common.h -@@ -295,7 +295,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h +index 677b52a2f8..853adcb249 100644 +--- a/lib/librte_eal/include/rte_common.h ++++ b/lib/librte_eal/include/rte_common.h +@@ -255,7 +255,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) @@ -125 +120 @@ -@@ -320,7 +320,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +@@ -280,7 +280,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'app/testpmd: restore ixgbe bypass commands' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi 2022-11-03 9:26 ` patch 'eal: fix side effect in some pointer arithmetic macros' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/bonding: fix array overflow in Rx burst' " luca.boccassi ` (96 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: David Marchand; +Cc: Ferruh Yigit, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a8d9f35ccc796fe5adcbb9587403283a843ea7c7 Thanks. Luca Boccassi --- From a8d9f35ccc796fe5adcbb9587403283a843ea7c7 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Thu, 21 Jul 2022 10:05:45 +0200 Subject: [PATCH] app/testpmd: restore ixgbe bypass commands [ upstream commit 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b ] Since the switch to meson, ixgbe bypass commands were ineffective as the RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the net/ixgbe driver had this feature compiled in. Fixes: 16ade738fd0d ("app/testpmd: build with meson") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com> --- app/test-pmd/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index 4d584f7562..adbb1d7f89 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -51,6 +51,7 @@ if dpdk_conf.has('RTE_NET_I40E') deps += 'net_i40e' endif if dpdk_conf.has('RTE_NET_IXGBE') + cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS'] deps += 'net_ixgbe' endif if dpdk_conf.has('RTE_NET_DPAA') -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.708234334 +0000 +++ 0003-app-testpmd-restore-ixgbe-bypass-commands.patch 2022-11-03 09:27:25.297420969 +0000 @@ -1 +1 @@ -From 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b Mon Sep 17 00:00:00 2001 +From a8d9f35ccc796fe5adcbb9587403283a843ea7c7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8d1bd1c04d4122b76e7c9c76ad865ca1c8c3bd8b ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 8488efc138..cbe9bf2e93 100644 +index 4d584f7562..adbb1d7f89 100644 @@ -23,2 +24,2 @@ -@@ -65,6 +65,7 @@ if dpdk_conf.has('RTE_NET_I40E') - deps += 'net_i40e' +@@ -51,6 +51,7 @@ if dpdk_conf.has('RTE_NET_I40E') + deps += 'net_i40e' @@ -27,2 +28,2 @@ -+ cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS'] - deps += 'net_ixgbe' ++ cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS'] + deps += 'net_ixgbe' ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix array overflow in Rx burst' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi 2022-11-03 9:26 ` patch 'eal: fix side effect in some pointer arithmetic macros' " luca.boccassi 2022-11-03 9:26 ` patch 'app/testpmd: restore ixgbe bypass commands' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/bonding: fix double slave link status query' " luca.boccassi ` (95 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Yunjian Wang; +Cc: Lei Ji, Min Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1eaa5b679f39de15a1886712cb2d20e6dca618d4 Thanks. Luca Boccassi --- From 1eaa5b679f39de15a1886712cb2d20e6dca618d4 Mon Sep 17 00:00:00 2001 From: Yunjian Wang <wangyunjian@huawei.com> Date: Mon, 18 Jul 2022 21:08:44 +0800 Subject: [PATCH] net/bonding: fix array overflow in Rx burst [ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ] In bond_ethdev_rx_burst() function, we check the validity of the 'active_slave' as this code: if (++active_slave == slave_count) active_slave = 0; However, the value of 'active_slave' maybe equal to 'slave_count', when a slave is down. This is wrong and it can cause buffer overflow. This patch fixes the issue by using '>=' instead of '=='. Fixes: e1110e977648 ("net/bonding: fix Rx slave fairness") Signed-off-by: Lei Ji <jilei8@huawei.com> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 4fa523201f..01ea83d988 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -82,7 +82,7 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) bufs + num_rx_total, nb_pkts); num_rx_total += num_rx_slave; nb_pkts -= num_rx_slave; - if (++active_slave == slave_count) + if (++active_slave >= slave_count) active_slave = 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.772738034 +0000 +++ 0004-net-bonding-fix-array-overflow-in-Rx-burst.patch 2022-11-03 09:27:25.301421048 +0000 @@ -1 +1 @@ -From 007c5450dfa094f7e07ebee3610bcb3494ef842c Mon Sep 17 00:00:00 2001 +From 1eaa5b679f39de15a1886712cb2d20e6dca618d4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index cd80a0af46..02c96f697d 100644 +index 4fa523201f..01ea83d988 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix double slave link status query' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (2 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/bonding: fix array overflow in Rx burst' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix scattered Rx' " luca.boccassi ` (94 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Yunjian Wang; +Cc: Min Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/df323985481d536778db3fe2f025456f5dbc7671 Thanks. Luca Boccassi --- From df323985481d536778db3fe2f025456f5dbc7671 Mon Sep 17 00:00:00 2001 From: Yunjian Wang <wangyunjian@huawei.com> Date: Wed, 13 Jul 2022 19:11:13 +0800 Subject: [PATCH] net/bonding: fix double slave link status query [ upstream commit ac95744076a72c0a150a988cc9042a5422e5041f ] When link status polling mode is used, the slave link status is queried twice, which may be inconsistent. To fix this, we can keep the latest queried link state. Fixes: a45b288ef21a ("bond: support link status polling") Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 01ea83d988..f1c9a4299e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2397,9 +2397,6 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg) * event callback */ if (slave_ethdev->data->dev_link.link_status != internals->slaves[i].last_link_status) { - internals->slaves[i].last_link_status = - slave_ethdev->data->dev_link.link_status; - bond_ethdev_lsc_event_callback(internals->slaves[i].port_id, RTE_ETH_EVENT_INTR_LSC, &bonded_ethdev->data->port_id, @@ -2898,7 +2895,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, uint8_t lsc_flag = 0; int valid_slave = 0; - uint16_t active_pos; + uint16_t active_pos, slave_idx; uint16_t i; if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL) @@ -2919,6 +2916,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, for (i = 0; i < internals->slave_count; i++) { if (internals->slaves[i].port_id == port_id) { valid_slave = 1; + slave_idx = i; break; } } @@ -3007,6 +3005,7 @@ link_update: * slaves */ bond_ethdev_link_update(bonded_eth_dev, 0); + internals->slaves[slave_idx].last_link_status = link.link_status; if (lsc_flag) { /* Cancel any possible outstanding interrupts if delays are enabled */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.834205514 +0000 +++ 0005-net-bonding-fix-double-slave-link-status-query.patch 2022-11-03 09:27:25.305421124 +0000 @@ -1 +1 @@ -From ac95744076a72c0a150a988cc9042a5422e5041f Mon Sep 17 00:00:00 2001 +From df323985481d536778db3fe2f025456f5dbc7671 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ac95744076a72c0a150a988cc9042a5422e5041f ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 02c96f697d..fd2d95a751 100644 +index 01ea83d988..f1c9a4299e 100644 @@ -23 +24 @@ -@@ -2418,9 +2418,6 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg) +@@ -2397,9 +2397,6 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg) @@ -33 +34 @@ -@@ -2919,7 +2916,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, +@@ -2898,7 +2895,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, @@ -42 +43 @@ -@@ -2940,6 +2937,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, +@@ -2919,6 +2916,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, @@ -50 +51 @@ -@@ -3028,6 +3026,7 @@ link_update: +@@ -3007,6 +3005,7 @@ link_update: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: fix scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (3 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/bonding: fix double slave link status query' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix mbuf lengths in " luca.boccassi ` (93 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3ecf863830e5e5d40833a496338b51f3791e59d8 Thanks. Luca Boccassi --- From 3ecf863830e5e5d40833a496338b51f3791e59d8 Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Fri, 2 Sep 2022 04:47:51 -0400 Subject: [PATCH] net/axgbe: fix scattered Rx [ upstream commit 0fda97d73775ce7955bfa54216c030188357ae89 ] Error check needs to be done only for last segment of Jumbo packet. Freed first_seg and reset eop to 0 in error case Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 35 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 032e3cebce..68270bc3a6 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -324,8 +324,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, uint64_t old_dirty = rxq->dirty; struct rte_mbuf *first_seg = NULL; struct rte_mbuf *mbuf, *tmbuf; - unsigned int err; - uint32_t error_status; + unsigned int err = 0; + uint32_t error_status = 0; uint16_t idx, pidx, data_len = 0, pkt_len = 0; idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); @@ -361,19 +361,6 @@ next_desc: } mbuf = rxq->sw_ring[idx]; - /* Check for any errors and free mbuf*/ - err = AXGMAC_GET_BITS_LE(desc->write.desc3, - RX_NORMAL_DESC3, ES); - error_status = 0; - if (unlikely(err)) { - error_status = desc->write.desc3 & AXGBE_ERR_STATUS; - if ((error_status != AXGBE_L3_CSUM_ERR) - && (error_status != AXGBE_L4_CSUM_ERR)) { - rxq->errors++; - rte_pktmbuf_free(mbuf); - goto err_set; - } - } rte_prefetch1(rte_pktmbuf_mtod(mbuf, void *)); if (!AXGMAC_GET_BITS_LE(desc->write.desc3, @@ -386,6 +373,24 @@ next_desc: pkt_len = AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, PL); data_len = pkt_len - rxq->crc_len; + /* Check for any errors and free mbuf*/ + err = AXGMAC_GET_BITS_LE(desc->write.desc3, + RX_NORMAL_DESC3, ES); + error_status = 0; + if (unlikely(err)) { + error_status = desc->write.desc3 & + AXGBE_ERR_STATUS; + if (error_status != AXGBE_L3_CSUM_ERR && + error_status != AXGBE_L4_CSUM_ERR) { + rxq->errors++; + rte_pktmbuf_free(mbuf); + rte_pktmbuf_free(first_seg); + first_seg = NULL; + eop = 0; + goto err_set; + } + } + } if (first_seg != NULL) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.890070880 +0000 +++ 0006-net-axgbe-fix-scattered-Rx.patch 2022-11-03 09:27:25.305421124 +0000 @@ -1 +1 @@ -From 0fda97d73775ce7955bfa54216c030188357ae89 Mon Sep 17 00:00:00 2001 +From 3ecf863830e5e5d40833a496338b51f3791e59d8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0fda97d73775ce7955bfa54216c030188357ae89 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index f38bb64fab..89ed6fd74a 100644 +index 032e3cebce..68270bc3a6 100644 @@ -22 +23 @@ -@@ -343,8 +343,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, +@@ -324,8 +324,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, @@ -26 +27 @@ -- unsigned int err, etlt; +- unsigned int err; @@ -28 +29 @@ -+ unsigned int err = 0, etlt; ++ unsigned int err = 0; @@ -31 +31,0 @@ - uint64_t offloads; @@ -33 +33,2 @@ -@@ -381,19 +381,6 @@ next_desc: + idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); +@@ -361,19 +361,6 @@ next_desc: @@ -53 +54 @@ -@@ -406,6 +393,24 @@ next_desc: +@@ -386,6 +373,24 @@ next_desc: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: fix mbuf lengths in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (4 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: fix scattered Rx' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix length of each segment " luca.boccassi ` (92 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/d5affccf25a85b3c67dd547ae90d3dce3f96b52c Thanks. Luca Boccassi --- From d5affccf25a85b3c67dd547ae90d3dce3f96b52c Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Fri, 2 Sep 2022 04:47:52 -0400 Subject: [PATCH] net/axgbe: fix mbuf lengths in scattered Rx [ upstream commit e73845354abce20ed9677c6519bcbe5a450fecef ] Updated pkt_len and data_len in the last segment of the packet. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 68270bc3a6..cbcbe0e682 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -371,8 +371,8 @@ next_desc: } else { eop = 1; pkt_len = AXGMAC_GET_BITS_LE(desc->write.desc3, - RX_NORMAL_DESC3, PL); - data_len = pkt_len - rxq->crc_len; + RX_NORMAL_DESC3, PL) - rxq->crc_len; + data_len = pkt_len % rxq->buf_size; /* Check for any errors and free mbuf*/ err = AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, ES); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.943525236 +0000 +++ 0007-net-axgbe-fix-mbuf-lengths-in-scattered-Rx.patch 2022-11-03 09:27:25.305421124 +0000 @@ -1 +1 @@ -From e73845354abce20ed9677c6519bcbe5a450fecef Mon Sep 17 00:00:00 2001 +From d5affccf25a85b3c67dd547ae90d3dce3f96b52c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e73845354abce20ed9677c6519bcbe5a450fecef ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 89ed6fd74a..2c2554e900 100644 +index 68270bc3a6..cbcbe0e682 100644 @@ -21 +22 @@ -@@ -391,8 +391,8 @@ next_desc: +@@ -371,8 +371,8 @@ next_desc: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: fix length of each segment in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (5 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: fix mbuf lengths in " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix checksum and RSS " luca.boccassi ` (91 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/81a3b2b2be3551e833c1fb4dbd365d56160da605 Thanks. Luca Boccassi --- From 81a3b2b2be3551e833c1fb4dbd365d56160da605 Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Fri, 2 Sep 2022 04:47:53 -0400 Subject: [PATCH] net/axgbe: fix length of each segment in scattered Rx [ upstream commit d901cc0596317a861b90a2c26b6560bde92bd2df ] Updating mbuf data_len, Pkt_len for each segment before chaining them Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index cbcbe0e682..b498f94ae2 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -392,6 +392,10 @@ next_desc: } } + /* Mbuf populate */ + mbuf->data_off = RTE_PKTMBUF_HEADROOM; + mbuf->data_len = data_len; + mbuf->pkt_len = data_len; if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) @@ -405,10 +409,6 @@ next_desc: if (AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, RSV)) mbuf->hash.rss = rte_le_to_cpu_32(desc->write.desc1); - /* Mbuf populate */ - mbuf->data_off = RTE_PKTMBUF_HEADROOM; - mbuf->data_len = data_len; - err_set: rxq->cur++; rxq->sw_ring[idx++] = tmbuf; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:25.994405255 +0000 +++ 0008-net-axgbe-fix-length-of-each-segment-in-scattered-Rx.patch 2022-11-03 09:27:25.305421124 +0000 @@ -1 +1 @@ -From d901cc0596317a861b90a2c26b6560bde92bd2df Mon Sep 17 00:00:00 2001 +From 81a3b2b2be3551e833c1fb4dbd365d56160da605 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d901cc0596317a861b90a2c26b6560bde92bd2df ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14,2 +15,2 @@ - drivers/net/axgbe/axgbe_rxtx.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) + drivers/net/axgbe/axgbe_rxtx.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) @@ -18 +19 @@ -index 2c2554e900..7c07fd90ef 100644 +index cbcbe0e682..b498f94ae2 100644 @@ -21 +22 @@ -@@ -412,6 +412,10 @@ next_desc: +@@ -392,6 +392,10 @@ next_desc: @@ -32,4 +33,4 @@ -@@ -443,9 +447,6 @@ next_desc: - mbuf->vlan_tci = 0; - } - } +@@ -405,10 +409,6 @@ next_desc: + if (AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, RSV)) + mbuf->hash.rss = rte_le_to_cpu_32(desc->write.desc1); + @@ -39 +40 @@ - +- @@ -41,0 +43 @@ + rxq->sw_ring[idx++] = tmbuf; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: fix checksum and RSS in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (6 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: fix length of each segment " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: optimise " luca.boccassi ` (90 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/437187fe7cba7b75057b8eb3e349b011c46904a0 Thanks. Luca Boccassi --- From 437187fe7cba7b75057b8eb3e349b011c46904a0 Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Fri, 2 Sep 2022 04:47:54 -0400 Subject: [PATCH] net/axgbe: fix checksum and RSS in scattered Rx [ upstream commit 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 ] Updated the RSS hash and CSUM checks with first_seg instead of mbufs. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index b498f94ae2..6696f49a1e 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -407,7 +407,8 @@ next_desc: /* Get the RSS hash */ if (AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, RSV)) - mbuf->hash.rss = rte_le_to_cpu_32(desc->write.desc1); + first_seg->hash.rss = + rte_le_to_cpu_32(desc->write.desc1); err_set: rxq->cur++; @@ -429,18 +430,24 @@ err_set: first_seg->port = rxq->port_id; if (rxq->pdata->rx_csum_enable) { - mbuf->ol_flags = 0; - mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD; - mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD; + first_seg->ol_flags = 0; + first_seg->ol_flags |= PKT_RX_IP_CKSUM_GOOD; + first_seg->ol_flags |= PKT_RX_L4_CKSUM_GOOD; if (unlikely(error_status == AXGBE_L3_CSUM_ERR)) { - mbuf->ol_flags &= ~PKT_RX_IP_CKSUM_GOOD; - mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD; - mbuf->ol_flags &= ~PKT_RX_L4_CKSUM_GOOD; - mbuf->ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; + first_seg->ol_flags &= + ~PKT_RX_IP_CKSUM_GOOD; + first_seg->ol_flags |= + PKT_RX_IP_CKSUM_BAD; + first_seg->ol_flags &= + ~PKT_RX_L4_CKSUM_GOOD; + first_seg->ol_flags |= + PKT_RX_L4_CKSUM_UNKNOWN; } else if (unlikely(error_status == AXGBE_L4_CSUM_ERR)) { - mbuf->ol_flags &= ~PKT_RX_L4_CKSUM_GOOD; - mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD; + first_seg->ol_flags &= + ~PKT_RX_L4_CKSUM_GOOD; + first_seg->ol_flags |= + PKT_RX_L4_CKSUM_BAD; } } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.051985842 +0000 +++ 0009-net-axgbe-fix-checksum-and-RSS-in-scattered-Rx.patch 2022-11-03 09:27:25.309421202 +0000 @@ -1 +1 @@ -From 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 Mon Sep 17 00:00:00 2001 +From 437187fe7cba7b75057b8eb3e349b011c46904a0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 970d2e22ca48581dcb8ee467a3521e9a22fbf8f4 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14,2 +15,2 @@ - drivers/net/axgbe/axgbe_rxtx.c | 41 +++++++++++++++++++++------------- - 1 file changed, 25 insertions(+), 16 deletions(-) + drivers/net/axgbe/axgbe_rxtx.c | 27 +++++++++++++++++---------- + 1 file changed, 17 insertions(+), 10 deletions(-) @@ -18 +19 @@ -index 7c07fd90ef..2bad638f79 100644 +index b498f94ae2..6696f49a1e 100644 @@ -21 +22 @@ -@@ -427,24 +427,27 @@ next_desc: +@@ -407,7 +407,8 @@ next_desc: @@ -28,27 +28,0 @@ - etlt = AXGMAC_GET_BITS_LE(desc->write.desc3, - RX_NORMAL_DESC3, ETLT); - offloads = rxq->pdata->eth_dev->data->dev_conf.rxmode.offloads; - if (!err || !etlt) { - if (etlt == RX_CVLAN_TAG_PRESENT) { -- mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN; -- mbuf->vlan_tci = -+ first_seg->ol_flags |= RTE_MBUF_F_RX_VLAN; -+ first_seg->vlan_tci = - AXGMAC_GET_BITS_LE(desc->write.desc0, - RX_NORMAL_DESC0, OVT); - if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) -- mbuf->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED; -+ first_seg->ol_flags |= -+ RTE_MBUF_F_RX_VLAN_STRIPPED; - else -- mbuf->ol_flags &= ~RTE_MBUF_F_RX_VLAN_STRIPPED; -+ first_seg->ol_flags &= -+ ~RTE_MBUF_F_RX_VLAN_STRIPPED; - } else { -- mbuf->ol_flags &= -+ first_seg->ol_flags &= - ~(RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED); -- mbuf->vlan_tci = 0; -+ first_seg->vlan_tci = 0; - } - } @@ -56 +30,3 @@ -@@ -468,18 +471,24 @@ err_set: + err_set: + rxq->cur++; +@@ -429,18 +430,24 @@ err_set: @@ -61,2 +37,2 @@ -- mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; -- mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; +- mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD; +- mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD; @@ -64,2 +40,2 @@ -+ first_seg->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; -+ first_seg->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; ++ first_seg->ol_flags |= PKT_RX_IP_CKSUM_GOOD; ++ first_seg->ol_flags |= PKT_RX_L4_CKSUM_GOOD; @@ -67,4 +43,4 @@ -- mbuf->ol_flags &= ~RTE_MBUF_F_RX_IP_CKSUM_GOOD; -- mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD; -- mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; -- mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; +- mbuf->ol_flags &= ~PKT_RX_IP_CKSUM_GOOD; +- mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD; +- mbuf->ol_flags &= ~PKT_RX_L4_CKSUM_GOOD; +- mbuf->ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; @@ -72 +48 @@ -+ ~RTE_MBUF_F_RX_IP_CKSUM_GOOD; ++ ~PKT_RX_IP_CKSUM_GOOD; @@ -74 +50 @@ -+ RTE_MBUF_F_RX_IP_CKSUM_BAD; ++ PKT_RX_IP_CKSUM_BAD; @@ -76 +52 @@ -+ ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; ++ ~PKT_RX_L4_CKSUM_GOOD; @@ -78 +54 @@ -+ RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; ++ PKT_RX_L4_CKSUM_UNKNOWN; @@ -81,2 +57,2 @@ -- mbuf->ol_flags &= ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; -- mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; +- mbuf->ol_flags &= ~PKT_RX_L4_CKSUM_GOOD; +- mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD; @@ -84 +60 @@ -+ ~RTE_MBUF_F_RX_L4_CKSUM_GOOD; ++ ~PKT_RX_L4_CKSUM_GOOD; @@ -86 +62 @@ -+ RTE_MBUF_F_RX_L4_CKSUM_BAD; ++ PKT_RX_L4_CKSUM_BAD; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: optimise scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (7 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: fix checksum and RSS " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: remove freeing buffer in " luca.boccassi ` (89 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5423479bd366d73212f0efc91e68dbdc32ac9cfc Thanks. Luca Boccassi --- From 5423479bd366d73212f0efc91e68dbdc32ac9cfc Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Tue, 6 Sep 2022 07:59:15 -0400 Subject: [PATCH] net/axgbe: optimise scattered Rx [ upstream commit 2770163844038ed4fe862c438a7e65443be0c817 ] Updated the logic to remove the extra increments of the variables. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 6696f49a1e..8449eb9b63 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -321,7 +321,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, struct axgbe_rx_queue *rxq = rx_queue; volatile union axgbe_rx_desc *desc; - uint64_t old_dirty = rxq->dirty; struct rte_mbuf *first_seg = NULL; struct rte_mbuf *mbuf, *tmbuf; unsigned int err = 0; @@ -332,8 +331,7 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, while (nb_rx < nb_pkts) { bool eop = 0; next_desc: - if (unlikely(idx == rxq->nb_desc)) - idx = 0; + idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); desc = &rxq->desc[idx]; @@ -412,12 +410,11 @@ next_desc: err_set: rxq->cur++; - rxq->sw_ring[idx++] = tmbuf; + rxq->sw_ring[idx] = tmbuf; desc->read.baddr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(tmbuf)); memset((void *)(&desc->read.desc2), 0, 8); AXGMAC_SET_BITS_LE(desc->read.desc3, RX_NORMAL_DESC3, OWN, 1); - rxq->dirty++; if (!eop) { rte_pktmbuf_free(mbuf); @@ -460,12 +457,13 @@ err_set: /* Save receive context.*/ rxq->pkts += nb_rx; - if (rxq->dirty != old_dirty) { + if (rxq->dirty != rxq->cur) { rte_wmb(); - idx = AXGBE_GET_DESC_IDX(rxq, rxq->dirty - 1); + idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur - 1); AXGMAC_DMA_IOWRITE(rxq, DMA_CH_RDTR_LO, low32_value(rxq->ring_phys_addr + (idx * sizeof(union axgbe_rx_desc)))); + rxq->dirty = rxq->cur; } return nb_rx; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.107132939 +0000 +++ 0010-net-axgbe-optimise-scattered-Rx.patch 2022-11-03 09:27:25.309421202 +0000 @@ -1 +1 @@ -From 2770163844038ed4fe862c438a7e65443be0c817 Mon Sep 17 00:00:00 2001 +From 5423479bd366d73212f0efc91e68dbdc32ac9cfc Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2770163844038ed4fe862c438a7e65443be0c817 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14,2 +15,2 @@ - drivers/net/axgbe/axgbe_rxtx.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) + drivers/net/axgbe/axgbe_rxtx.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) @@ -18 +19 @@ -index 2bad638f79..8b43e8160b 100644 +index 6696f49a1e..8449eb9b63 100644 @@ -21 +22 @@ -@@ -340,7 +340,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, +@@ -321,7 +321,6 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, @@ -28,2 +29,2 @@ - unsigned int err = 0, etlt; -@@ -352,8 +351,7 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, + unsigned int err = 0; +@@ -332,8 +331,7 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, @@ -39,10 +40 @@ -@@ -446,19 +444,19 @@ next_desc: - ~RTE_MBUF_F_RX_VLAN_STRIPPED; - } else { - first_seg->ol_flags &= -- ~(RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED); -+ ~(RTE_MBUF_F_RX_VLAN | -+ RTE_MBUF_F_RX_VLAN_STRIPPED); - first_seg->vlan_tci = 0; - } - } +@@ -412,12 +410,11 @@ next_desc: @@ -62 +54 @@ -@@ -501,12 +499,13 @@ err_set: +@@ -460,12 +457,13 @@ err_set: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: remove freeing buffer in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (8 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: optimise " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/nfp: improve HW info header log readability' " luca.boccassi ` (88 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0e99be3de1489b6b2f01ae0ff4c4e43864d51e54 Thanks. Luca Boccassi --- From 0e99be3de1489b6b2f01ae0ff4c4e43864d51e54 Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Thu, 8 Sep 2022 08:42:15 -0400 Subject: [PATCH] net/axgbe: remove freeing buffer in scattered Rx [ upstream commit e867021dadd7976758b4892cb64b19078a1855e0 ] Removed freeing of mbuf in scattered Rx as it should not be freed in rx. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 8449eb9b63..55aed1e73b 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -416,14 +416,11 @@ err_set: memset((void *)(&desc->read.desc2), 0, 8); AXGMAC_SET_BITS_LE(desc->read.desc3, RX_NORMAL_DESC3, OWN, 1); - if (!eop) { - rte_pktmbuf_free(mbuf); + if (!eop) goto next_desc; - } first_seg->pkt_len = pkt_len; rxq->bytes += pkt_len; - mbuf->next = NULL; first_seg->port = rxq->port_id; if (rxq->pdata->rx_csum_enable) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.171519806 +0000 +++ 0011-net-axgbe-remove-freeing-buffer-in-scattered-Rx.patch 2022-11-03 09:27:25.309421202 +0000 @@ -1 +1 @@ -From e867021dadd7976758b4892cb64b19078a1855e0 Mon Sep 17 00:00:00 2001 +From 0e99be3de1489b6b2f01ae0ff4c4e43864d51e54 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e867021dadd7976758b4892cb64b19078a1855e0 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 8b43e8160b..d4224992ee 100644 +index 8449eb9b63..55aed1e73b 100644 @@ -21 +22 @@ -@@ -458,14 +458,11 @@ err_set: +@@ -416,14 +416,11 @@ err_set: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/nfp: improve HW info header log readability' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (9 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/axgbe: remove freeing buffer in " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/txgbe: remove semaphore between SW/FW' " luca.boccassi ` (87 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: James Hershaw; +Cc: Chaoyong He, Niklas Söderlund, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a2b3267e2b9672887c784843d9a945ea6bb5a8a2 Thanks. Luca Boccassi --- From a2b3267e2b9672887c784843d9a945ea6bb5a8a2 Mon Sep 17 00:00:00 2001 From: James Hershaw <james.hershaw@corigine.com> Date: Fri, 26 Aug 2022 13:39:03 +0800 Subject: [PATCH] net/nfp: improve HW info header log readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit c18806818fb530d60003ea7da0b866fcdfe81e45 ] Prepend `0x` to the NFP HWINFO header value that is printed to improve the readability of the printed statement. Fixes: c7e9729da6b5 ("net/nfp: support CPP") Signed-off-by: James Hershaw <james.hershaw@corigine.com> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com> --- drivers/net/nfp/nfpcore/nfp_hwinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.c b/drivers/net/nfp/nfpcore/nfp_hwinfo.c index c0516bf8e8..9f848bde79 100644 --- a/drivers/net/nfp/nfpcore/nfp_hwinfo.c +++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.c @@ -108,7 +108,7 @@ nfp_hwinfo_try_fetch(struct nfp_cpp *cpp, size_t *cpp_size) goto exit_free; header = (void *)db; - printf("NFP HWINFO header: %08x\n", *(uint32_t *)header); + printf("NFP HWINFO header: %#08x\n", *(uint32_t *)header); if (nfp_hwinfo_is_updating(header)) goto exit_free; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.223936985 +0000 +++ 0012-net-nfp-improve-HW-info-header-log-readability.patch 2022-11-03 09:27:25.309421202 +0000 @@ -1 +1 @@ -From c18806818fb530d60003ea7da0b866fcdfe81e45 Mon Sep 17 00:00:00 2001 +From a2b3267e2b9672887c784843d9a945ea6bb5a8a2 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit c18806818fb530d60003ea7da0b866fcdfe81e45 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/txgbe: remove semaphore between SW/FW' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (10 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/nfp: improve HW info header log readability' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/txgbe: rename some extended statistics' " luca.boccassi ` (86 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Jiawen Wu; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/e0b3fa222e2ed9888e8ccfb38ce8d83199bcde9a Thanks. Luca Boccassi --- From e0b3fa222e2ed9888e8ccfb38ce8d83199bcde9a Mon Sep 17 00:00:00 2001 From: Jiawen Wu <jiawenwu@trustnetic.com> Date: Fri, 2 Sep 2022 11:00:05 +0800 Subject: [PATCH] net/txgbe: remove semaphore between SW/FW [ upstream commit 61b7a046e260897329a648b1c0e72032b5fbe685 ] Since firmware does not use the semaphore between software and firmware. Remove useless unilateral semaphore setting. Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> --- drivers/net/txgbe/base/txgbe_eeprom.c | 32 --------------------------- 1 file changed, 32 deletions(-) diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c b/drivers/net/txgbe/base/txgbe_eeprom.c index 6ff0f23f18..9e14f2f219 100644 --- a/drivers/net/txgbe/base/txgbe_eeprom.c +++ b/drivers/net/txgbe/base/txgbe_eeprom.c @@ -110,37 +110,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) status = 0; } - /* Now get the semaphore between SW/FW through the SWESMBI bit */ - if (status == 0) { - for (i = 0; i < timeout; i++) { - /* Set the SW EEPROM semaphore bit to request access */ - wr32m(hw, TXGBE_MNGSWSYNC, - TXGBE_MNGSWSYNC_REQ, TXGBE_MNGSWSYNC_REQ); - - /* - * If we set the bit successfully then we got the - * semaphore. - */ - swsm = rd32(hw, TXGBE_MNGSWSYNC); - if (swsm & TXGBE_MNGSWSYNC_REQ) - break; - - usec_delay(50); - } - - /* - * Release semaphores and return error if SW EEPROM semaphore - * was not granted because we don't have access to the EEPROM - */ - if (i >= timeout) { - DEBUGOUT("SWESMBI Software EEPROM semaphore not granted."); - txgbe_release_eeprom_semaphore(hw); - status = TXGBE_ERR_EEPROM; - } - } else { - DEBUGOUT("Software semaphore SMBI between device drivers not granted."); - } - return status; } @@ -152,7 +121,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) **/ void txgbe_release_eeprom_semaphore(struct txgbe_hw *hw) { - wr32m(hw, TXGBE_MNGSWSYNC, TXGBE_MNGSWSYNC_REQ, 0); wr32m(hw, TXGBE_SWSEM, TXGBE_SWSEM_PF, 0); txgbe_flush(hw); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.274266127 +0000 +++ 0013-net-txgbe-remove-semaphore-between-SW-FW.patch 2022-11-03 09:27:25.309421202 +0000 @@ -1 +1 @@ -From 61b7a046e260897329a648b1c0e72032b5fbe685 Mon Sep 17 00:00:00 2001 +From e0b3fa222e2ed9888e8ccfb38ce8d83199bcde9a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 61b7a046e260897329a648b1c0e72032b5fbe685 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 4ed6bd6728..aeeae06dfc 100644 +index 6ff0f23f18..9e14f2f219 100644 @@ -21 +22 @@ -@@ -111,37 +111,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) +@@ -110,37 +110,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) @@ -59 +60 @@ -@@ -153,7 +122,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) +@@ -152,7 +121,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/txgbe: rename some extended statistics' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (11 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/txgbe: remove semaphore between SW/FW' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/mvneta: fix build with GCC 12' " luca.boccassi ` (85 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Jiawen Wu; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/12471540bf2a32764f306e4030b19a247e1f994a Thanks. Luca Boccassi --- From 12471540bf2a32764f306e4030b19a247e1f994a Mon Sep 17 00:00:00 2001 From: Jiawen Wu <jiawenwu@trustnetic.com> Date: Fri, 2 Sep 2022 11:00:06 +0800 Subject: [PATCH] net/txgbe: rename some extended statistics [ upstream commit d7494d6d530dc425b077d60b0035f99ee1741673 ] Rename rx_oversize_errors to rx_oversize_cnt since it depends on giant packet size limit instead of MTU, by hardware design. Rename rx_drop_packets to rx_rdb_drop to indicate the drop location. And add rx_dma_drop to extended statistics. Fixes: 91fe49c87d76 ("net/txgbe: support device xstats") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> --- drivers/net/txgbe/base/txgbe_type.h | 4 ++-- drivers/net/txgbe/txgbe_ethdev.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h index 4e9a7deb12..e17f40b978 100644 --- a/drivers/net/txgbe/base/txgbe_type.h +++ b/drivers/net/txgbe/base/txgbe_type.h @@ -285,9 +285,9 @@ struct txgbe_hw_stats { u64 tx_management_packets; u64 rx_management_dropped; u64 rx_dma_drop; - u64 rx_drop_packets; /* Basic Error */ + u64 rx_rdb_drop; u64 rx_crc_errors; u64 rx_illegal_byte_errors; u64 rx_error_bytes; @@ -295,7 +295,7 @@ struct txgbe_hw_stats { u64 rx_length_errors; u64 rx_undersize_errors; u64 rx_fragment_errors; - u64 rx_oversize_errors; + u64 rx_oversize_cnt; u64 rx_jabber_errors; u64 rx_l3_l4_xsum_error; u64 mac_local_errors; diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 1a2c9ff976..c62ed02cfd 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -173,8 +173,10 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { HW_XSTAT(rx_management_packets), HW_XSTAT(tx_management_packets), HW_XSTAT(rx_management_dropped), + HW_XSTAT(rx_dma_drop), /* Basic Error */ + HW_XSTAT(rx_rdb_drop), HW_XSTAT(rx_crc_errors), HW_XSTAT(rx_illegal_byte_errors), HW_XSTAT(rx_error_bytes), @@ -182,7 +184,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { HW_XSTAT(rx_length_errors), HW_XSTAT(rx_undersize_errors), HW_XSTAT(rx_fragment_errors), - HW_XSTAT(rx_oversize_errors), + HW_XSTAT(rx_oversize_cnt), HW_XSTAT(rx_jabber_errors), HW_XSTAT(rx_l3_l4_xsum_error), HW_XSTAT(mac_local_errors), @@ -1910,7 +1912,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, hw_stats->rx_bytes += rd64(hw, TXGBE_DMARXOCTL); hw_stats->tx_bytes += rd64(hw, TXGBE_DMATXOCTL); hw_stats->rx_dma_drop += rd32(hw, TXGBE_DMARXDROP); - hw_stats->rx_drop_packets += rd32(hw, TXGBE_PBRXDROP); + hw_stats->rx_rdb_drop += rd32(hw, TXGBE_PBRXDROP); /* MAC Stats */ hw_stats->rx_crc_errors += rd64(hw, TXGBE_MACRXERRCRCL); @@ -1942,7 +1944,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, rd64(hw, TXGBE_MACTX1024TOMAXL); hw_stats->rx_undersize_errors += rd64(hw, TXGBE_MACRXERRLENL); - hw_stats->rx_oversize_errors += rd32(hw, TXGBE_MACRXOVERSIZE); + hw_stats->rx_oversize_cnt += rd32(hw, TXGBE_MACRXOVERSIZE); hw_stats->rx_jabber_errors += rd32(hw, TXGBE_MACRXJABBER); /* MNG Stats */ @@ -2064,8 +2066,7 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) hw_stats->rx_mac_short_packet_dropped + hw_stats->rx_length_errors + hw_stats->rx_undersize_errors + - hw_stats->rx_oversize_errors + - hw_stats->rx_drop_packets + + hw_stats->rx_rdb_drop + hw_stats->rx_illegal_byte_errors + hw_stats->rx_error_bytes + hw_stats->rx_fragment_errors + -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.326687690 +0000 +++ 0014-net-txgbe-rename-some-extended-statistics.patch 2022-11-03 09:27:25.317421357 +0000 @@ -1 +1 @@ -From d7494d6d530dc425b077d60b0035f99ee1741673 Mon Sep 17 00:00:00 2001 +From 12471540bf2a32764f306e4030b19a247e1f994a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d7494d6d530dc425b077d60b0035f99ee1741673 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 343279127f..c3486b472f 100644 +index 4e9a7deb12..e17f40b978 100644 @@ -24 +25 @@ -@@ -356,9 +356,9 @@ struct txgbe_hw_stats { +@@ -285,9 +285,9 @@ struct txgbe_hw_stats { @@ -35 +36 @@ -@@ -366,7 +366,7 @@ struct txgbe_hw_stats { +@@ -295,7 +295,7 @@ struct txgbe_hw_stats { @@ -45 +46 @@ -index 0624568bdf..44224724da 100644 +index 1a2c9ff976..c62ed02cfd 100644 @@ -48 +49 @@ -@@ -183,8 +183,10 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { +@@ -173,8 +173,10 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { @@ -59 +60 @@ -@@ -192,7 +194,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { +@@ -182,7 +184,7 @@ static const struct rte_txgbe_xstats_name_off rte_txgbe_stats_strings[] = { @@ -68 +69 @@ -@@ -2157,7 +2159,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, +@@ -1910,7 +1912,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, @@ -77 +78 @@ -@@ -2189,7 +2191,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, +@@ -1942,7 +1944,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw, @@ -86 +87 @@ -@@ -2311,8 +2313,7 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -2064,8 +2066,7 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mvneta: fix build with GCC 12' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (12 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/txgbe: rename some extended statistics' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'malloc: fix storage size for some allocations' " luca.boccassi ` (84 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Amit Prakash Shukla; +Cc: Liron Himi, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f41cb4e8af620abbde2d8a5595cd8fd2052caee2 Thanks. Luca Boccassi --- From f41cb4e8af620abbde2d8a5595cd8fd2052caee2 Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla <amitprakashs@marvell.com> Date: Thu, 1 Sep 2022 14:01:18 +0530 Subject: [PATCH] net/mvneta: fix build with GCC 12 [ upstream commit d7b080f1e72d833d668a66199fe99ccda6c81a36 ] ./drivers/net/mvneta/mvneta_rxtx.c:89:42: error: 'mbufs' may be used uninitialized [-Werror=maybe-uninitialized] 89 | MVNETA_SET_COOKIE_HIGH_ADDR(mbufs[0]); | ^ ../drivers/net/mvneta/mvneta_rxtx.c:77:26: note: 'mbufs' declared here 77 | struct rte_mbuf *mbufs[MRVL_NETA_BUF_RELEASE_BURST_SIZE_MAX]; | ^~~~~ Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx") Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Liron Himi <lironh@marvell.com> --- drivers/net/mvneta/mvneta_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c index dfa7ecc090..92b157d702 100644 --- a/drivers/net/mvneta/mvneta_rxtx.c +++ b/drivers/net/mvneta/mvneta_rxtx.c @@ -79,6 +79,10 @@ mvneta_buffs_refill(struct mvneta_priv *priv, struct mvneta_rxq *rxq, u16 *num) int i, ret; uint16_t nb_desc = *num; + /* To prevent GCC-12 warning. */ + if (unlikely(nb_desc == 0)) + return -1; + ret = rte_pktmbuf_alloc_bulk(rxq->mp, mbufs, nb_desc); if (ret) { MVNETA_LOG(ERR, "Failed to allocate %u mbufs.", nb_desc); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.382895751 +0000 +++ 0015-net-mvneta-fix-build-with-GCC-12.patch 2022-11-03 09:27:25.317421357 +0000 @@ -1 +1 @@ -From d7b080f1e72d833d668a66199fe99ccda6c81a36 Mon Sep 17 00:00:00 2001 +From f41cb4e8af620abbde2d8a5595cd8fd2052caee2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d7b080f1e72d833d668a66199fe99ccda6c81a36 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 6e4a7896b4..952e982275 100644 +index dfa7ecc090..92b157d702 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'malloc: fix storage size for some allocations' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (13 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/mvneta: fix build with GCC 12' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'telemetry: fix escaping of invalid json characters' " luca.boccassi ` (83 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Fidaullah Noonari; +Cc: Dmitry Kozlyuk, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c610b6069a2c5ff08d87650d7f1fb8a613ef49ba Thanks. Luca Boccassi --- From c610b6069a2c5ff08d87650d7f1fb8a613ef49ba Mon Sep 17 00:00:00 2001 From: Fidaullah Noonari <fidaullah.noonari@emumba.com> Date: Thu, 28 Jul 2022 14:41:03 +0500 Subject: [PATCH] malloc: fix storage size for some allocations [ upstream commit f92b9ebed03dbd140a5a7b921cb898e661a59068 ] The amount of memory to allocate from the system for heap expansion was calculated in a way that may yield one page more than needed. This could hit the allocation limit from the system or EAL. The allocation would fail despite enough memory being available. In response to mail: https://inbox.dpdk.org/dev/CAEYuUWCnRZNwxiOHEeTHw0Gy9aFJRLZtvAG9g=smuUvUEMcFXg@mail.gmail.com/ A reproducer has been provided by Dmitry, see: https://inbox.dpdk.org/dev/20220922015212.03bfde66@sovereign/ Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug") Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> --- lib/librte_eal/common/malloc_heap.c | 2 +- lib/librte_eal/common/malloc_mp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c index f4e20eab92..7a5c56be97 100644 --- a/lib/librte_eal/common/malloc_heap.c +++ b/lib/librte_eal/common/malloc_heap.c @@ -396,7 +396,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz, int n_segs; bool callback_triggered = false; - alloc_sz = RTE_ALIGN_CEIL(align + elt_size + + alloc_sz = RTE_ALIGN_CEIL(RTE_ALIGN_CEIL(elt_size, align) + MALLOC_ELEM_OVERHEAD, pg_sz); n_segs = alloc_sz / pg_sz; diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c index f9d558ba64..8b2f06720b 100644 --- a/lib/librte_eal/common/malloc_mp.c +++ b/lib/librte_eal/common/malloc_mp.c @@ -185,7 +185,7 @@ handle_alloc_request(const struct malloc_mp_req *m, int n_segs; void *map_addr; - alloc_sz = RTE_ALIGN_CEIL(ar->align + ar->elt_size + + alloc_sz = RTE_ALIGN_CEIL(RTE_ALIGN_CEIL(ar->elt_size, ar->align) + MALLOC_ELEM_OVERHEAD, ar->page_sz); n_segs = alloc_sz / ar->page_sz; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.446986691 +0000 +++ 0016-malloc-fix-storage-size-for-some-allocations.patch 2022-11-03 09:27:25.321421435 +0000 @@ -1 +1 @@ -From f92b9ebed03dbd140a5a7b921cb898e661a59068 Mon Sep 17 00:00:00 2001 +From c610b6069a2c5ff08d87650d7f1fb8a613ef49ba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f92b9ebed03dbd140a5a7b921cb898e661a59068 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -23,2 +24,2 @@ - lib/eal/common/malloc_heap.c | 2 +- - lib/eal/common/malloc_mp.c | 2 +- + lib/librte_eal/common/malloc_heap.c | 2 +- + lib/librte_eal/common/malloc_mp.c | 2 +- @@ -27,5 +28,5 @@ -diff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c -index 27a52266ad..d7c410b786 100644 ---- a/lib/eal/common/malloc_heap.c -+++ b/lib/eal/common/malloc_heap.c -@@ -402,7 +402,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz, +diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c +index f4e20eab92..7a5c56be97 100644 +--- a/lib/librte_eal/common/malloc_heap.c ++++ b/lib/librte_eal/common/malloc_heap.c +@@ -396,7 +396,7 @@ try_expand_heap_primary(struct malloc_heap *heap, uint64_t pg_sz, @@ -40,7 +41,7 @@ -diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c -index 0c2624c62d..7270c2ec90 100644 ---- a/lib/eal/common/malloc_mp.c -+++ b/lib/eal/common/malloc_mp.c -@@ -250,7 +250,7 @@ handle_alloc_request(const struct malloc_mp_req *m, - return -1; - } +diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c +index f9d558ba64..8b2f06720b 100644 +--- a/lib/librte_eal/common/malloc_mp.c ++++ b/lib/librte_eal/common/malloc_mp.c +@@ -185,7 +185,7 @@ handle_alloc_request(const struct malloc_mp_req *m, + int n_segs; + void *map_addr; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'telemetry: fix escaping of invalid json characters' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (14 preceding siblings ...) 2022-11-03 9:26 ` patch 'malloc: fix storage size for some allocations' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'event/dsw: fix flow migration' " luca.boccassi ` (82 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Bruce Richardson Cc: Ciara Power, Morten Brørup, Chengwen Feng, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8d11cb48eb40641e17af79149b3297488dd9f7ec Thanks. Luca Boccassi --- From 8d11cb48eb40641e17af79149b3297488dd9f7ec Mon Sep 17 00:00:00 2001 From: Bruce Richardson <bruce.richardson@intel.com> Date: Fri, 9 Sep 2022 10:35:13 +0100 Subject: [PATCH] telemetry: fix escaping of invalid json characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit babc5214449d3566134294f30e6b4907bd813ac9 ] For string values returned from telemetry, escape any values that cannot normally appear in a json string. According to the json spec[1], the characters than need to be handled are control chars (char value < 0x20) and '"' and '\' characters. To handle this, we replace the snprintf call with a separate string copying and encapsulation routine which checks each character as it copies it to the final array. [1] https://www.rfc-editor.org/rfc/rfc8259.txt Bugzilla ID: 1037 Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ciara Power <ciara.power@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> --- lib/librte_telemetry/telemetry.c | 11 ++++-- lib/librte_telemetry/telemetry_json.h | 48 ++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c index 9d970d167e..c3522b7173 100644 --- a/lib/librte_telemetry/telemetry.c +++ b/lib/librte_telemetry/telemetry.c @@ -181,9 +181,14 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s) MAX_CMD_LEN, cmd ? cmd : "none"); break; case RTE_TEL_STRING: - used = snprintf(out_buf, sizeof(out_buf), "{\"%.*s\":\"%.*s\"}", - MAX_CMD_LEN, cmd, - RTE_TEL_MAX_SINGLE_STRING_LEN, d->data.str); + prefix_used = snprintf(out_buf, sizeof(out_buf), "{\"%.*s\":", + MAX_CMD_LEN, cmd); + cb_data_buf = &out_buf[prefix_used]; + buf_len = sizeof(out_buf) - prefix_used - 1; /* space for '}' */ + + used = rte_tel_json_str(cb_data_buf, buf_len, 0, d->data.str); + used += prefix_used; + used += strlcat(out_buf + used, "}", sizeof(out_buf) - used); break; case RTE_TEL_DICT: prefix_used = snprintf(out_buf, sizeof(out_buf), "{\"%.*s\":", diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h index db70690274..13df5d07e3 100644 --- a/lib/librte_telemetry/telemetry_json.h +++ b/lib/librte_telemetry/telemetry_json.h @@ -44,6 +44,52 @@ __json_snprintf(char *buf, const int len, const char *format, ...) return 0; /* nothing written or modified */ } +static const char control_chars[0x20] = { + ['\n'] = 'n', + ['\r'] = 'r', + ['\t'] = 't', +}; + +/** + * @internal + * Does the same as __json_snprintf(buf, len, "\"%s\"", str) + * except that it does proper escaping as necessary. + * Drops any invalid characters we don't support + */ +static inline int +__json_format_str(char *buf, const int len, const char *str) +{ + char tmp[len]; + int tmpidx = 0; + + tmp[tmpidx++] = '"'; + while (*str != '\0') { + if (*str < (int)RTE_DIM(control_chars)) { + int idx = *str; /* compilers don't like char type as index */ + if (control_chars[idx] != 0) { + tmp[tmpidx++] = '\\'; + tmp[tmpidx++] = control_chars[idx]; + } + } else if (*str == '"' || *str == '\\') { + tmp[tmpidx++] = '\\'; + tmp[tmpidx++] = *str; + } else + tmp[tmpidx++] = *str; + /* we always need space for closing quote and null character. + * Ensuring at least two free characters also means we can always take an + * escaped character like "\n" without overflowing + */ + if (tmpidx > len - 2) + return 0; + str++; + } + tmp[tmpidx++] = '"'; + tmp[tmpidx] = '\0'; + + strcpy(buf, tmp); + return tmpidx; +} + /* Copies an empty array into the provided buffer. */ static inline int rte_tel_json_empty_array(char *buf, const int len, const int used) @@ -62,7 +108,7 @@ rte_tel_json_empty_obj(char *buf, const int len, const int used) static inline int rte_tel_json_str(char *buf, const int len, const int used, const char *str) { - return used + __json_snprintf(buf + used, len - used, "\"%s\"", str); + return used + __json_format_str(buf + used, len - used, str); } /* Appends a string into the JSON array in the provided buffer. */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.507441742 +0000 +++ 0017-telemetry-fix-escaping-of-invalid-json-characters.patch 2022-11-03 09:27:25.321421435 +0000 @@ -1 +1 @@ -From babc5214449d3566134294f30e6b4907bd813ac9 Mon Sep 17 00:00:00 2001 +From 8d11cb48eb40641e17af79149b3297488dd9f7ec Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit babc5214449d3566134294f30e6b4907bd813ac9 ] + @@ -28,2 +30,2 @@ - lib/telemetry/telemetry.c | 11 +++++--- - lib/telemetry/telemetry_json.h | 48 +++++++++++++++++++++++++++++++++- + lib/librte_telemetry/telemetry.c | 11 ++++-- + lib/librte_telemetry/telemetry_json.h | 48 ++++++++++++++++++++++++++- @@ -32,5 +34,5 @@ -diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c -index 164ea0601a..72334d2429 100644 ---- a/lib/telemetry/telemetry.c -+++ b/lib/telemetry/telemetry.c -@@ -234,9 +234,14 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s) +diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c +index 9d970d167e..c3522b7173 100644 +--- a/lib/librte_telemetry/telemetry.c ++++ b/lib/librte_telemetry/telemetry.c +@@ -181,9 +181,14 @@ output_json(const char *cmd, const struct rte_tel_data *d, int s) @@ -54 +56 @@ -diff --git a/lib/telemetry/telemetry_json.h b/lib/telemetry/telemetry_json.h +diff --git a/lib/librte_telemetry/telemetry_json.h b/lib/librte_telemetry/telemetry_json.h @@ -56,2 +58,2 @@ ---- a/lib/telemetry/telemetry_json.h -+++ b/lib/telemetry/telemetry_json.h +--- a/lib/librte_telemetry/telemetry_json.h ++++ b/lib/librte_telemetry/telemetry_json.h ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'event/dsw: fix flow migration' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (15 preceding siblings ...) 2022-11-03 9:26 ` patch 'telemetry: fix escaping of invalid json characters' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'event/sw: fix device name in dump' " luca.boccassi ` (81 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Mattias Rönnblom; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c69260f49962d781417a0d17256d2386b46b4d3d Thanks. Luca Boccassi --- From c69260f49962d781417a0d17256d2386b46b4d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com> Date: Thu, 7 Jul 2022 13:43:25 +0200 Subject: [PATCH] event/dsw: fix flow migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 70cb0278a4c52a857fb56cda2183e2ee3fa2633a ] Fix bug in flow migration, which under certain conditions causes reordering and violation of atomicity guarantees. The issue occurs when the processing of a flow (on an atomic queue) has resulted in events enqueued to a flow currently being migrated, and the former (producer) flow is also selected for migration. The events are buffered ("paused") on the originating port, and released (forwarded) when the migration has completed. However, at the time of "unpausing" the latter (consumer) flow, processing of the producer flow on the port to which it was migrated may have already produced events, for the same paused flow. This constitutes a race condition, and depending on which port wins, reordering may have been introduced. This patch forbids migration when a port has paused events, since those events may have been the result of processing a to-be-migrated flow. This patch also disallows processing events pertaining to a flow under migration, for the same reason. A new buffer is introduced, which holds such not-yet-processed events dequeued from the port's input ring. Such events are forwarded to the target port as a part of the migration process. The 'forwarding' migration state is eliminated, and instead background processing is only performed if there are no unreleased events on the port. The bug is primarily triggered in situations where multiple flows are migrated as one transaction, but may occur even if only a single flow is migrated (e.g., with older DSW versions, which does not support multi-flow migration). Fixes: f6257b22e767 ("event/dsw: add load balancing") Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> --- drivers/event/dsw/dsw_evdev.h | 8 +- drivers/event/dsw/dsw_event.c | 315 ++++++++++++++++++++++++---------- 2 files changed, 232 insertions(+), 91 deletions(-) diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h index 6513d35ee7..ceabf9557d 100644 --- a/drivers/event/dsw/dsw_evdev.h +++ b/drivers/event/dsw/dsw_evdev.h @@ -126,7 +126,6 @@ struct dsw_queue_flow { enum dsw_migration_state { DSW_MIGRATION_STATE_IDLE, DSW_MIGRATION_STATE_PAUSING, - DSW_MIGRATION_STATE_FORWARDING, DSW_MIGRATION_STATE_UNPAUSING }; @@ -190,6 +189,13 @@ struct dsw_port { uint16_t paused_events_len; struct rte_event paused_events[DSW_MAX_EVENTS]; + uint16_t emigrating_events_len; + /* Buffer for not-yet-processed events pertaining to a flow + * emigrating from this port. These events will be forwarded + * to the target port. + */ + struct rte_event emigrating_events[DSW_MAX_EVENTS]; + uint16_t seen_events_len; uint16_t seen_events_idx; struct dsw_queue_flow seen_events[DSW_MAX_EVENTS_RECORDED]; diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 8b81dc5c56..76c89056a1 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -234,6 +234,15 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id, queue_id, flow_hash); } +static __rte_always_inline bool +dsw_port_is_flow_migrating(struct dsw_port *port, uint8_t queue_id, + uint16_t flow_hash) +{ + return dsw_is_queue_flow_in_ary(port->emigration_target_qfs, + port->emigration_targets_len, + queue_id, flow_hash); +} + static void dsw_port_add_paused_flows(struct dsw_port *port, struct dsw_queue_flow *qfs, uint8_t qfs_len) @@ -268,9 +277,19 @@ dsw_port_remove_paused_flow(struct dsw_port *port, port->paused_flows[i] = port->paused_flows[last_idx]; port->paused_flows_len--; - break; + + DSW_LOG_DP_PORT(DEBUG, port->id, + "Unpausing queue_id %d flow_hash %d.\n", + target_qf->queue_id, + target_qf->flow_hash); + + return; } } + + DSW_LOG_DP_PORT(ERR, port->id, + "Failed to unpause queue_id %d flow_hash %d.\n", + target_qf->queue_id, target_qf->flow_hash); } static void @@ -281,7 +300,6 @@ dsw_port_remove_paused_flows(struct dsw_port *port, for (i = 0; i < qfs_len; i++) dsw_port_remove_paused_flow(port, &qfs[i]); - } static void @@ -434,14 +452,15 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id) static bool dsw_select_emigration_target(struct dsw_evdev *dsw, - struct dsw_queue_flow_burst *bursts, - uint16_t num_bursts, uint8_t source_port_id, - int16_t *port_loads, uint16_t num_ports, - uint8_t *target_port_ids, - struct dsw_queue_flow *target_qfs, - uint8_t *targets_len) + struct dsw_port *source_port, + struct dsw_queue_flow_burst *bursts, + uint16_t num_bursts, + int16_t *port_loads, uint16_t num_ports, + uint8_t *target_port_ids, + struct dsw_queue_flow *target_qfs, + uint8_t *targets_len) { - int16_t source_port_load = port_loads[source_port_id]; + int16_t source_port_load = port_loads[source_port->id]; struct dsw_queue_flow *candidate_qf = NULL; uint8_t candidate_port_id = 0; int16_t candidate_weight = -1; @@ -466,7 +485,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, for (port_id = 0; port_id < num_ports; port_id++) { int16_t weight; - if (port_id == source_port_id) + if (port_id == source_port->id) continue; if (!dsw_is_serving_port(dsw, port_id, qf->queue_id)) @@ -488,7 +507,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, if (candidate_weight < 0) return false; - DSW_LOG_DP_PORT(DEBUG, source_port_id, "Selected queue_id %d " + DSW_LOG_DP_PORT(DEBUG, source_port->id, "Selected queue_id %d " "flow_hash %d (with flow load %d) for migration " "to port %d.\n", candidate_qf->queue_id, candidate_qf->flow_hash, @@ -496,7 +515,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, candidate_port_id); port_loads[candidate_port_id] += candidate_flow_load; - port_loads[source_port_id] -= candidate_flow_load; + port_loads[source_port->id] -= candidate_flow_load; target_port_ids[*targets_len] = candidate_port_id; target_qfs[*targets_len] = *candidate_qf; @@ -522,8 +541,8 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw, for (i = 0; i < DSW_MAX_FLOWS_PER_MIGRATION; i++) { bool found; - found = dsw_select_emigration_target(dsw, bursts, num_bursts, - source_port->id, + found = dsw_select_emigration_target(dsw, source_port, + bursts, num_bursts, port_loads, dsw->num_ports, target_port_ids, target_qfs, @@ -603,6 +622,7 @@ dsw_port_buffer_paused(struct dsw_port *port, port->paused_events_len++; } + static void dsw_port_buffer_non_paused(struct dsw_evdev *dsw, struct dsw_port *source_port, uint8_t dest_port_id, const struct rte_event *event) @@ -674,40 +694,39 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port, } static void -dsw_port_flush_paused_events(struct dsw_evdev *dsw, - struct dsw_port *source_port, - const struct dsw_queue_flow *qf) +dsw_port_flush_no_longer_paused_events(struct dsw_evdev *dsw, + struct dsw_port *source_port) { uint16_t paused_events_len = source_port->paused_events_len; struct rte_event paused_events[paused_events_len]; - uint8_t dest_port_id; uint16_t i; if (paused_events_len == 0) return; - if (dsw_port_is_flow_paused(source_port, qf->queue_id, qf->flow_hash)) - return; - rte_memcpy(paused_events, source_port->paused_events, paused_events_len * sizeof(struct rte_event)); source_port->paused_events_len = 0; - dest_port_id = dsw_schedule(dsw, qf->queue_id, qf->flow_hash); - for (i = 0; i < paused_events_len; i++) { struct rte_event *event = &paused_events[i]; uint16_t flow_hash; flow_hash = dsw_flow_id_hash(event->flow_id); - if (event->queue_id == qf->queue_id && - flow_hash == qf->flow_hash) + if (dsw_port_is_flow_paused(source_port, event->queue_id, + flow_hash)) + dsw_port_buffer_paused(source_port, event); + else { + uint8_t dest_port_id; + + dest_port_id = dsw_schedule(dsw, event->queue_id, + flow_hash); + dsw_port_buffer_non_paused(dsw, source_port, dest_port_id, event); - else - dsw_port_buffer_paused(source_port, event); + } } } @@ -750,11 +769,6 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port, DSW_LOG_DP_PORT(DEBUG, port->id, "Migration completed for " "queue_id %d flow_hash %d.\n", queue_id, flow_hash); - - if (queue_schedule_type == RTE_SCHED_TYPE_ATOMIC) { - dsw_port_remove_paused_flow(port, qf); - dsw_port_flush_paused_events(dsw, port, qf); - } } finished = port->emigration_targets_len - left_qfs_len; @@ -821,11 +835,32 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, if (dsw->num_ports == 1) return; - if (seen_events_len < DSW_MAX_EVENTS_RECORDED) - return; - DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n"); + if (seen_events_len < DSW_MAX_EVENTS_RECORDED) { + DSW_LOG_DP_PORT(DEBUG, source_port->id, "Not enough events " + "are recorded to allow for a migration.\n"); + return; + } + + /* A flow migration cannot be initiated if there are paused + * events, since some/all of those events may be have been + * produced as a result of processing the flow(s) selected for + * migration. Moving such a flow would potentially introduced + * reordering, since processing the migrated flow on the + * receiving flow may commence before the to-be-enqueued-to + + * flows are unpaused, leading to paused events on the second + * port as well, destined for the same paused flow(s). When + * those flows are unpaused, the resulting events are + * delivered the owning port in an undefined order. + */ + if (source_port->paused_events_len > 0) { + DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are " + "events in the paus buffer.\n"); + return; + } + /* Randomize interval to avoid having all threads considering * emigration at the same in point in time, which might lead * to all choosing the same target port. @@ -921,9 +956,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, } static void -dsw_port_flush_paused_events(struct dsw_evdev *dsw, - struct dsw_port *source_port, - const struct dsw_queue_flow *qf); +dsw_port_flush_no_longer_paused_events(struct dsw_evdev *dsw, + struct dsw_port *source_port); static void dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port, @@ -948,62 +982,123 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port, if (dsw_schedule(dsw, qf->queue_id, qf->flow_hash) == port->id) port->immigrations++; + } + + dsw_port_flush_no_longer_paused_events(dsw, port); +} + +static void +dsw_port_buffer_in_buffer(struct dsw_port *port, + const struct rte_event *event) + +{ + RTE_ASSERT(port->in_buffer_start == 0); + + port->in_buffer[port->in_buffer_len] = *event; + port->in_buffer_len++; +} - dsw_port_flush_paused_events(dsw, port, qf); +static void +dsw_port_forward_emigrated_event(struct dsw_evdev *dsw, + struct dsw_port *source_port, + struct rte_event *event) +{ + uint16_t i; + + for (i = 0; i < source_port->emigration_targets_len; i++) { + struct dsw_queue_flow *qf = + &source_port->emigration_target_qfs[i]; + uint8_t dest_port_id = + source_port->emigration_target_port_ids[i]; + struct dsw_port *dest_port = &dsw->ports[dest_port_id]; + + if (event->queue_id == qf->queue_id && + dsw_flow_id_hash(event->flow_id) == qf->flow_hash) { + /* No need to care about bursting forwarded + * events (to the destination port's in_ring), + * since migration doesn't happen very often, + * and also the majority of the dequeued + * events will likely *not* be forwarded. + */ + while (rte_event_ring_enqueue_burst(dest_port->in_ring, + event, 1, + NULL) != 1) + rte_pause(); + return; + } } + + /* Event did not belong to the emigrated flows */ + dsw_port_buffer_in_buffer(source_port, event); +} + +static void +dsw_port_stash_migrating_event(struct dsw_port *port, + const struct rte_event *event) +{ + port->emigrating_events[port->emigrating_events_len] = *event; + port->emigrating_events_len++; } -#define FORWARD_BURST_SIZE (32) +#define DRAIN_DEQUEUE_BURST_SIZE (32) static void -dsw_port_forward_emigrated_flow(struct dsw_port *source_port, - struct rte_event_ring *dest_ring, - uint8_t queue_id, - uint16_t flow_hash) +dsw_port_drain_in_ring(struct dsw_port *source_port) { - uint16_t events_left; + uint16_t num_events; + uint16_t dequeued; /* Control ring message should been seen before the ring count * is read on the port's in_ring. */ rte_smp_rmb(); - events_left = rte_event_ring_count(source_port->in_ring); + num_events = rte_event_ring_count(source_port->in_ring); - while (events_left > 0) { - uint16_t in_burst_size = - RTE_MIN(FORWARD_BURST_SIZE, events_left); - struct rte_event in_burst[in_burst_size]; - uint16_t in_len; + for (dequeued = 0; dequeued < num_events; ) { + uint16_t burst_size = RTE_MIN(DRAIN_DEQUEUE_BURST_SIZE, + num_events - dequeued); + struct rte_event events[burst_size]; + uint16_t len; uint16_t i; - in_len = rte_event_ring_dequeue_burst(source_port->in_ring, - in_burst, - in_burst_size, NULL); - /* No need to care about bursting forwarded events (to - * the destination port's in_ring), since migration - * doesn't happen very often, and also the majority of - * the dequeued events will likely *not* be forwarded. - */ - for (i = 0; i < in_len; i++) { - struct rte_event *e = &in_burst[i]; - if (e->queue_id == queue_id && - dsw_flow_id_hash(e->flow_id) == flow_hash) { - while (rte_event_ring_enqueue_burst(dest_ring, - e, 1, - NULL) != 1) - rte_pause(); - } else { - uint16_t last_idx = source_port->in_buffer_len; - source_port->in_buffer[last_idx] = *e; - source_port->in_buffer_len++; - } + len = rte_event_ring_dequeue_burst(source_port->in_ring, + events, burst_size, + NULL); + + for (i = 0; i < len; i++) { + struct rte_event *event = &events[i]; + uint16_t flow_hash; + + flow_hash = dsw_flow_id_hash(event->flow_id); + + if (unlikely(dsw_port_is_flow_migrating(source_port, + event->queue_id, + flow_hash))) + dsw_port_stash_migrating_event(source_port, + event); + else + dsw_port_buffer_in_buffer(source_port, event); } - events_left -= in_len; + dequeued += len; } } +static void +dsw_port_forward_emigrated_flows(struct dsw_evdev *dsw, + struct dsw_port *source_port) +{ + uint16_t i; + + for (i = 0; i < source_port->emigrating_events_len; i++) { + struct rte_event *event = &source_port->emigrating_events[i]; + + dsw_port_forward_emigrated_event(dsw, source_port, event); + } + source_port->emigrating_events_len = 0; +} + static void dsw_port_move_emigrating_flows(struct dsw_evdev *dsw, struct dsw_port *source_port) @@ -1012,22 +1107,27 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw, dsw_port_flush_out_buffers(dsw, source_port); - rte_smp_wmb(); - for (i = 0; i < source_port->emigration_targets_len; i++) { struct dsw_queue_flow *qf = &source_port->emigration_target_qfs[i]; uint8_t dest_port_id = source_port->emigration_target_port_ids[i]; - struct dsw_port *dest_port = &dsw->ports[dest_port_id]; dsw->queues[qf->queue_id].flow_to_port_map[qf->flow_hash] = - dest_port_id; - - dsw_port_forward_emigrated_flow(source_port, dest_port->in_ring, - qf->queue_id, qf->flow_hash); + dest_port_id; } + rte_smp_wmb(); + + dsw_port_drain_in_ring(source_port); + dsw_port_forward_emigrated_flows(dsw, source_port); + + dsw_port_remove_paused_flows(source_port, + source_port->emigration_target_qfs, + source_port->emigration_targets_len); + + dsw_port_flush_no_longer_paused_events(dsw, source_port); + /* Flow table update and migration destination port's enqueues * must be seen before the control message. */ @@ -1048,9 +1148,7 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port) if (port->cfm_cnt == (dsw->num_ports-1)) { switch (port->migration_state) { case DSW_MIGRATION_STATE_PAUSING: - DSW_LOG_DP_PORT(DEBUG, port->id, "Going into forwarding " - "migration state.\n"); - port->migration_state = DSW_MIGRATION_STATE_FORWARDING; + dsw_port_move_emigrating_flows(dsw, port); break; case DSW_MIGRATION_STATE_UNPAUSING: dsw_port_end_emigration(dsw, port, @@ -1090,18 +1188,18 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port) static void dsw_port_note_op(struct dsw_port *port, uint16_t num_events) { - /* To pull the control ring reasonably often on busy ports, - * each dequeued/enqueued event is considered an 'op' too. - */ port->ops_since_bg_task += (num_events+1); } static void dsw_port_bg_process(struct dsw_evdev *dsw, struct dsw_port *port) { - if (unlikely(port->migration_state == DSW_MIGRATION_STATE_FORWARDING && - port->pending_releases == 0)) - dsw_port_move_emigrating_flows(dsw, port); + /* For simplicity (in the migration logic), avoid all + * background processing in case event processing is in + * progress. + */ + if (port->pending_releases > 0) + return; /* Polling the control ring is relatively inexpensive, and * polling it often helps bringing down migration latency, so @@ -1161,7 +1259,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port, uint16_t i; DSW_LOG_DP_PORT(DEBUG, source_port->id, "Attempting to enqueue %d " - "events to port %d.\n", events_len, source_port->id); + "events.\n", events_len); dsw_port_bg_process(dsw, source_port); @@ -1344,6 +1442,38 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events, return rte_event_ring_dequeue_burst(port->in_ring, events, num, NULL); } +static void +dsw_port_stash_migrating_events(struct dsw_port *port, + struct rte_event *events, uint16_t *num) +{ + uint16_t i; + + /* The assumption here - performance-wise - is that events + * belonging to migrating flows are relatively rare. + */ + for (i = 0; i < (*num); ) { + struct rte_event *event = &events[i]; + uint16_t flow_hash; + + flow_hash = dsw_flow_id_hash(event->flow_id); + + if (unlikely(dsw_port_is_flow_migrating(port, event->queue_id, + flow_hash))) { + uint16_t left; + + dsw_port_stash_migrating_event(port, event); + + (*num)--; + left = *num - i; + + if (left > 0) + memmove(event, event + 1, + left * sizeof(struct rte_event)); + } else + i++; + } +} + uint16_t dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, uint64_t wait __rte_unused) @@ -1361,6 +1491,11 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, dequeued = dsw_port_dequeue_burst(source_port, events, num); + if (unlikely(source_port->migration_state == + DSW_MIGRATION_STATE_PAUSING)) + dsw_port_stash_migrating_events(source_port, events, + &dequeued); + source_port->pending_releases = dequeued; dsw_port_load_record(source_port, dequeued); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.560230939 +0000 +++ 0018-event-dsw-fix-flow-migration.patch 2022-11-03 09:27:25.325421511 +0000 @@ -1 +1 @@ -From 70cb0278a4c52a857fb56cda2183e2ee3fa2633a Mon Sep 17 00:00:00 2001 +From c69260f49962d781417a0d17256d2386b46b4d3d Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 70cb0278a4c52a857fb56cda2183e2ee3fa2633a ] + @@ -42 +43,0 @@ -Cc: stable@dpdk.org @@ -51 +52 @@ -index c907c00c78..df7dcc5577 100644 +index 6513d35ee7..ceabf9557d 100644 @@ -54 +55 @@ -@@ -128,7 +128,6 @@ struct dsw_queue_flow { +@@ -126,7 +126,6 @@ struct dsw_queue_flow { @@ -62 +63 @@ -@@ -192,6 +191,13 @@ struct dsw_port { +@@ -190,6 +189,13 @@ struct dsw_port { @@ -77 +78 @@ -index 340561b4e6..9932caf2ee 100644 +index 8b81dc5c56..76c89056a1 100644 @@ -80 +81 @@ -@@ -238,6 +238,15 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id, +@@ -234,6 +234,15 @@ dsw_port_is_flow_paused(struct dsw_port *port, uint8_t queue_id, @@ -96 +97 @@ -@@ -272,9 +281,19 @@ dsw_port_remove_paused_flow(struct dsw_port *port, +@@ -268,9 +277,19 @@ dsw_port_remove_paused_flow(struct dsw_port *port, @@ -117 +118 @@ -@@ -285,7 +304,6 @@ dsw_port_remove_paused_flows(struct dsw_port *port, +@@ -281,7 +300,6 @@ dsw_port_remove_paused_flows(struct dsw_port *port, @@ -125 +126 @@ -@@ -440,14 +458,15 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id) +@@ -434,14 +452,15 @@ dsw_is_serving_port(struct dsw_evdev *dsw, uint8_t port_id, uint8_t queue_id) @@ -148 +149 @@ -@@ -472,7 +491,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, +@@ -466,7 +485,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, @@ -157 +158 @@ -@@ -494,7 +513,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, +@@ -488,7 +507,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, @@ -166 +167 @@ -@@ -502,7 +521,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, +@@ -496,7 +515,7 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, @@ -175 +176 @@ -@@ -528,8 +547,8 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw, +@@ -522,8 +541,8 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw, @@ -186 +187 @@ -@@ -609,6 +628,7 @@ dsw_port_buffer_paused(struct dsw_port *port, +@@ -603,6 +622,7 @@ dsw_port_buffer_paused(struct dsw_port *port, @@ -194 +195 @@ -@@ -680,40 +700,39 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port, +@@ -674,40 +694,39 @@ dsw_port_buffer_event(struct dsw_evdev *dsw, struct dsw_port *source_port, @@ -247 +248 @@ -@@ -756,11 +775,6 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port, +@@ -750,11 +769,6 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port, @@ -259 +260 @@ -@@ -827,11 +841,32 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, +@@ -821,11 +835,32 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, @@ -295 +296 @@ -@@ -928,9 +963,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, +@@ -921,9 +956,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw, @@ -307 +308 @@ -@@ -955,62 +989,123 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port, +@@ -948,62 +982,123 @@ dsw_port_handle_unpause_flows(struct dsw_evdev *dsw, struct dsw_port *port, @@ -466 +467 @@ -@@ -1019,22 +1114,27 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw, +@@ -1012,22 +1107,27 @@ dsw_port_move_emigrating_flows(struct dsw_evdev *dsw, @@ -501 +502 @@ -@@ -1055,9 +1155,7 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port) +@@ -1048,9 +1148,7 @@ dsw_port_handle_confirm(struct dsw_evdev *dsw, struct dsw_port *port) @@ -512 +513 @@ -@@ -1097,18 +1195,18 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port) +@@ -1090,18 +1188,18 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port) @@ -537 +538 @@ -@@ -1168,7 +1266,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port, +@@ -1161,7 +1259,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port, @@ -546 +547 @@ -@@ -1352,6 +1450,38 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events, +@@ -1344,6 +1442,38 @@ dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events, @@ -585 +586 @@ -@@ -1369,6 +1499,11 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, +@@ -1361,6 +1491,11 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'event/sw: fix device name in dump' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (16 preceding siblings ...) 2022-11-03 9:26 ` patch 'event/dsw: fix flow migration' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " luca.boccassi ` (80 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3fc6cab336aee0a250378802708ee52d81f8e3c4 Thanks. Luca Boccassi --- From 3fc6cab336aee0a250378802708ee52d81f8e3c4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Wed, 13 Jul 2022 11:24:50 -0700 Subject: [PATCH] event/sw: fix device name in dump [ upstream commit ec70113a60039411c57f02a814291cefcbc35099 ] The software eventdev PMD reports todo-fix-name as the device name. Fixes: c66baa68e453 ("event/sw: add dump function for easier debugging") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> --- drivers/event/sw/sw_evdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 54c7abbf93..baeb982794 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -625,8 +625,8 @@ sw_dump(struct rte_eventdev *dev, FILE *f) "Ordered", "Atomic", "Parallel", "Directed" }; uint32_t i; - fprintf(f, "EventDev %s: ports %d, qids %d\n", "todo-fix-name", - sw->port_count, sw->qid_count); + fprintf(f, "EventDev %s: ports %d, qids %d\n", + dev->data->name, sw->port_count, sw->qid_count); fprintf(f, "\trx %"PRIu64"\n\tdrop %"PRIu64"\n\ttx %"PRIu64"\n", sw->stats.rx_pkts, sw->stats.rx_dropped, sw->stats.tx_pkts); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.622185653 +0000 +++ 0019-event-sw-fix-device-name-in-dump.patch 2022-11-03 09:27:25.325421511 +0000 @@ -1 +1 @@ -From ec70113a60039411c57f02a814291cefcbc35099 Mon Sep 17 00:00:00 2001 +From 3fc6cab336aee0a250378802708ee52d81f8e3c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ec70113a60039411c57f02a814291cefcbc35099 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index ba4d3a1b39..b1d5efe274 100644 +index 54c7abbf93..baeb982794 100644 @@ -22 +23 @@ -@@ -623,8 +623,8 @@ sw_dump(struct rte_eventdev *dev, FILE *f) +@@ -625,8 +625,8 @@ sw_dump(struct rte_eventdev *dev, FILE *f) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eventdev/eth_tx: add spinlock for adapter start/stop' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (17 preceding siblings ...) 2022-11-03 9:26 ` patch 'event/sw: fix device name in dump' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'eventdev/eth_tx: fix adapter stop' " luca.boccassi ` (79 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2c193be289e8a2e7e65e2a85e42fe6168cdf54e7 Thanks. Luca Boccassi --- From 2c193be289e8a2e7e65e2a85e42fe6168cdf54e7 Mon Sep 17 00:00:00 2001 From: Naga Harish K S V <s.v.naga.harish.k@intel.com> Date: Mon, 25 Jul 2022 23:22:10 -0500 Subject: [PATCH] eventdev/eth_tx: add spinlock for adapter start/stop [ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ] Add spinlock protection for tx adapter stop and start APIs add null check for tx adapter service pointer in adapter start/stop APIs. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com> --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index f2b7d36657..c7048f8f36 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -44,7 +44,7 @@ #define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \ do { \ if (!txa_valid_id(id)) { \ - RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \ + RTE_EDEV_LOG_ERR("Invalid eth Tx adapter id = %d", id); \ return retval; \ } \ } while (0) @@ -468,10 +468,13 @@ txa_service_ctrl(uint8_t id, int start) struct txa_service_data *txa; txa = txa_service_id_to_data(id); - if (txa->service_id == TXA_INVALID_SERVICE_ID) + if (txa == NULL || txa->service_id == TXA_INVALID_SERVICE_ID) return 0; + rte_spinlock_lock(&txa->tx_lock); ret = rte_service_runstate_set(txa->service_id, start); + rte_spinlock_unlock(&txa->tx_lock); + if (ret == 0 && !start) { while (rte_service_may_be_active(txa->service_id)) rte_pause(); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.673656384 +0000 +++ 0020-eventdev-eth_tx-add-spinlock-for-adapter-start-stop.patch 2022-11-03 09:27:25.325421511 +0000 @@ -1 +1 @@ -From 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 Mon Sep 17 00:00:00 2001 +From 2c193be289e8a2e7e65e2a85e42fe6168cdf54e7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- @@ -18,5 +19,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index aaef352f5c..aa7713bfa1 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -50,7 +50,7 @@ +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index f2b7d36657..c7048f8f36 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -44,7 +44,7 @@ @@ -31 +32 @@ -@@ -502,10 +502,13 @@ txa_service_ctrl(uint8_t id, int start) +@@ -468,10 +468,13 @@ txa_service_ctrl(uint8_t id, int start) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eventdev/eth_tx: fix adapter stop' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (18 preceding siblings ...) 2022-11-03 9:26 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'test/ipsec: skip if no compatible device' " luca.boccassi ` (78 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/47e1c3c0e6b05ae3c0de3fd0f0cee3e9e3677d9b Thanks. Luca Boccassi --- From 47e1c3c0e6b05ae3c0de3fd0f0cee3e9e3677d9b Mon Sep 17 00:00:00 2001 From: Naga Harish K S V <s.v.naga.harish.k@intel.com> Date: Mon, 25 Jul 2022 23:22:11 -0500 Subject: [PATCH] eventdev/eth_tx: fix adapter stop [ upstream commit fbb9f7e215c3394681ab1292f421c4e5c4880392 ] adapter_stop function is stopping the adapter service using rte_service_runstate_set() API and waiting until rte_service_may_be_active() API returns stopped state in an infinite loop. This results in hang issues if application calls rte_service_lcore_stop() before adapter stop. Remove the state check after setting the service state which avoids running into hang issues. This also makes Tx adapter stop inline with remaining adapters. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com> --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index c7048f8f36..20470d8a58 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -475,10 +475,6 @@ txa_service_ctrl(uint8_t id, int start) ret = rte_service_runstate_set(txa->service_id, start); rte_spinlock_unlock(&txa->tx_lock); - if (ret == 0 && !start) { - while (rte_service_may_be_active(txa->service_id)) - rte_pause(); - } return ret; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.728058380 +0000 +++ 0021-eventdev-eth_tx-fix-adapter-stop.patch 2022-11-03 09:27:25.329421589 +0000 @@ -1 +1 @@ -From fbb9f7e215c3394681ab1292f421c4e5c4880392 Mon Sep 17 00:00:00 2001 +From 47e1c3c0e6b05ae3c0de3fd0f0cee3e9e3677d9b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fbb9f7e215c3394681ab1292f421c4e5c4880392 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 4 ---- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 4 ---- @@ -27,5 +28,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index aa7713bfa1..7e82fe030c 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -509,10 +509,6 @@ txa_service_ctrl(uint8_t id, int start) +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index c7048f8f36..20470d8a58 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -475,10 +475,6 @@ txa_service_ctrl(uint8_t id, int start) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/ipsec: skip if no compatible device' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (19 preceding siblings ...) 2022-11-03 9:26 ` patch 'eventdev/eth_tx: fix adapter stop' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " luca.boccassi ` (77 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Jeremy Spewock; +Cc: Owen Hilyard, Ruifeng Wang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f8cc9121cf3caffb625f6e028c9fd2690ccceb0f Thanks. Luca Boccassi --- From f8cc9121cf3caffb625f6e028c9fd2690ccceb0f Mon Sep 17 00:00:00 2001 From: Jeremy Spewock <jspewock@iol.unh.edu> Date: Tue, 12 Jul 2022 10:17:01 -0400 Subject: [PATCH] test/ipsec: skip if no compatible device [ upstream commit 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 ] ipsec_autotest is now skipped if no compatible crypto devices are found. Fixes issue where if at least one crypto device was found but no compatible crypto devices for the ipsec_autotest test case are present, the case would fail with no error message. Now, when this situation is encountered, the test case will be skipped with an explanation. Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup") Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> --- app/test/test_ipsec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index 39531ff667..6c0f880765 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -310,8 +310,10 @@ testsuite_setup(void) } } - if (ts_params->valid_dev_found == 0) - return TEST_FAILED; + if (ts_params->valid_dev_found == 0) { + RTE_LOG(WARNING, USER1, "No compatible crypto device found.\n"); + return TEST_SKIPPED; + } ts_params->mbuf_pool = rte_pktmbuf_pool_create( "CRYPTO_MBUFPOOL", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.780085657 +0000 +++ 0022-test-ipsec-skip-if-no-compatible-device.patch 2022-11-03 09:27:25.333421666 +0000 @@ -1 +1 @@ -From 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 Mon Sep 17 00:00:00 2001 +From f8cc9121cf3caffb625f6e028c9fd2690ccceb0f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 37edccf8f79d7a8d0cbb00907a93ec9b9f476ed3 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 7047e17960..7c03a06785 100644 +index 39531ff667..6c0f880765 100644 @@ -27 +28 @@ -@@ -320,8 +320,10 @@ testsuite_setup(void) +@@ -310,8 +310,10 @@ testsuite_setup(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (20 preceding siblings ...) 2022-11-03 9:26 ` patch 'test/ipsec: skip if no compatible device' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'test/crypto: fix debug messages' " luca.boccassi ` (76 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5f5d17a1149855eee2b8145e3f18bac976d13207 Thanks. Luca Boccassi --- From 5f5d17a1149855eee2b8145e3f18bac976d13207 Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram <ndabilpuram@marvell.com> Date: Thu, 21 Jul 2022 21:01:31 +0530 Subject: [PATCH] examples/ipsec-secgw: use Tx checksum offload conditionally [ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ] Use Tx checksum offload only when all the ports have it enabled as the qconf for a particular lcore stores ipv4_offloads for all the Tx ports and each lcore can Tx to any port. Fixes: 03128be4cd4d ("examples/ipsec-secgw: allow disabling some Rx/Tx offloads") Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com> --- examples/ipsec-secgw/ipsec-secgw.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 091f54f065..c2fb95f890 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -2262,12 +2262,6 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) qconf = &lcore_conf[lcore_id]; qconf->tx_queue_id[portid] = tx_queueid; - /* Pre-populate pkt offloads based on capabilities */ - qconf->outbound.ipv4_offloads = PKT_TX_IPV4; - qconf->outbound.ipv6_offloads = PKT_TX_IPV6; - if (local_port_conf.txmode.offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) - qconf->outbound.ipv4_offloads |= PKT_TX_IP_CKSUM; - tx_queueid++; /* init RX queues */ @@ -2807,6 +2801,7 @@ main(int32_t argc, char **argv) uint64_t req_rx_offloads[RTE_MAX_ETHPORTS]; uint64_t req_tx_offloads[RTE_MAX_ETHPORTS]; struct eh_conf *eh_conf = NULL; + uint32_t ipv4_cksum_port_mask = 0; size_t sess_sz; nb_bufs_in_pool = 0; @@ -2912,6 +2907,20 @@ main(int32_t argc, char **argv) &req_tx_offloads[portid]); port_init(portid, req_rx_offloads[portid], req_tx_offloads[portid]); + if ((req_tx_offloads[portid] & DEV_TX_OFFLOAD_IPV4_CKSUM)) + ipv4_cksum_port_mask = 1U << portid; + } + + for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { + if (rte_lcore_is_enabled(lcore_id) == 0) + continue; + + /* Pre-populate pkt offloads based on capabilities */ + lcore_conf[lcore_id].outbound.ipv4_offloads = PKT_TX_IPV4; + lcore_conf[lcore_id].outbound.ipv6_offloads = PKT_TX_IPV6; + /* Update per lcore checksum offload support only if all ports support it */ + if (ipv4_cksum_port_mask == enabled_port_mask) + lcore_conf[lcore_id].outbound.ipv4_offloads |= PKT_TX_IP_CKSUM; } /* -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.832335511 +0000 +++ 0023-examples-ipsec-secgw-use-Tx-checksum-offload-conditi.patch 2022-11-03 09:27:25.337421744 +0000 @@ -1 +1 @@ -From 4edcee19fc20be7c28da3e06e3be5e8567162f01 Mon Sep 17 00:00:00 2001 +From 5f5d17a1149855eee2b8145e3f18bac976d13207 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4edcee19fc20be7c28da3e06e3be5e8567162f01 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 815b9254ae..8a25b83535 100644 +index 091f54f065..c2fb95f890 100644 @@ -23 +24 @@ -@@ -1998,12 +1998,6 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) +@@ -2262,12 +2262,6 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads) @@ -28,4 +29,4 @@ -- qconf->outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4; -- qconf->outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6; -- if (local_port_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM) -- qconf->outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM; +- qconf->outbound.ipv4_offloads = PKT_TX_IPV4; +- qconf->outbound.ipv6_offloads = PKT_TX_IPV6; +- if (local_port_conf.txmode.offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) +- qconf->outbound.ipv4_offloads |= PKT_TX_IP_CKSUM; @@ -36 +37 @@ -@@ -2925,6 +2919,7 @@ main(int32_t argc, char **argv) +@@ -2807,6 +2801,7 @@ main(int32_t argc, char **argv) @@ -44 +45 @@ -@@ -3046,6 +3041,20 @@ main(int32_t argc, char **argv) +@@ -2912,6 +2907,20 @@ main(int32_t argc, char **argv) @@ -48 +49 @@ -+ if ((req_tx_offloads[portid] & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)) ++ if ((req_tx_offloads[portid] & DEV_TX_OFFLOAD_IPV4_CKSUM)) @@ -57,2 +58,2 @@ -+ lcore_conf[lcore_id].outbound.ipv4_offloads = RTE_MBUF_F_TX_IPV4; -+ lcore_conf[lcore_id].outbound.ipv6_offloads = RTE_MBUF_F_TX_IPV6; ++ lcore_conf[lcore_id].outbound.ipv4_offloads = PKT_TX_IPV4; ++ lcore_conf[lcore_id].outbound.ipv6_offloads = PKT_TX_IPV6; @@ -61 +62 @@ -+ lcore_conf[lcore_id].outbound.ipv4_offloads |= RTE_MBUF_F_TX_IP_CKSUM; ++ lcore_conf[lcore_id].outbound.ipv4_offloads |= PKT_TX_IP_CKSUM; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/crypto: fix debug messages' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (21 preceding siblings ...) 2022-11-03 9:26 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'test/ipsec: fix build with GCC 12' " luca.boccassi ` (75 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Sunyang Wu; +Cc: Joey Xing, Qingmin Liu, Lei Cai, Akhil Goyal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ca71ce42820c9e0d8b6d56459069689508862cba Thanks. Luca Boccassi --- From ca71ce42820c9e0d8b6d56459069689508862cba Mon Sep 17 00:00:00 2001 From: Sunyang Wu <sunyang.wu@jaguarmicro.com> Date: Tue, 26 Jul 2022 11:38:19 +0800 Subject: [PATCH] test/crypto: fix debug messages [ upstream commit 1c6b77de0aa97072372fa80891c93063ec132c1a ] When the queue_ops_rsa_enc_dec function is called, the plaintext will be printed twice instead of both plaintext and ciphertext. When the create_aead_operation function is called, the contents of iv and aad will be printed incorrectly. This patch fixes the issues above. Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests") Fixes: 5ae36995f10f ("test/crypto: move RSA enqueue/dequeue into functions") Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com> Reviewed-by: Joey Xing <joey.xing@jaguarmicro.com> Reviewed-by: Qingmin Liu <qingmin.liu@jaguarmicro.com> Reviewed-by: Lei Cai <lei.cai@jaguarmicro.com> Acked-by: Akhil Goyal <gakhil@marvell.com> --- app/test/test_cryptodev.c | 4 ++-- app/test/test_cryptodev_asym.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index a87e5583ac..9dfea535a0 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -7535,7 +7535,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, rte_pktmbuf_iova(ut_params->ibuf); /* Copy AAD 18 bytes after the AAD pointer, according to the API */ memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len); - debug_hexdump(stdout, "aad:", sym_op->aead.aad.data, + debug_hexdump(stdout, "aad:", sym_op->aead.aad.data + 18, tdata->aad.len); /* Append IV at the end of the crypto operation*/ @@ -7544,7 +7544,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, /* Copy IV 1 byte after the IV pointer, according to the API */ rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len); - debug_hexdump(stdout, "iv:", iv_ptr, + debug_hexdump(stdout, "iv:", iv_ptr + 1, tdata->iv.len); } else { aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16); diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index af1310d9a2..dce9775d23 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -209,8 +209,8 @@ queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess) status = TEST_FAILED; goto error_exit; } - debug_hexdump(stdout, "encrypted message", asym_op->rsa.message.data, - asym_op->rsa.message.length); + debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data, + asym_op->rsa.cipher.length); /* Use the resulted output as decryption Input vector*/ asym_op = result_op->asym; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.889902074 +0000 +++ 0024-test-crypto-fix-debug-messages.patch 2022-11-03 09:27:25.357422131 +0000 @@ -1 +1 @@ -From 1c6b77de0aa97072372fa80891c93063ec132c1a Mon Sep 17 00:00:00 2001 +From ca71ce42820c9e0d8b6d56459069689508862cba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1c6b77de0aa97072372fa80891c93063ec132c1a ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 69a0301de0..54ce306b42 100644 +index a87e5583ac..9dfea535a0 100644 @@ -29 +30 @@ -@@ -8287,7 +8287,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, +@@ -7535,7 +7535,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, @@ -38 +39 @@ -@@ -8296,7 +8296,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, +@@ -7544,7 +7544,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, @@ -48 +49 @@ -index fc1a727472..9da54530e5 100644 +index af1310d9a2..dce9775d23 100644 @@ -51 +52 @@ -@@ -208,8 +208,8 @@ queue_ops_rsa_enc_dec(void *sess) +@@ -209,8 +209,8 @@ queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/ipsec: fix build with GCC 12' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (22 preceding siblings ...) 2022-11-03 9:26 ` patch 'test/crypto: fix debug messages' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'ipsec: " luca.boccassi ` (74 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Amit Prakash Shukla; +Cc: Akhil Goyal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1e5b9e57955980890b7a10a9aa001fa20531b9d8 Thanks. Luca Boccassi --- From 1e5b9e57955980890b7a10a9aa001fa20531b9d8 Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla <amitprakashs@marvell.com> Date: Thu, 4 Aug 2022 19:10:53 +0530 Subject: [PATCH] test/ipsec: fix build with GCC 12 [ upstream commit 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f ] GCC-12 raises following warning: In function '_mm_loadu_si128', inlined from 'rte_mov16' at ../lib/eal/x86/include/rte_memcpy.h:507:9, inlined from 'rte_mov128' at ../lib/eal/x86/include/rte_memcpy.h:549:2, inlined from 'rte_memcpy_generic' at ../lib/eal/x86/include/rte_memcpy.h:732:4, inlined from 'rte_memcpy' at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from 'setup_test_string_tunneled' at ../app/test/test_ipsec.c:617:3: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error: array subscript '__m128i_u[15]' is partly outside array bounds of 'const uint8_t[255]' {aka 'const unsigned char[255]'} [-Werror=array-bounds] 703 | return *__P; | ^~~~ ../app/test/test_ipsec.c: In function 'setup_test_string_tunneled': ../app/test/test_ipsec.c:491:22: note: at offset 240 into object 'esp_pad_bytes' of size 255 491 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = { This patch restrict the copy to minimum size. Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test") Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com> --- app/test/test_ipsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index 6c0f880765..090aed7fd2 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -619,7 +619,8 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, rte_memcpy(dst, string, len); dst += len; /* copy pad bytes */ - rte_memcpy(dst, esp_pad_bytes, padlen); + rte_memcpy(dst, esp_pad_bytes, RTE_MIN(padlen, + sizeof(esp_pad_bytes))); dst += padlen; /* copy ESP tail header */ rte_memcpy(dst, &espt, sizeof(espt)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:26.959476095 +0000 +++ 0025-test-ipsec-fix-build-with-GCC-12.patch 2022-11-03 09:27:25.361422208 +0000 @@ -1 +1 @@ -From 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f Mon Sep 17 00:00:00 2001 +From 1e5b9e57955980890b7a10a9aa001fa20531b9d8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 250cbb8d5dd2ffcb4c8a871332f9ec8e5a59242f ] + @@ -33 +34,0 @@ -Cc: stable@dpdk.org @@ -42 +43 @@ -index 7c03a06785..aa533483fd 100644 +index 6c0f880765..090aed7fd2 100644 @@ -45 +46 @@ -@@ -629,7 +629,8 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, +@@ -619,7 +619,8 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'ipsec: fix build with GCC 12' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (23 preceding siblings ...) 2022-11-03 9:26 ` patch 'test/ipsec: fix build with GCC 12' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'crypto/qat: " luca.boccassi ` (73 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Amit Prakash Shukla; +Cc: Konstantin Ananyev, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/eb01aeac7081ff4b6af0c5b397d11803fa0ffa78 Thanks. Luca Boccassi --- From eb01aeac7081ff4b6af0c5b397d11803fa0ffa78 Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla <amitprakashs@marvell.com> Date: Thu, 4 Aug 2022 19:10:54 +0530 Subject: [PATCH] ipsec: fix build with GCC 12 [ upstream commit 2be383423e433b5d42324cb450589b46d057c2ed ] GCC 12 raises the following warning: In function '_mm_loadu_si128', inlined from 'rte_mov16' at ../lib/eal/x86/include/rte_memcpy.h:507:9, inlined from 'rte_mov128' at ../lib/eal/x86/include/rte_memcpy.h:549:2, inlined from 'rte_memcpy_generic' at ../lib/eal/x86/include/rte_memcpy.h:732:4, inlined from 'rte_memcpy' at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from 'outb_tun_pkt_prepare' at ../lib/ipsec/esp_outb.c:224:2: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:703:10: error: array subscript '__m128i_u[15]' is partly outside array bounds of 'const uint8_t[255]' {aka 'const unsigned char[255]'} [-Werror=array-bounds] 703 | return *__P; | ^~~~ In file included from ../lib/ipsec/esp_outb.c:17: ../lib/ipsec/pad.h: In function 'outb_tun_pkt_prepare': ../lib/ipsec/pad.h:10:22: note: at offset 240 into object 'esp_pad_bytes' of size 255 10 | static const uint8_t esp_pad_bytes[IPSEC_MAX_PAD_SIZE] = { | ^~~~~~~~~~~~~ This patch restrict copy to minimum size. Bugzilla ID: 1060 Fixes: 6015e6a13398 ("ipsec: move inbound and outbound code") Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru> --- lib/librte_ipsec/esp_outb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c index 0bf3cd6bd4..d2c15aeb43 100644 --- a/lib/librte_ipsec/esp_outb.c +++ b/lib/librte_ipsec/esp_outb.c @@ -172,8 +172,10 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, /* pad length */ pdlen -= sizeof(*espt); + RTE_ASSERT(pdlen <= sizeof(esp_pad_bytes)); + /* copy padding data */ - rte_memcpy(pt, esp_pad_bytes, pdlen); + rte_memcpy(pt, esp_pad_bytes, RTE_MIN(pdlen, sizeof(esp_pad_bytes))); /* update esp trailer */ espt = (struct rte_esp_tail *)(pt + pdlen); @@ -339,8 +341,10 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, /* pad length */ pdlen -= sizeof(*espt); + RTE_ASSERT(pdlen <= sizeof(esp_pad_bytes)); + /* copy padding data */ - rte_memcpy(pt, esp_pad_bytes, pdlen); + rte_memcpy(pt, esp_pad_bytes, RTE_MIN(pdlen, sizeof(esp_pad_bytes))); /* update esp trailer */ espt = (struct rte_esp_tail *)(pt + pdlen); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.017183991 +0000 +++ 0026-ipsec-fix-build-with-GCC-12.patch 2022-11-03 09:27:25.361422208 +0000 @@ -1 +1 @@ -From 2be383423e433b5d42324cb450589b46d057c2ed Mon Sep 17 00:00:00 2001 +From eb01aeac7081ff4b6af0c5b397d11803fa0ffa78 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2be383423e433b5d42324cb450589b46d057c2ed ] + @@ -36 +37,0 @@ -Cc: stable@dpdk.org @@ -41 +42 @@ - lib/ipsec/esp_outb.c | 8 ++++++-- + lib/librte_ipsec/esp_outb.c | 8 ++++++-- @@ -44,5 +45,5 @@ -diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c -index 5a5429a12b..9cbd9202f6 100644 ---- a/lib/ipsec/esp_outb.c -+++ b/lib/ipsec/esp_outb.c -@@ -219,8 +219,10 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, +diff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c +index 0bf3cd6bd4..d2c15aeb43 100644 +--- a/lib/librte_ipsec/esp_outb.c ++++ b/lib/librte_ipsec/esp_outb.c +@@ -172,8 +172,10 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, @@ -60 +61 @@ -@@ -416,8 +418,10 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, +@@ -339,8 +341,10 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'crypto/qat: fix build with GCC 12' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (24 preceding siblings ...) 2022-11-03 9:26 ` patch 'ipsec: " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'eventdev: fix name of Rx conf type in documentation' " luca.boccassi ` (72 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Amit Prakash Shukla; +Cc: Fan Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7c0fda8b301b286f25a9ff539ee476940dba7c5b Thanks. Luca Boccassi --- From 7c0fda8b301b286f25a9ff539ee476940dba7c5b Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla <amitprakashs@marvell.com> Date: Thu, 4 Aug 2022 19:10:55 +0530 Subject: [PATCH] crypto/qat: fix build with GCC 12 [ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ] GCC 12 raises the following warning: In function '_mm_storeu_si128', inlined from 'rte_mov16' at ../lib/eal/x86/include/rte_memcpy.h:508:2, inlined from 'rte_mov128' at ../lib/eal/x86/include/rte_memcpy.h:542:2, inlined from 'rte_memcpy_generic' at ../lib/eal/x86/include/rte_memcpy.h:732:4, inlined from 'rte_memcpy' at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from 'qat_sym_do_precomputes.constprop' at ../drivers/crypto/qat/qat_sym_session.c:1434:2: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:739:8: error: array subscript 8 is outside array bounds of 'unsigned char[128]' [-Werror=array-bounds] 739 | *__P = __B; | ~~~~~^~~~~ ../drivers/crypto/qat/qat_sym_session.c: In function 'qat_sym_do_precomputes.constprop': ../drivers/crypto/qat/qat_sym_session.c:1305:17: note: at offset 192 into object 'opad.750' of size 128 1305 | uint8_t opad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)]; | ^~~~ ../drivers/crypto/qat/qat_sym_session.c: In function 'qat_sym_do_precomputes.constprop': ../drivers/crypto/qat/qat_sym_session.c:1304:17: note: at offset 128 into object 'ipad.749' of size 128 1304 | uint8_t ipad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)]; | ^~~~ Added a check to prevent compiler warnings. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> --- drivers/crypto/qat/qat_sym_session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 2a9b2712f6..155d59d226 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1409,6 +1409,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, QAT_LOG(ERR, "invalid keylen %u", auth_keylen); return -EFAULT; } + + RTE_VERIFY(auth_keylen <= sizeof(ipad)); + RTE_VERIFY(auth_keylen <= sizeof(opad)); + rte_memcpy(ipad, auth_key, auth_keylen); rte_memcpy(opad, auth_key, auth_keylen); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.066624868 +0000 +++ 0027-crypto-qat-fix-build-with-GCC-12.patch 2022-11-03 09:27:25.365422286 +0000 @@ -1 +1 @@ -From 04361fe2aca8998ea06fb4823dceb965698e147c Mon Sep 17 00:00:00 2001 +From 7c0fda8b301b286f25a9ff539ee476940dba7c5b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ] + @@ -44 +45,0 @@ -Cc: stable@dpdk.org @@ -53 +54 @@ -index e09d810354..52b3455cf0 100644 +index 2a9b2712f6..155d59d226 100644 @@ -56 +57 @@ -@@ -1651,6 +1651,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, +@@ -1409,6 +1409,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eventdev: fix name of Rx conf type in documentation' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (25 preceding siblings ...) 2022-11-03 9:26 ` patch 'crypto/qat: " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/i40e: fix VF representor release' " luca.boccassi ` (71 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Volodymyr Fialko; +Cc: Jay Jayatheerthan, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c356f7bbe8f76c57eeef94f264b0dd2c02cda6c5 Thanks. Luca Boccassi --- From c356f7bbe8f76c57eeef94f264b0dd2c02cda6c5 Mon Sep 17 00:00:00 2001 From: Volodymyr Fialko <vfialko@marvell.com> Date: Mon, 26 Sep 2022 13:58:11 +0200 Subject: [PATCH] eventdev: fix name of Rx conf type in documentation [ upstream commit 4f3c773825d262960b2622d509dbcb263dfa82d2 ] Rename configuration structure type to correspond definition. Fixes: dcc806c2638 ("eventdev: add eth Rx adapter API") Signed-off-by: Volodymyr Fialko <vfialko@marvell.com> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com> --- lib/librte_eventdev/rte_event_eth_rx_adapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h index 21bb1e54c8..d3624cc515 100644 --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h @@ -332,7 +332,7 @@ int rte_event_eth_rx_adapter_free(uint8_t id); * @see RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ * * @param conf - * Additional configuration structure of type *rte_event_eth_rx_adapter_conf* + * Additional configuration structure of type *rte_event_eth_rx_adapter_queue_conf* * * @return * - 0: Success, Receive queue added correctly. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.130358256 +0000 +++ 0028-eventdev-fix-name-of-Rx-conf-type-in-documentation.patch 2022-11-03 09:27:25.365422286 +0000 @@ -1 +1 @@ -From 4f3c773825d262960b2622d509dbcb263dfa82d2 Mon Sep 17 00:00:00 2001 +From c356f7bbe8f76c57eeef94f264b0dd2c02cda6c5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4f3c773825d262960b2622d509dbcb263dfa82d2 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - lib/eventdev/rte_event_eth_rx_adapter.h | 2 +- + lib/librte_eventdev/rte_event_eth_rx_adapter.h | 2 +- @@ -17,5 +18,5 @@ -diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h -index a3313c8d32..a9fdeb7b45 100644 ---- a/lib/eventdev/rte_event_eth_rx_adapter.h -+++ b/lib/eventdev/rte_event_eth_rx_adapter.h -@@ -458,7 +458,7 @@ int rte_event_eth_rx_adapter_free(uint8_t id); +diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h +index 21bb1e54c8..d3624cc515 100644 +--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h ++++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h +@@ -332,7 +332,7 @@ int rte_event_eth_rx_adapter_free(uint8_t id); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/i40e: fix VF representor release' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (26 preceding siblings ...) 2022-11-03 9:26 ` patch 'eventdev: fix name of Rx conf type in documentation' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/ice: fix RSS hash update' " luca.boccassi ` (70 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Ke Zhang; +Cc: Yuying Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2727671dc9f52bce9c4f70eabd7787073dafcbca Thanks. Luca Boccassi --- From 2727671dc9f52bce9c4f70eabd7787073dafcbca Mon Sep 17 00:00:00 2001 From: Ke Zhang <ke1x.zhang@intel.com> Date: Thu, 4 Aug 2022 17:50:03 +0800 Subject: [PATCH] net/i40e: fix VF representor release [ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ] A segmentation fault occurs when testpmd exit. This is due to fetching the device name from PF, PF is freed firstly and then VF representor is called later. This commit fixes the bug by fetching the device name from VF representor instead of PF. Fixes: e391a7b7f815 ("net/i40e: fix multi-process shared data") Signed-off-by: Ke Zhang <ke1x.zhang@intel.com> Acked-by: Yuying Zhang <yuying.zhang@intel.com> --- drivers/net/i40e/i40e_vf_representor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 5daa7ddcfd..4f59d80ac3 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -29,8 +29,6 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, struct rte_eth_dev_info *dev_info) { struct i40e_vf_representor *representor = ethdev->data->dev_private; - struct rte_eth_dev_data *pf_dev_data = - representor->adapter->pf.dev_data; /* get dev info for the vdev */ dev_info->device = ethdev->device; @@ -102,7 +100,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, }; dev_info->switch_info.name = - rte_eth_devices[pf_dev_data->port_id].device->name; + rte_eth_devices[ethdev->data->port_id].device->name; dev_info->switch_info.domain_id = representor->switch_domain_id; dev_info->switch_info.port_id = representor->vf_id; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.185455482 +0000 +++ 0029-net-i40e-fix-VF-representor-release.patch 2022-11-03 09:27:25.365422286 +0000 @@ -1 +1 @@ -From ba10df53e486ef7918c1236ef4d8da16ae3a32e1 Mon Sep 17 00:00:00 2001 +From 2727671dc9f52bce9c4f70eabd7787073dafcbca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ba10df53e486ef7918c1236ef4d8da16ae3a32e1 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index cc0f992453..c00ae832aa 100644 +index 5daa7ddcfd..4f59d80ac3 100644 @@ -37 +38 @@ -@@ -104,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, +@@ -102,7 +100,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice: fix RSS hash update' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (27 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/i40e: fix VF representor release' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/iavf: fix pattern check for flow director parser' " luca.boccassi ` (69 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Zhichao Zeng; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8d097567ef90b6d240614b9f664f173614528d02 Thanks. Luca Boccassi --- From 8d097567ef90b6d240614b9f664f173614528d02 Mon Sep 17 00:00:00 2001 From: Zhichao Zeng <zhichaox.zeng@intel.com> Date: Thu, 4 Aug 2022 17:32:32 +0800 Subject: [PATCH] net/ice: fix RSS hash update [ upstream commit 04887b812a9f57e79b5005a2ba26b04fed686173 ] This patch fixes the issue that the RSS does not update correctly when the user sets it to none. Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config") Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/ice_ethdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 3d46c727cc..8db05c998a 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -4427,10 +4427,8 @@ ice_rss_hash_update(struct rte_eth_dev *dev, if (status) return status; - if (rss_conf->rss_hf == 0) { + if (rss_conf->rss_hf == 0) pf->rss_hf = 0; - return 0; - } /* RSS hash configuration */ ice_rss_hash_set(pf, rss_conf->rss_hf); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.242256859 +0000 +++ 0030-net-ice-fix-RSS-hash-update.patch 2022-11-03 09:27:25.369422364 +0000 @@ -1 +1 @@ -From 04887b812a9f57e79b5005a2ba26b04fed686173 Mon Sep 17 00:00:00 2001 +From 8d097567ef90b6d240614b9f664f173614528d02 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 04887b812a9f57e79b5005a2ba26b04fed686173 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index e8304a1f2b..62bcc1d095 100644 +index 3d46c727cc..8db05c998a 100644 @@ -22 +23 @@ -@@ -4671,10 +4671,8 @@ ice_rss_hash_update(struct rte_eth_dev *dev, +@@ -4427,10 +4427,8 @@ ice_rss_hash_update(struct rte_eth_dev *dev, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: fix pattern check for flow director parser' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (28 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/ice: fix RSS hash update' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/iavf: fix Tx done descriptors cleanup' " luca.boccassi ` (68 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Steve Yang; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/565827b86ff1d49977bb5aa829d427989a3eaaa5 Thanks. Luca Boccassi --- From 565827b86ff1d49977bb5aa829d427989a3eaaa5 Mon Sep 17 00:00:00 2001 From: Steve Yang <stevex.yang@intel.com> Date: Wed, 10 Aug 2022 06:47:51 +0000 Subject: [PATCH] net/iavf: fix pattern check for flow director parser [ upstream commit e5c7498fae094e97a8e8831979a7112fa260bf92 ] FDIR rules with masks are not supported in current code. Thus add pattern check for IPv4/UDP/TCP/SCTP addr/port to terminate the FDIR programming stage. Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule") Signed-off-by: Steve Yang <stevex.yang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf_fdir.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index 01a3fc3f98..c16abb312f 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -571,6 +571,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, return -rte_errno; } + /* Mask for IPv4 src/dst addrs not supported */ + if (ipv4_mask->hdr.src_addr && + ipv4_mask->hdr.src_addr != UINT32_MAX) + return -rte_errno; + if (ipv4_mask->hdr.dst_addr && + ipv4_mask->hdr.dst_addr != UINT32_MAX) + return -rte_errno; + if (ipv4_mask->hdr.type_of_service == UINT8_MAX) { input_set |= IAVF_INSET_IPV4_TOS; @@ -670,6 +678,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, return -rte_errno; } + /* Mask for UDP src/dst ports not supported */ + if (udp_mask->hdr.src_port && + udp_mask->hdr.src_port != UINT16_MAX) + return -rte_errno; + if (udp_mask->hdr.dst_port && + udp_mask->hdr.dst_port != UINT16_MAX) + return -rte_errno; + if (udp_mask->hdr.src_port == UINT16_MAX) { input_set |= IAVF_INSET_UDP_SRC_PORT; VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, UDP, SRC_PORT); @@ -714,6 +730,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, return -rte_errno; } + /* Mask for TCP src/dst ports not supported */ + if (tcp_mask->hdr.src_port && + tcp_mask->hdr.src_port != UINT16_MAX) + return -rte_errno; + if (tcp_mask->hdr.dst_port && + tcp_mask->hdr.dst_port != UINT16_MAX) + return -rte_errno; + if (tcp_mask->hdr.src_port == UINT16_MAX) { input_set |= IAVF_INSET_TCP_SRC_PORT; VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, TCP, SRC_PORT); @@ -752,6 +776,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, return -rte_errno; } + /* Mask for SCTP src/dst ports not supported */ + if (sctp_mask->hdr.src_port && + sctp_mask->hdr.src_port != UINT16_MAX) + return -rte_errno; + if (sctp_mask->hdr.dst_port && + sctp_mask->hdr.dst_port != UINT16_MAX) + return -rte_errno; + if (sctp_mask->hdr.src_port == UINT16_MAX) { input_set |= IAVF_INSET_SCTP_SRC_PORT; VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, SCTP, SRC_PORT); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.298946540 +0000 +++ 0031-net-iavf-fix-pattern-check-for-flow-director-parser.patch 2022-11-03 09:27:25.373422441 +0000 @@ -1 +1 @@ -From e5c7498fae094e97a8e8831979a7112fa260bf92 Mon Sep 17 00:00:00 2001 +From 565827b86ff1d49977bb5aa829d427989a3eaaa5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e5c7498fae094e97a8e8831979a7112fa260bf92 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 2e6b3a9097..a397047fdb 100644 +index 01a3fc3f98..c16abb312f 100644 @@ -23,3 +24,3 @@ -@@ -932,6 +932,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, - return -rte_errno; - } +@@ -571,6 +571,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, + return -rte_errno; + } @@ -27,7 +28,7 @@ -+ /* Mask for IPv4 src/dst addrs not supported */ -+ if (ipv4_mask->hdr.src_addr && -+ ipv4_mask->hdr.src_addr != UINT32_MAX) -+ return -rte_errno; -+ if (ipv4_mask->hdr.dst_addr && -+ ipv4_mask->hdr.dst_addr != UINT32_MAX) -+ return -rte_errno; ++ /* Mask for IPv4 src/dst addrs not supported */ ++ if (ipv4_mask->hdr.src_addr && ++ ipv4_mask->hdr.src_addr != UINT32_MAX) ++ return -rte_errno; ++ if (ipv4_mask->hdr.dst_addr && ++ ipv4_mask->hdr.dst_addr != UINT32_MAX) ++ return -rte_errno; @@ -35,4 +36,4 @@ - if (ipv4_mask->hdr.type_of_service == - UINT8_MAX) { - input_set |= IAVF_INSET_IPV4_TOS; -@@ -1122,6 +1130,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, + if (ipv4_mask->hdr.type_of_service == + UINT8_MAX) { + input_set |= IAVF_INSET_IPV4_TOS; +@@ -670,6 +678,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, @@ -53 +54 @@ -@@ -1171,6 +1187,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, +@@ -714,6 +730,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, @@ -68 +69 @@ -@@ -1214,6 +1238,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, +@@ -752,6 +776,14 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: fix Tx done descriptors cleanup' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (29 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/iavf: fix pattern check for flow director parser' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/igc: remove unnecessary PHY ID checks' " luca.boccassi ` (67 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Aleksandr Miloshenko; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9833aa00aa15466ddbea8d47b88214d25080a302 Thanks. Luca Boccassi --- From 9833aa00aa15466ddbea8d47b88214d25080a302 Mon Sep 17 00:00:00 2001 From: Aleksandr Miloshenko <a.miloshenko@f5.com> Date: Mon, 29 Aug 2022 18:13:46 -0700 Subject: [PATCH] net/iavf: fix Tx done descriptors cleanup [ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ] iavf_xmit_pkts() sets tx_tail to the next of last transmitted Tx descriptor. So the cleanup of Tx done descriptors must be started from tx_tail, not from the next of tx_tail. Otherwise rte_eth_tx_done_cleanup() doesn't free the first Tx done mbuf when tx queue is full. Fixes: 86e44244f95c ("net/iavf: cleanup Tx buffers") Signed-off-by: Aleksandr Miloshenko <a.miloshenko@f5.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf_rxtx.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 7689d7fa46..f6049d8694 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2565,14 +2565,14 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, uint32_t free_cnt) { struct iavf_tx_entry *swr_ring = txq->sw_ring; - uint16_t i, tx_last, tx_id; + uint16_t tx_last, tx_id; uint16_t nb_tx_free_last; uint16_t nb_tx_to_clean; - uint32_t pkt_cnt; + uint32_t pkt_cnt = 0; - /* Start free mbuf from the next of tx_tail */ - tx_last = txq->tx_tail; - tx_id = swr_ring[tx_last].next_id; + /* Start free mbuf from tx_tail */ + tx_id = txq->tx_tail; + tx_last = tx_id; if (txq->nb_free == 0 && iavf_xmit_cleanup(txq)) return 0; @@ -2585,10 +2585,8 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, /* Loop through swr_ring to count the amount of * freeable mubfs and packets. */ - for (pkt_cnt = 0; pkt_cnt < free_cnt; ) { - for (i = 0; i < nb_tx_to_clean && - pkt_cnt < free_cnt && - tx_id != tx_last; i++) { + while (pkt_cnt < free_cnt) { + do { if (swr_ring[tx_id].mbuf != NULL) { rte_pktmbuf_free_seg(swr_ring[tx_id].mbuf); swr_ring[tx_id].mbuf = NULL; @@ -2601,7 +2599,7 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, } tx_id = swr_ring[tx_id].next_id; - } + } while (--nb_tx_to_clean && pkt_cnt < free_cnt && tx_id != tx_last); if (txq->rs_thresh > txq->nb_tx_desc - txq->nb_free || tx_id == tx_last) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.359864729 +0000 +++ 0032-net-iavf-fix-Tx-done-descriptors-cleanup.patch 2022-11-03 09:27:25.377422519 +0000 @@ -1 +1 @@ -From 4e868408bf213dc92ac270bc06ac466ed81a8505 Mon Sep 17 00:00:00 2001 +From 9833aa00aa15466ddbea8d47b88214d25080a302 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4e868408bf213dc92ac270bc06ac466ed81a8505 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index dfd021889e..3deabe1d7e 100644 +index 7689d7fa46..f6049d8694 100644 @@ -25 +26 @@ -@@ -3186,14 +3186,14 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, +@@ -2565,14 +2565,14 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, @@ -45 +46 @@ -@@ -3206,10 +3206,8 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, +@@ -2585,10 +2585,8 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, @@ -58 +59 @@ -@@ -3222,7 +3220,7 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, +@@ -2601,7 +2599,7 @@ iavf_tx_done_cleanup_full(struct iavf_tx_queue *txq, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/igc: remove unnecessary PHY ID checks' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (30 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/iavf: fix Tx done descriptors cleanup' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'common/iavf: avoid copy in async mode' " luca.boccassi ` (66 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Mah Yock Gen; +Cc: Taripin Samuel, Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/05e2b4507c90f452a03d20d022ebfb0750acea9a Thanks. Luca Boccassi --- From 05e2b4507c90f452a03d20d022ebfb0750acea9a Mon Sep 17 00:00:00 2001 From: Mah Yock Gen <yock.gen.mah@intel.com> Date: Fri, 2 Sep 2022 08:18:28 +0800 Subject: [PATCH] net/igc: remove unnecessary PHY ID checks [ upstream commit 4841015ffbe59b59e790559a04fc76ae8569e6f4 ] I225 devices have only one PHY vendor. There is unnecessary to check _I_PHY_ID during the link establishment and auto-negotiation process, the checking also caused devices like i225-IT failed. This patch is to remove the mentioned unnecessary checking. Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com> Signed-off-by: Taripin Samuel <samuel.taripin@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/igc/base/igc_i225.c | 14 ++------------ drivers/net/igc/base/igc_phy.c | 6 ++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c index 060b2f8f93..180d3cf687 100644 --- a/drivers/net/igc/base/igc_i225.c +++ b/drivers/net/igc/base/igc_i225.c @@ -173,18 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) phy->ops.write_reg = igc_write_phy_reg_gpy; ret_val = igc_get_phy_id(hw); - /* Verify phy id and set remaining function pointers */ - switch (phy->id) { - case I225_I_PHY_ID: - phy->type = igc_phy_i225; - phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225; - phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225; - /* TODO - complete with GPY PHY information */ - break; - default: - ret_val = -IGC_ERR_PHY; - goto out; - } + phy->type = igc_phy_i225; + out: return ret_val; diff --git a/drivers/net/igc/base/igc_phy.c b/drivers/net/igc/base/igc_phy.c index 43bbe69bca..2906bae21a 100644 --- a/drivers/net/igc/base/igc_phy.c +++ b/drivers/net/igc/base/igc_phy.c @@ -1474,8 +1474,7 @@ s32 igc_phy_setup_autoneg(struct igc_hw *hw) return ret_val; } - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && - hw->phy.id == I225_I_PHY_ID) { + if (phy->autoneg_mask & ADVERTISE_2500_FULL) { /* Read the MULTI GBT AN Control Register - reg 7.32 */ ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << MMD_DEVADDR_SHIFT) | @@ -1615,8 +1614,7 @@ s32 igc_phy_setup_autoneg(struct igc_hw *hw) ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && - hw->phy.id == I225_I_PHY_ID) + if (phy->autoneg_mask & ADVERTISE_2500_FULL) ret_val = phy->ops.write_reg(hw, (STANDARD_AN_REG_MASK << MMD_DEVADDR_SHIFT) | -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.416657721 +0000 +++ 0033-net-igc-remove-unnecessary-PHY-ID-checks.patch 2022-11-03 09:27:25.381422595 +0000 @@ -1 +1 @@ -From 4841015ffbe59b59e790559a04fc76ae8569e6f4 Mon Sep 17 00:00:00 2001 +From 05e2b4507c90f452a03d20d022ebfb0750acea9a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4841015ffbe59b59e790559a04fc76ae8569e6f4 ] + @@ -11,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -17 +17 @@ - drivers/net/igc/base/igc_i225.c | 15 ++------------- + drivers/net/igc/base/igc_i225.c | 14 ++------------ @@ -19 +19 @@ - 2 files changed, 4 insertions(+), 17 deletions(-) + 2 files changed, 4 insertions(+), 16 deletions(-) @@ -22 +22 @@ -index 5f3d535490..180d3cf687 100644 +index 060b2f8f93..180d3cf687 100644 @@ -25 +25 @@ -@@ -173,19 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) +@@ -173,18 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) @@ -32 +31,0 @@ -- case I226_LM_PHY_ID: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'common/iavf: avoid copy in async mode' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (31 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/igc: remove unnecessary PHY ID checks' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " luca.boccassi ` (65 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Steven Zou; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f21c69d6d985e2a3f391ec4a56f3407ef25199ee Thanks. Luca Boccassi --- From f21c69d6d985e2a3f391ec4a56f3407ef25199ee Mon Sep 17 00:00:00 2001 From: Steven Zou <steven.zou@intel.com> Date: Mon, 5 Sep 2022 09:42:06 +0800 Subject: [PATCH] common/iavf: avoid copy in async mode [ upstream commit c60fad56266fef1f5f6e08c062806e137713e9da ] If cmd_details are defined or async flag is set, don't copy the desc/buff back to temp. Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD") Signed-off-by: Steven Zou <steven.zou@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/common/iavf/iavf_adminq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c index 8d03de0553..c6c2feae59 100644 --- a/drivers/common/iavf/iavf_adminq.c +++ b/drivers/common/iavf/iavf_adminq.c @@ -788,7 +788,8 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, } /* if ready, copy the desc back to temp */ - if (iavf_asq_done(hw)) { + if (iavf_asq_done(hw) && + !details->async && !details->postpone) { iavf_memcpy(desc, desc_on_ring, sizeof(struct iavf_aq_desc), IAVF_DMA_TO_NONDMA); if (buff != NULL) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.486361350 +0000 +++ 0034-common-iavf-avoid-copy-in-async-mode.patch 2022-11-03 09:27:25.381422595 +0000 @@ -1 +1 @@ -From c60fad56266fef1f5f6e08c062806e137713e9da Mon Sep 17 00:00:00 2001 +From f21c69d6d985e2a3f391ec4a56f3407ef25199ee Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c60fad56266fef1f5f6e08c062806e137713e9da ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 8b305c0fe3..56c8a519be 100644 +index 8d03de0553..c6c2feae59 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice/base: fix media type of PHY 10G SFI C2C' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (32 preceding siblings ...) 2022-11-03 9:26 ` patch 'common/iavf: avoid copy in async mode' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix array overflow in add switch recipe' " luca.boccassi ` (64 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Qi Zhang; +Cc: Paul Greenwalt, Qiming Yang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9b74993d8dfa9bf6d218af524c948f953f8362ef Thanks. Luca Boccassi --- From 9b74993d8dfa9bf6d218af524c948f953f8362ef Mon Sep 17 00:00:00 2001 From: Qi Zhang <qi.z.zhang@intel.com> Date: Mon, 15 Aug 2022 03:31:15 -0400 Subject: [PATCH] net/ice/base: fix media type of PHY 10G SFI C2C [ upstream commit ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 ] PHY type ICE_PHY_TYPE_LOW_10G_SFI_C2C is incorrectly mapped to media type Fiber which results in ethtool reporting the wrong Supported ports. PHY type ICE_PHY_TYPE_LOW_10G_SFI_C2C should map to media type Backplane. Fixes: 453d087ccaff ("net/ice/base: add common functions") Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com> --- drivers/net/ice/base/ice_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 2b53f78512..43cc91b7c2 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -289,7 +289,6 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) case ICE_PHY_TYPE_LOW_1000BASE_LX: case ICE_PHY_TYPE_LOW_10GBASE_SR: case ICE_PHY_TYPE_LOW_10GBASE_LR: - case ICE_PHY_TYPE_LOW_10G_SFI_C2C: case ICE_PHY_TYPE_LOW_25GBASE_SR: case ICE_PHY_TYPE_LOW_25GBASE_LR: case ICE_PHY_TYPE_LOW_40GBASE_SR4: @@ -346,6 +345,7 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) case ICE_PHY_TYPE_LOW_2500BASE_X: case ICE_PHY_TYPE_LOW_5GBASE_KR: case ICE_PHY_TYPE_LOW_10GBASE_KR_CR1: + case ICE_PHY_TYPE_LOW_10G_SFI_C2C: case ICE_PHY_TYPE_LOW_25GBASE_KR: case ICE_PHY_TYPE_LOW_25GBASE_KR1: case ICE_PHY_TYPE_LOW_25GBASE_KR_S: -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.538238508 +0000 +++ 0035-net-ice-base-fix-media-type-of-PHY-10G-SFI-C2C.patch 2022-11-03 09:27:25.385422673 +0000 @@ -1 +1 @@ -From ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 Mon Sep 17 00:00:00 2001 +From 9b74993d8dfa9bf6d218af524c948f953f8362ef Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ef12579699a3b03bc1c66e05be0d1a73a6ae8ce9 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index cedce2dcf5..57602a31e1 100644 +index 2b53f78512..43cc91b7c2 100644 @@ -27 +28 @@ -@@ -561,7 +561,6 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) +@@ -289,7 +289,6 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) @@ -35 +36 @@ -@@ -618,6 +617,7 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) +@@ -346,6 +345,7 @@ static enum ice_media_type ice_get_media_type(struct ice_port_info *pi) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice/base: fix array overflow in add switch recipe' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (33 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix add MAC rule' " luca.boccassi ` (63 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Qi Zhang; +Cc: Jesse Brandeburg, Qiming Yang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f9988e1fd0d149e2277a122cb016ba0c3fbb01a8 Thanks. Luca Boccassi --- From f9988e1fd0d149e2277a122cb016ba0c3fbb01a8 Mon Sep 17 00:00:00 2001 From: Qi Zhang <qi.z.zhang@intel.com> Date: Mon, 15 Aug 2022 03:31:25 -0400 Subject: [PATCH] net/ice/base: fix array overflow in add switch recipe [ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ] The array indexes in this function are used with a zero index in the fv_idx table, and with a +1 index in the lkup_idx arrays. The code was using the lookup index for the field vector in only one place in this function, but the code was never used after this point so just remove the bad line. This was caught by the undefined behavior sanitizer. Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe") Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com> --- drivers/net/ice/base/ice_switch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index d7a8836293..f217035f33 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6625,7 +6625,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, last_chain_entry->chain_idx = ICE_INVAL_CHAIN_IND; LIST_FOR_EACH_ENTRY(entry, &rm->rg_list, ice_recp_grp_entry, l_entry) { - last_chain_entry->fv_idx[i] = entry->chain_idx; buf[recps].content.lkup_indx[i] = entry->chain_idx; buf[recps].content.mask[i++] = CPU_TO_LE16(0xFFFF); ice_set_bit(entry->rid, rm->r_bitmap); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.605008027 +0000 +++ 0036-net-ice-base-fix-array-overflow-in-add-switch-recipe.patch 2022-11-03 09:27:25.393422828 +0000 @@ -1 +1 @@ -From 289b2846c187aa061c13d6a499d0321f581390a5 Mon Sep 17 00:00:00 2001 +From f9988e1fd0d149e2277a122cb016ba0c3fbb01a8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index e59d191c46..b8e733f539 100644 +index d7a8836293..f217035f33 100644 @@ -28 +29 @@ -@@ -7315,7 +7315,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, +@@ -6625,7 +6625,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice/base: fix add MAC rule' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (34 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/ice/base: fix array overflow in add switch recipe' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: ignore promiscuous already exist' " luca.boccassi ` (62 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Qi Zhang; +Cc: Grzegorz Nitka, Qiming Yang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/912b5c27df08930df45776f3402df8ef8711fee4 Thanks. Luca Boccassi --- From 912b5c27df08930df45776f3402df8ef8711fee4 Mon Sep 17 00:00:00 2001 From: Qi Zhang <qi.z.zhang@intel.com> Date: Mon, 15 Aug 2022 03:31:32 -0400 Subject: [PATCH] net/ice/base: fix add MAC rule [ upstream commit 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab ] Fix ice_add_mac_rule function by not overriding action value with vsi id. It's possible to add MAC based switch filters with action other than FWD_TO_VSI. In current implementation fwd_id member of filter config structure was always overwritten with hw vsi index, regardless of action type. Fix it, by setting hw vsi index only for FWD_TO_VSI action filter and leave it as it is in case of other actions. Fixes: 3ee1b0159ee5 ("net/ice/base: support adding MAC rules on specific port") Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com> --- drivers/net/ice/base/ice_switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index f217035f33..c0de28ac58 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -4180,7 +4180,8 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list, if (!ice_is_vsi_valid(hw, vsi_handle)) return ICE_ERR_PARAM; hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); - m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id; + if (m_list_itr->fltr_info.fltr_act == ICE_FWD_TO_VSI) + m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id; /* update the src in case it is VSI num */ if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI) return ICE_ERR_PARAM; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.670450790 +0000 +++ 0037-net-ice-base-fix-add-MAC-rule.patch 2022-11-03 09:27:25.401422982 +0000 @@ -1 +1 @@ -From 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab Mon Sep 17 00:00:00 2001 +From 912b5c27df08930df45776f3402df8ef8711fee4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5dbc19cf438efceb7e7162fadbd7f462f1fed0ab ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 124b4fad1b..edcfa89bcb 100644 +index f217035f33..c0de28ac58 100644 @@ -29 +30 @@ -@@ -4858,7 +4858,8 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list, +@@ -4180,7 +4180,8 @@ ice_add_mac_rule(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice/base: ignore promiscuous already exist' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (35 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/ice/base: fix add MAC rule' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'net/virtio: fix crash when configured twice' " luca.boccassi ` (61 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Qi Zhang; +Cc: Grzegorz Siwik, Qiming Yang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ec69b0c7250c369ccefcaa2df400578b3828d5ea Thanks. Luca Boccassi --- From ec69b0c7250c369ccefcaa2df400578b3828d5ea Mon Sep 17 00:00:00 2001 From: Qi Zhang <qi.z.zhang@intel.com> Date: Mon, 15 Aug 2022 03:31:44 -0400 Subject: [PATCH] net/ice/base: ignore promiscuous already exist [ upstream commit 68834871b24d60c89029a43e20be1187673d0529 ] Ignore ERR_ALREADY_EXISTS error when setting promiscuous mode. This fix is needed because the driver could set promiscuous mode when it still has not cleared properly. Promiscuous mode could be set only once, so setting it second time will be rejected. Fixes: 60ff6f5ce2d8 ("net/ice/base: consolidate VF promiscuous mode") Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com> --- drivers/net/ice/base/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index c0de28ac58..16ddfc09c7 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5549,7 +5549,7 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, status = _ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vlan_id, lport, sw); - if (status) + if (status && status != ICE_ERR_ALREADY_EXISTS) break; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.739987988 +0000 +++ 0038-net-ice-base-ignore-promiscuous-already-exist.patch 2022-11-03 09:27:25.409423137 +0000 @@ -1 +1 @@ -From 68834871b24d60c89029a43e20be1187673d0529 Mon Sep 17 00:00:00 2001 +From ec69b0c7250c369ccefcaa2df400578b3828d5ea Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 68834871b24d60c89029a43e20be1187673d0529 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 6863696d9d..91a959e10f 100644 +index c0de28ac58..16ddfc09c7 100644 @@ -26 +27 @@ -@@ -6280,7 +6280,7 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, +@@ -5549,7 +5549,7 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/virtio: fix crash when configured twice' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (36 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/ice/base: ignore promiscuous already exist' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'examples/vhost: fix use after free' " luca.boccassi ` (60 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Alexander Chernavin; +Cc: Chenbo Xia, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/da94f7c81e620ef271a0458f6f8133102ce75760 Thanks. Luca Boccassi --- From da94f7c81e620ef271a0458f6f8133102ce75760 Mon Sep 17 00:00:00 2001 From: Alexander Chernavin <achernavin@netgate.com> Date: Tue, 27 Sep 2022 10:15:04 +0000 Subject: [PATCH] net/virtio: fix crash when configured twice [ upstream commit 52bd03e969e9b38a7357287aece2488c7f92158f ] When first attempt to configure a device with RX interrupt enabled fails for some reason (e.g. because "Multiple intr vector not supported"), second attempt to configure the device with RX interrupt disabled and feature set unchanged will succeed but will leave virtio queues not allocated. Accessing the queues will cause a segfault. First attempt: - virtio_dev_configure() - virtio_init_device() is called to reinit the device because "dev->data->dev_conf.intr_conf.rxq" is "1" - virtio_configure_intr() fails and returns an error - virtio_free_queues() frees previously allocated virtio queues - virtio_init_device() fails and returns an error - virtio_dev_configure() fails and returns an error Second attempt: - virtio_dev_configure() - This time virtio_init_device() is not called, virtio queues are not allocated With this fix, reinit the device during configuration if virtio queues are not allocated. Fixes: 2b38151f745a ("net/virtio: fix queue memory leak on error") Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> --- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 511735a6bf..ce612f7400 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -2356,6 +2356,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) return ret; } + /* if queues are not allocated, reinit the device */ + if (hw->vqs == NULL) { + ret = virtio_init_device(dev, hw->req_guest_features); + if (ret < 0) + return ret; + } + if ((rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM)) && !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.804086418 +0000 +++ 0039-net-virtio-fix-crash-when-configured-twice.patch 2022-11-03 09:27:25.413423215 +0000 @@ -1 +1 @@ -From 52bd03e969e9b38a7357287aece2488c7f92158f Mon Sep 17 00:00:00 2001 +From da94f7c81e620ef271a0458f6f8133102ce75760 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 52bd03e969e9b38a7357287aece2488c7f92158f ] + @@ -30 +31,0 @@ -Cc: stable@dpdk.org @@ -39 +40 @@ -index 7e07270a8b..574f671158 100644 +index 511735a6bf..ce612f7400 100644 @@ -42 +43 @@ -@@ -2617,6 +2617,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) +@@ -2356,6 +2356,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) @@ -53,3 +54,3 @@ - if ((rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) && - !virtio_with_feature(hw, VIRTIO_NET_F_RSS)) { - PMD_DRV_LOG(ERR, "RSS support requested but not supported by the device"); + if ((rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM | + DEV_RX_OFFLOAD_TCP_CKSUM)) && + !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/vhost: fix use after free' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (37 preceding siblings ...) 2022-11-03 9:26 ` patch 'net/virtio: fix crash when configured twice' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:26 ` patch 'eal/x86: add 256 bytes copy for AVX2' " luca.boccassi ` (59 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Wenwu Ma; +Cc: Wei Ling, Chenbo Xia, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cc65c7fccf4f361551ffa7526d61c3073fa04bbe Thanks. Luca Boccassi --- From cc65c7fccf4f361551ffa7526d61c3073fa04bbe Mon Sep 17 00:00:00 2001 From: Wenwu Ma <wenwux.ma@intel.com> Date: Thu, 14 Jul 2022 13:11:06 +0800 Subject: [PATCH] examples/vhost: fix use after free [ upstream commit 40abb903fe0aff0556d15d96385a4c7b647649b5 ] In async_enqueue_pkts(), the failed pkts will be freed before return, but, the failed pkts may be retried later, it will cause use after free. So, we free the failed pkts after retry. Fixes: 1907ce4baec3 ("examples/vhost: fix retry logic on Rx path") Signed-off-by: Wenwu Ma <wenwux.ma@intel.com> Tested-by: Wei Ling <weix.ling@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> --- examples/vhost/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 24e37f7ce5..b7ac9c2f15 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1163,8 +1163,13 @@ drain_eth_rx(struct vhost_dev *vdev) rte_atomic64_add(&vdev->stats.rx_atomic, enqueue_count); } - if (!async_vhost_driver) + if (!async_vhost_driver) { free_pkts(pkts, rx_count); + } else { + uint16_t enqueue_fail = rx_count - enqueue_count; + if (enqueue_fail > 0) + free_pkts(&pkts[enqueue_count], enqueue_fail); + } } static __rte_always_inline void -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.870280891 +0000 +++ 0040-examples-vhost-fix-use-after-free.patch 2022-11-03 09:27:25.413423215 +0000 @@ -1 +1 @@ -From 40abb903fe0aff0556d15d96385a4c7b647649b5 Mon Sep 17 00:00:00 2001 +From cc65c7fccf4f361551ffa7526d61c3073fa04bbe Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 40abb903fe0aff0556d15d96385a4c7b647649b5 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18,2 +19,2 @@ - examples/vhost/main.c | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) + examples/vhost/main.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) @@ -22 +23 @@ -index 0fa4753e70..195ef84b3b 100644 +index 24e37f7ce5..b7ac9c2f15 100644 @@ -25,35 +26,2 @@ -@@ -1075,8 +1075,13 @@ drain_vhost(struct vhost_dev *vdev) - __ATOMIC_SEQ_CST); - } - -- if (!dma_bind[vid2socketid[vdev->vid]].dmas[VIRTIO_RXQ].async_enabled) -+ if (!dma_bind[vid2socketid[vdev->vid]].dmas[VIRTIO_RXQ].async_enabled) { - free_pkts(m, nr_xmit); -+ } else { -+ uint16_t enqueue_fail = nr_xmit - ret; -+ if (enqueue_fail > 0) -+ free_pkts(&m[ret], enqueue_fail); -+ } - } - - static __rte_always_inline void -@@ -1352,17 +1357,12 @@ async_enqueue_pkts(struct vhost_dev *dev, uint16_t queue_id, - struct rte_mbuf **pkts, uint32_t rx_count) - { - uint16_t enqueue_count; -- uint16_t enqueue_fail = 0; - uint16_t dma_id = dma_bind[vid2socketid[dev->vid]].dmas[VIRTIO_RXQ].dev_id; - - complete_async_pkts(dev); - enqueue_count = rte_vhost_submit_enqueue_burst(dev->vid, queue_id, - pkts, rx_count, dma_id, 0); - -- enqueue_fail = rx_count - enqueue_count; -- if (enqueue_fail) -- free_pkts(&pkts[enqueue_count], enqueue_fail); -- - return enqueue_count; - } - -@@ -1407,8 +1407,13 @@ drain_eth_rx(struct vhost_dev *vdev) - __ATOMIC_SEQ_CST); +@@ -1163,8 +1163,13 @@ drain_eth_rx(struct vhost_dev *vdev) + rte_atomic64_add(&vdev->stats.rx_atomic, enqueue_count); @@ -62,2 +30,2 @@ -- if (!dma_bind[vid2socketid[vdev->vid]].dmas[VIRTIO_RXQ].async_enabled) -+ if (!dma_bind[vid2socketid[vdev->vid]].dmas[VIRTIO_RXQ].async_enabled) { +- if (!async_vhost_driver) ++ if (!async_vhost_driver) { @@ -72 +40 @@ - uint16_t async_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id, + static __rte_always_inline void ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eal/x86: add 256 bytes copy for AVX2' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (38 preceding siblings ...) 2022-11-03 9:26 ` patch 'examples/vhost: fix use after free' " luca.boccassi @ 2022-11-03 9:26 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " luca.boccassi ` (58 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:26 UTC (permalink / raw) To: Morten Brørup; +Cc: Bruce Richardson, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4e1e1d8e9c44fe86efe2dba3235cd72c7f1270f2 Thanks. Luca Boccassi --- From 4e1e1d8e9c44fe86efe2dba3235cd72c7f1270f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com> Date: Sat, 20 Aug 2022 12:30:32 +0200 Subject: [PATCH] eal/x86: add 256 bytes copy for AVX2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit a9cfccbb03a7cebfb8e3265af7fb7796198ac2e9 ] The rte_mov256 function was missing for AVX2. Fixes: 9144d6bcdefd ("eal/x86: optimize memcpy for SSE and AVX") Signed-off-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- lib/librte_eal/x86/include/rte_memcpy.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h index b678b5c942..d4d7a5cfc8 100644 --- a/lib/librte_eal/x86/include/rte_memcpy.h +++ b/lib/librte_eal/x86/include/rte_memcpy.h @@ -371,6 +371,23 @@ rte_mov128(uint8_t *dst, const uint8_t *src) rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32); } +/** + * Copy 256 bytes from one location to another, + * locations should not overlap. + */ +static __rte_always_inline void +rte_mov256(uint8_t *dst, const uint8_t *src) +{ + rte_mov32((uint8_t *)dst + 0 * 32, (const uint8_t *)src + 0 * 32); + rte_mov32((uint8_t *)dst + 1 * 32, (const uint8_t *)src + 1 * 32); + rte_mov32((uint8_t *)dst + 2 * 32, (const uint8_t *)src + 2 * 32); + rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32); + rte_mov32((uint8_t *)dst + 4 * 32, (const uint8_t *)src + 4 * 32); + rte_mov32((uint8_t *)dst + 5 * 32, (const uint8_t *)src + 5 * 32); + rte_mov32((uint8_t *)dst + 6 * 32, (const uint8_t *)src + 6 * 32); + rte_mov32((uint8_t *)dst + 7 * 32, (const uint8_t *)src + 7 * 32); +} + /** * Copy 128-byte blocks from one location to another, * locations should not overlap. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.924973626 +0000 +++ 0041-eal-x86-add-256-bytes-copy-for-AVX2.patch 2022-11-03 09:27:25.413423215 +0000 @@ -1 +1 @@ -From a9cfccbb03a7cebfb8e3265af7fb7796198ac2e9 Mon Sep 17 00:00:00 2001 +From 4e1e1d8e9c44fe86efe2dba3235cd72c7f1270f2 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit a9cfccbb03a7cebfb8e3265af7fb7796198ac2e9 ] + @@ -16 +18 @@ - lib/eal/x86/include/rte_memcpy.h | 17 +++++++++++++++++ + lib/librte_eal/x86/include/rte_memcpy.h | 17 +++++++++++++++++ @@ -19 +21 @@ -diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h +diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h @@ -21,2 +23,2 @@ ---- a/lib/eal/x86/include/rte_memcpy.h -+++ b/lib/eal/x86/include/rte_memcpy.h +--- a/lib/librte_eal/x86/include/rte_memcpy.h ++++ b/lib/librte_eal/x86/include/rte_memcpy.h ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx4: fix Verbs FD leak in secondary process' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (39 preceding siblings ...) 2022-11-03 9:26 ` patch 'eal/x86: add 256 bytes copy for AVX2' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: " luca.boccassi ` (57 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Long Li; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b0e08d7e8610334864a1269c2065eedfd96b7429 Thanks. Luca Boccassi --- From b0e08d7e8610334864a1269c2065eedfd96b7429 Mon Sep 17 00:00:00 2001 From: Long Li <longli@microsoft.com> Date: Wed, 6 Jul 2022 10:48:52 -0700 Subject: [PATCH] net/mlx4: fix Verbs FD leak in secondary process [ upstream commit ff9c3548c05b356753a4f53bc945c625263c1ee9 ] FDs passed from rte_mp_msg are duplicated to the secondary process and need to be closed. Fixes: 0203d33a10 ("net/mlx4: support secondary process") Signed-off-by: Long Li <longli@microsoft.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx4/mlx4.c | 9 ++++++--- drivers/net/mlx4/mlx4_mp.c | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index b35372ed64..a5e4205bcd 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -877,6 +877,8 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) snprintf(name, sizeof(name), "%s port %u", mlx4_glue->get_device_name(ibv_dev), port); if (rte_eal_process_type() == RTE_PROC_SECONDARY) { + int fd; + eth_dev = rte_eth_dev_attach_secondary(name); if (eth_dev == NULL) { ERROR("can not attach rte ethdev"); @@ -899,13 +901,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) if (err) goto err_secondary; /* Receive command fd from primary process. */ - err = mlx4_mp_req_verbs_cmd_fd(eth_dev); - if (err < 0) { + fd = mlx4_mp_req_verbs_cmd_fd(eth_dev); + if (fd < 0) { err = rte_errno; goto err_secondary; } /* Remap UAR for Tx queues. */ - err = mlx4_tx_uar_init_secondary(eth_dev, err); + err = mlx4_tx_uar_init_secondary(eth_dev, fd); + close(fd); if (err) { err = rte_errno; goto err_secondary; diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c index dd72755252..edc3067c60 100644 --- a/drivers/net/mlx4/mlx4_mp.c +++ b/drivers/net/mlx4/mlx4_mp.c @@ -5,6 +5,7 @@ #include <stdio.h> #include <time.h> +#include <unistd.h> #include <rte_eal.h> #include <rte_ethdev_driver.h> @@ -134,15 +135,19 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer) mlx4_tx_uar_uninit_secondary(dev); mlx4_proc_priv_uninit(dev); ret = mlx4_proc_priv_init(dev); - if (ret) + if (ret) { + close(mp_msg->fds[0]); return -rte_errno; + } ret = mlx4_tx_uar_init_secondary(dev, mp_msg->fds[0]); if (ret) { + close(mp_msg->fds[0]); mlx4_proc_priv_uninit(dev); return -rte_errno; } } #endif + close(mp_msg->fds[0]); rte_mb(); mp_init_msg(dev, &mp_res, param->type); res->result = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.983075885 +0000 +++ 0042-net-mlx4-fix-Verbs-FD-leak-in-secondary-process.patch 2022-11-03 09:27:25.417423292 +0000 @@ -1 +1 @@ -From ff9c3548c05b356753a4f53bc945c625263c1ee9 Mon Sep 17 00:00:00 2001 +From b0e08d7e8610334864a1269c2065eedfd96b7429 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ff9c3548c05b356753a4f53bc945c625263c1ee9 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 7e7e1824ef..a54016f4a2 100644 +index b35372ed64..a5e4205bcd 100644 @@ -51 +52 @@ -index 3282afceda..534cb31151 100644 +index dd72755252..edc3067c60 100644 @@ -54 +55,2 @@ -@@ -6,6 +6,7 @@ +@@ -5,6 +5,7 @@ + @@ -56 +57,0 @@ - #include <stdlib.h> @@ -61,2 +62,2 @@ - #include <ethdev_driver.h> -@@ -135,15 +136,19 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer) + #include <rte_ethdev_driver.h> +@@ -134,15 +135,19 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix Verbs FD leak in secondary process' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (40 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix check for orphan wait descriptor' " luca.boccassi ` (56 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Long Li; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/75888970cd5de90d9faec4fa978a8f3d36f18d8b Thanks. Luca Boccassi --- From 75888970cd5de90d9faec4fa978a8f3d36f18d8b Mon Sep 17 00:00:00 2001 From: Long Li <longli@microsoft.com> Date: Wed, 6 Jul 2022 10:48:53 -0700 Subject: [PATCH] net/mlx5: fix Verbs FD leak in secondary process [ upstream commit bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 ] FDs passed from rte_mp_msg are duplicated to the secondary process and need to be closed. Fixes: 9a8ab29b84 ("net/mlx5: replace IPC socket with EAL API") Signed-off-by: Long Li <longli@microsoft.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/linux/mlx5_mp_os.c | 6 +++++- drivers/net/mlx5/linux/mlx5_os.c | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c index 8567e43471..c7272b457b 100644 --- a/drivers/net/mlx5/linux/mlx5_mp_os.c +++ b/drivers/net/mlx5/linux/mlx5_mp_os.c @@ -138,14 +138,18 @@ struct rte_mp_msg mp_res; mlx5_tx_uar_uninit_secondary(dev); mlx5_proc_priv_uninit(dev); ret = mlx5_proc_priv_init(dev); - if (ret) + if (ret) { + close(mp_msg->fds[0]); return -rte_errno; + } ret = mlx5_tx_uar_init_secondary(dev, mp_msg->fds[0]); if (ret) { + close(mp_msg->fds[0]); mlx5_proc_priv_uninit(dev); return -rte_errno; } } + close(mp_msg->fds[0]); rte_mb(); mp_init_msg(&priv->mp_id, &mp_res, param->type); res->result = 0; diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 8bd717e6a9..af19b54b7e 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -813,6 +813,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, DRV_LOG(DEBUG, "naming Ethernet device \"%s\"", name); if (rte_eal_process_type() == RTE_PROC_SECONDARY) { struct mlx5_mp_id mp_id; + int fd; eth_dev = rte_eth_dev_attach_secondary(name); if (eth_dev == NULL) { @@ -836,11 +837,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, mp_id.port_id = eth_dev->data->port_id; strlcpy(mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN); /* Receive command fd from primary process */ - err = mlx5_mp_req_verbs_cmd_fd(&mp_id); - if (err < 0) + fd = mlx5_mp_req_verbs_cmd_fd(&mp_id); + if (fd < 0) goto err_secondary; /* Remap UAR for Tx queues. */ - err = mlx5_tx_uar_init_secondary(eth_dev, err); + err = mlx5_tx_uar_init_secondary(eth_dev, fd); + close(fd); if (err) goto err_secondary; /* -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.035569258 +0000 +++ 0043-net-mlx5-fix-Verbs-FD-leak-in-secondary-process.patch 2022-11-03 09:27:25.417423292 +0000 @@ -1 +1 @@ -From bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 Mon Sep 17 00:00:00 2001 +From 75888970cd5de90d9faec4fa978a8f3d36f18d8b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bc5d8fdb7008210e2698fa1f91e51d7dfba00f77 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index e607089e0e..f2e71c9bd4 100644 +index 8567e43471..c7272b457b 100644 @@ -23 +24 @@ -@@ -177,14 +177,18 @@ struct rte_mp_msg mp_res; +@@ -138,14 +138,18 @@ struct rte_mp_msg mp_res; @@ -44 +45 @@ -index 4f0a6f4d55..6e5f01dda0 100644 +index 8bd717e6a9..af19b54b7e 100644 @@ -47 +48 @@ -@@ -1080,6 +1080,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, +@@ -813,6 +813,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, @@ -55,3 +56,3 @@ -@@ -1096,11 +1097,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, - return NULL; - mlx5_mp_id_init(&mp_id, eth_dev->data->port_id); +@@ -836,11 +837,12 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, + mp_id.port_id = eth_dev->data->port_id; + strlcpy(mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix check for orphan wait descriptor' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (41 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix single not inline packet storing' " luca.boccassi ` (55 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Viacheslav Ovsiienko; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3cf97b1cd1c14f2cbf338aa479be32e7c7e5f13e Thanks. Luca Boccassi --- From 3cf97b1cd1c14f2cbf338aa479be32e7c7e5f13e Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Date: Thu, 11 Aug 2022 08:50:58 +0300 Subject: [PATCH] net/mlx5: fix check for orphan wait descriptor [ upstream commit 37d6fc30c1ad03485ef707140b67623b95498d0d ] The mlx5 PMD supports send scheduling feature, it allows to send packets at specified moment of time, to do that PMD pushes special wait descriptor (WQE) to the hardware queue and then pushes descriptor for packet data as usual. If queue is close to be full or there is no enough elts buffers to store mbufs being sent the data descriptors might be not pushed and the orphan wait WQE (not followed by the data) might reside in queue on tx_burst routine exit. To avoid orphan wait WQEs there was the check for enough free space in the queue WQE buffer and enough amount of the free elts in queue mbuf storage. This check was incomplete and did not cover all the cases for Enhanced Multi-Packet Write descriptors. Fixes: 2f827f5ea6e1 ("net/mlx5: support scheduling on send routine template") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_rxtx.c | 78 ++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 35 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index baacd7587a..b73ab06367 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -3152,6 +3152,9 @@ dseg_done: * Pointer to TX queue structure. * @param loc * Pointer to burst routine local context. + * @param elts + * Number of free elements in elts buffer to be checked, for zero + * value the check is optimized out by compiler. * @param olx * Configured Tx offloads mask. It is fully defined at * compile time and may be used for optimization. @@ -3165,6 +3168,7 @@ dseg_done: static __rte_always_inline enum mlx5_txcmp_code mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq, struct mlx5_txq_local *restrict loc, + uint16_t elts, unsigned int olx) { if (MLX5_TXOFF_CONFIG(TXPP) && @@ -3179,7 +3183,7 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq, * to the queue and we won't get the orphan WAIT WQE. */ if (loc->wqe_free <= MLX5_WQE_SIZE_MAX / MLX5_WQE_SIZE || - loc->elts_free < NB_SEGS(loc->mbuf)) + loc->elts_free < elts) return MLX5_TXCMP_CODE_EXIT; /* Convert the timestamp into completion to wait. */ ts = *RTE_MBUF_DYNFIELD(loc->mbuf, txq->ts_offset, uint64_t *); @@ -3226,11 +3230,12 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, struct mlx5_wqe *__rte_restrict wqe; unsigned int ds, dlen, inlen, ntcp, vlan = 0; + MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf)); if (MLX5_TXOFF_CONFIG(TXPP)) { enum mlx5_txcmp_code wret; /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); + wret = mlx5_tx_schedule_send(txq, loc, 0, olx); if (wret == MLX5_TXCMP_CODE_EXIT) return MLX5_TXCMP_CODE_EXIT; if (wret == MLX5_TXCMP_CODE_ERROR) @@ -3326,11 +3331,12 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, unsigned int ds, nseg; MLX5_ASSERT(NB_SEGS(loc->mbuf) > 1); + MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf)); if (MLX5_TXOFF_CONFIG(TXPP)) { enum mlx5_txcmp_code wret; /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); + wret = mlx5_tx_schedule_send(txq, loc, 0, olx); if (wret == MLX5_TXCMP_CODE_EXIT) return MLX5_TXCMP_CODE_EXIT; if (wret == MLX5_TXCMP_CODE_ERROR) @@ -3444,16 +3450,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, MLX5_ASSERT(MLX5_TXOFF_CONFIG(INLINE)); MLX5_ASSERT(NB_SEGS(loc->mbuf) > 1); - if (MLX5_TXOFF_CONFIG(TXPP)) { - enum mlx5_txcmp_code wret; - - /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); - if (wret == MLX5_TXCMP_CODE_EXIT) - return MLX5_TXCMP_CODE_EXIT; - if (wret == MLX5_TXCMP_CODE_ERROR) - return MLX5_TXCMP_CODE_ERROR; - } + MLX5_ASSERT(loc->elts_free >= NB_SEGS(loc->mbuf)); /* * First calculate data length to be inlined * to estimate the required space for WQE. @@ -3560,6 +3557,16 @@ do_align: * supposing no any mbufs is being freed during inlining. */ do_build: + if (MLX5_TXOFF_CONFIG(TXPP)) { + enum mlx5_txcmp_code wret; + + /* Generate WAIT for scheduling if requested. */ + wret = mlx5_tx_schedule_send(txq, loc, 0, olx); + if (wret == MLX5_TXCMP_CODE_EXIT) + return MLX5_TXCMP_CODE_EXIT; + if (wret == MLX5_TXCMP_CODE_ERROR) + return MLX5_TXCMP_CODE_ERROR; + } MLX5_ASSERT(inlen <= txq->inlen_send); ds = NB_SEGS(loc->mbuf) + 2 + (inlen - MLX5_ESEG_MIN_INLINE_SIZE + @@ -3723,7 +3730,7 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq, enum mlx5_txcmp_code wret; /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); + wret = mlx5_tx_schedule_send(txq, loc, 1, olx); if (wret == MLX5_TXCMP_CODE_EXIT) return MLX5_TXCMP_CODE_EXIT; if (wret == MLX5_TXCMP_CODE_ERROR) @@ -4109,16 +4116,6 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq, next_empw: MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1); - if (MLX5_TXOFF_CONFIG(TXPP)) { - enum mlx5_txcmp_code wret; - - /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); - if (wret == MLX5_TXCMP_CODE_EXIT) - return MLX5_TXCMP_CODE_EXIT; - if (wret == MLX5_TXCMP_CODE_ERROR) - return MLX5_TXCMP_CODE_ERROR; - } part = RTE_MIN(pkts_n, MLX5_TXOFF_CONFIG(MPW) ? MLX5_MPW_MAX_PACKETS : MLX5_EMPW_MAX_PACKETS); @@ -4129,6 +4126,16 @@ next_empw: /* But we still able to send at least minimal eMPW. */ part = loc->elts_free; } + if (MLX5_TXOFF_CONFIG(TXPP)) { + enum mlx5_txcmp_code wret; + + /* Generate WAIT for scheduling if requested. */ + wret = mlx5_tx_schedule_send(txq, loc, 0, olx); + if (wret == MLX5_TXCMP_CODE_EXIT) + return MLX5_TXCMP_CODE_EXIT; + if (wret == MLX5_TXCMP_CODE_ERROR) + return MLX5_TXCMP_CODE_ERROR; + } /* Check whether we have enough WQEs */ if (unlikely(loc->wqe_free < ((2 + part + 3) / 4))) { if (unlikely(loc->wqe_free < @@ -4285,16 +4292,6 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, unsigned int slen = 0; MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1); - if (MLX5_TXOFF_CONFIG(TXPP)) { - enum mlx5_txcmp_code wret; - - /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); - if (wret == MLX5_TXCMP_CODE_EXIT) - return MLX5_TXCMP_CODE_EXIT; - if (wret == MLX5_TXCMP_CODE_ERROR) - return MLX5_TXCMP_CODE_ERROR; - } /* * Limits the amount of packets in one WQE * to improve CQE latency generation. @@ -4302,6 +4299,16 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, nlim = RTE_MIN(pkts_n, MLX5_TXOFF_CONFIG(MPW) ? MLX5_MPW_INLINE_MAX_PACKETS : MLX5_EMPW_MAX_PACKETS); + if (MLX5_TXOFF_CONFIG(TXPP)) { + enum mlx5_txcmp_code wret; + + /* Generate WAIT for scheduling if requested. */ + wret = mlx5_tx_schedule_send(txq, loc, nlim, olx); + if (wret == MLX5_TXCMP_CODE_EXIT) + return MLX5_TXCMP_CODE_EXIT; + if (wret == MLX5_TXCMP_CODE_ERROR) + return MLX5_TXCMP_CODE_ERROR; + } /* Check whether we have minimal amount WQEs */ if (unlikely(loc->wqe_free < ((2 + MLX5_EMPW_MIN_PACKETS + 3) / 4))) @@ -4570,11 +4577,12 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq, enum mlx5_txcmp_code ret; MLX5_ASSERT(NB_SEGS(loc->mbuf) == 1); + MLX5_ASSERT(loc->elts_free); if (MLX5_TXOFF_CONFIG(TXPP)) { enum mlx5_txcmp_code wret; /* Generate WAIT for scheduling if requested. */ - wret = mlx5_tx_schedule_send(txq, loc, olx); + wret = mlx5_tx_schedule_send(txq, loc, 0, olx); if (wret == MLX5_TXCMP_CODE_EXIT) return MLX5_TXCMP_CODE_EXIT; if (wret == MLX5_TXCMP_CODE_ERROR) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.100378300 +0000 +++ 0044-net-mlx5-fix-check-for-orphan-wait-descriptor.patch 2022-11-03 09:27:25.421423370 +0000 @@ -1 +1 @@ -From 37d6fc30c1ad03485ef707140b67623b95498d0d Mon Sep 17 00:00:00 2001 +From 3cf97b1cd1c14f2cbf338aa479be32e7c7e5f13e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 37d6fc30c1ad03485ef707140b67623b95498d0d ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ - drivers/net/mlx5/mlx5_tx.h | 78 +++++++++++++++++++++----------------- + drivers/net/mlx5/mlx5_rxtx.c | 78 ++++++++++++++++++++---------------- @@ -29,5 +30,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index 20776919c2..f081921ffc 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -1642,6 +1642,9 @@ dseg_done: +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index baacd7587a..b73ab06367 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -3152,6 +3152,9 @@ dseg_done: @@ -43 +44 @@ -@@ -1655,6 +1658,7 @@ dseg_done: +@@ -3165,6 +3168,7 @@ dseg_done: @@ -51 +52 @@ -@@ -1669,7 +1673,7 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq, +@@ -3179,7 +3183,7 @@ mlx5_tx_schedule_send(struct mlx5_txq_data *restrict txq, @@ -60 +61 @@ -@@ -1735,11 +1739,12 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, +@@ -3226,11 +3230,12 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, @@ -74 +75 @@ -@@ -1833,11 +1838,12 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, +@@ -3326,11 +3331,12 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, @@ -88 +89 @@ -@@ -1948,16 +1954,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, +@@ -3444,16 +3450,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, @@ -106 +107 @@ -@@ -2063,6 +2060,16 @@ do_align: +@@ -3560,6 +3557,16 @@ do_align: @@ -123 +124 @@ -@@ -2223,7 +2230,7 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq, +@@ -3723,7 +3730,7 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *__rte_restrict txq, @@ -132 +133 @@ -@@ -2601,16 +2608,6 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq, +@@ -4109,16 +4116,6 @@ mlx5_tx_burst_empw_simple(struct mlx5_txq_data *__rte_restrict txq, @@ -149 +150 @@ -@@ -2621,6 +2618,16 @@ next_empw: +@@ -4129,6 +4126,16 @@ next_empw: @@ -166 +167 @@ -@@ -2775,16 +2782,6 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, +@@ -4285,16 +4292,6 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, @@ -183 +184 @@ -@@ -2792,6 +2789,16 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, +@@ -4302,6 +4299,16 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *__rte_restrict txq, @@ -200 +201 @@ -@@ -3074,11 +3081,12 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq, +@@ -4570,11 +4577,12 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix single not inline packet storing' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (42 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix check for orphan wait descriptor' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " luca.boccassi ` (54 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Viacheslav Ovsiienko; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/32e5eda02606aac890aa1d1b8029e611d2f130d0 Thanks. Luca Boccassi --- From 32e5eda02606aac890aa1d1b8029e611d2f130d0 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Date: Wed, 17 Aug 2022 10:04:25 +0300 Subject: [PATCH] net/mlx5: fix single not inline packet storing [ upstream commit 166f185fefcd53d2d41499cadc5e1467e040d0cc ] The mlx5 PMD can inline packet data into transmitting descriptor (WQE) and free mbuf immediately as data no longer needed, for non-inline packets the mbuf pointer should be stored in elts array for coming freeing on send completion. There was an optimization on storing pointers in batch and there was missed storing mbuf for single packet if non-inline was explicitly requested by flag. Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_rxtx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index b73ab06367..1ba70264c8 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -4822,7 +4822,9 @@ single_no_inline: * if no inlining is configured, this is done * by calling routine in a batch copy. */ - MLX5_ASSERT(!MLX5_TXOFF_CONFIG(INLINE)); + if (MLX5_TXOFF_CONFIG(INLINE)) + txq->elts[txq->elts_head++ & txq->elts_m] = + loc->mbuf; --loc->elts_free; #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes counter. */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.154967533 +0000 +++ 0045-net-mlx5-fix-single-not-inline-packet-storing.patch 2022-11-03 09:27:25.425423448 +0000 @@ -1 +1 @@ -From 166f185fefcd53d2d41499cadc5e1467e040d0cc Mon Sep 17 00:00:00 2001 +From 32e5eda02606aac890aa1d1b8029e611d2f130d0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 166f185fefcd53d2d41499cadc5e1467e040d0cc ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - drivers/net/mlx5/mlx5_tx.h | 4 +++- + drivers/net/mlx5/mlx5_rxtx.c | 4 +++- @@ -21,5 +22,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index f081921ffc..8e113e3778 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -3322,7 +3322,9 @@ single_no_inline: +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index b73ab06367..1ba70264c8 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -4822,7 +4822,9 @@ single_no_inline: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix inline length exceeding descriptor limit' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (43 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix single not inline packet storing' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " luca.boccassi ` (53 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Viacheslav Ovsiienko; +Cc: Dmitry Kozlyuk, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/e577d667725a70e02d45e20199427aabbf52fea4 Thanks. Luca Boccassi --- From e577d667725a70e02d45e20199427aabbf52fea4 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Date: Wed, 17 Aug 2022 17:13:57 +0300 Subject: [PATCH] net/mlx5: fix inline length exceeding descriptor limit [ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ] The hardware descriptor (WQE) length field is 6 bits wide and we have the native limitation for the overall descriptor length. To improve the PCIe bandwidth the packet data can be inline into descriptor. If PMD was configured to inline large amount of data it happened there was no enough space remaining in the descriptor to specify all the packet data segments and PMD rejected problematic packets. The patch tries to adjust the inline data length conservatively and allows to avoid error occurring. Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template") Fixes: e2259f93ef45 ("net/mlx5: fix Tx when inlining is impossible") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> Reviewed-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com> --- drivers/net/mlx5/mlx5_rxtx.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 1ba70264c8..436c207281 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -3575,8 +3575,24 @@ do_build: if (unlikely(loc->wqe_free < ((ds + 3) / 4))) return MLX5_TXCMP_CODE_EXIT; /* Check for maximal WQE size. */ - if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) - return MLX5_TXCMP_CODE_ERROR; + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) { + /* Check if we can adjust the inline length. */ + if (unlikely(txq->inlen_mode)) { + ds = NB_SEGS(loc->mbuf) + 2 + + (txq->inlen_mode - + MLX5_ESEG_MIN_INLINE_SIZE + + MLX5_WSEG_SIZE + + MLX5_WSEG_SIZE - 1) / MLX5_WSEG_SIZE; + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) + return MLX5_TXCMP_CODE_ERROR; + } + /* We have lucky opportunity to adjust. */ + inlen = RTE_MIN(inlen, MLX5_WQE_SIZE_MAX - + MLX5_WSEG_SIZE * 2 - + MLX5_WSEG_SIZE * NB_SEGS(loc->mbuf) - + MLX5_WSEG_SIZE + + MLX5_ESEG_MIN_INLINE_SIZE); + } #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes/packets counters. */ txq->stats.obytes += dlen + vlan; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.219081693 +0000 +++ 0046-net-mlx5-fix-inline-length-exceeding-descriptor-limi.patch 2022-11-03 09:27:25.429423524 +0000 @@ -1 +1 @@ -From d15bfd2930f343baf3f9e3a20b6d5f948f783394 Mon Sep 17 00:00:00 2001 +From e577d667725a70e02d45e20199427aabbf52fea4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ - drivers/net/mlx5/mlx5_tx.h | 20 ++++++++++++++++++-- + drivers/net/mlx5/mlx5_rxtx.c | 20 ++++++++++++++++++-- @@ -27,5 +28,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index 8e113e3778..59ebe95032 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -2078,8 +2078,24 @@ do_build: +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index 1ba70264c8..436c207281 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -3575,8 +3575,24 @@ do_build: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix Tx check for hardware descriptor length' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (44 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " luca.boccassi ` (52 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Raja Zidane; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9cf325e6a17aee9a1949b312e0899c60d61cdd20 Thanks. Luca Boccassi --- From 9cf325e6a17aee9a1949b312e0899c60d61cdd20 Mon Sep 17 00:00:00 2001 From: Raja Zidane <rzidane@nvidia.com> Date: Wed, 17 Aug 2022 17:14:33 +0300 Subject: [PATCH] net/mlx5: fix Tx check for hardware descriptor length [ upstream commit 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 ] If hardware descriptor (WQE) length exceeds one the HW can handle, the Tx queue failure occurs. PMD does the length check but there was a bug - the length limit was expressed in 16B units (WQEBB segments), while the calculated WQE length and limit were in 64B units (WQEBBs). Fix the condition to avoid subsequent Tx queue failure. Fixes: 18a1c20 ("net/mlx5: implement Tx burst template") Signed-off-by: Raja Zidane <rzidane@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 436c207281..fb4b8544ae 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -3274,7 +3274,7 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, if (unlikely(loc->wqe_free < ((ds + 3) / 4))) return MLX5_TXCMP_CODE_EXIT; /* Check for maximal WQE size. */ - if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4))) + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) return MLX5_TXCMP_CODE_ERROR; #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes/packets counters. */ @@ -3352,7 +3352,7 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, if (unlikely(loc->wqe_free < ((ds + 3) / 4))) return MLX5_TXCMP_CODE_EXIT; /* Check for maximal WQE size. */ - if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4))) + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) return MLX5_TXCMP_CODE_ERROR; /* * Some Tx offloads may cause an error if -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.274217533 +0000 +++ 0047-net-mlx5-fix-Tx-check-for-hardware-descriptor-length.patch 2022-11-03 09:27:25.433423603 +0000 @@ -1 +1 @@ -From 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 Mon Sep 17 00:00:00 2001 +From 9cf325e6a17aee9a1949b312e0899c60d61cdd20 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 130bb7da53ddb9677aa35dcfb2e6f9ddebc014b0 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - drivers/net/mlx5/mlx5_tx.h | 4 ++-- + drivers/net/mlx5/mlx5_rxtx.c | 4 ++-- @@ -21,5 +22,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index 59ebe95032..e0fc1872fe 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -1783,7 +1783,7 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index 436c207281..fb4b8544ae 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -3274,7 +3274,7 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq, @@ -34 +35 @@ -@@ -1858,7 +1858,7 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, +@@ -3352,7 +3352,7 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *__rte_restrict txq, @@ -42 +43 @@ - * Some Tx offloads may cause an error if packet is not long enough, + * Some Tx offloads may cause an error if ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix modify action with tunnel decapsulation' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (45 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix meter profile delete after disable' " luca.boccassi ` (51 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Jiawei Wang; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/eff9ad52b3c9669c682d288c9d18399f86fdbf17 Thanks. Luca Boccassi --- From eff9ad52b3c9669c682d288c9d18399f86fdbf17 Mon Sep 17 00:00:00 2001 From: Jiawei Wang <jiaweiw@nvidia.com> Date: Thu, 1 Sep 2022 05:11:56 +0300 Subject: [PATCH] net/mlx5: fix modify action with tunnel decapsulation [ upstream commit 9f71a297da6b9d4be18e624107b8e0017e890154 ] The driver splits the flow with sample action into two sub-flows, sub prefix flow and sub suffix flow. In the case of tunnel flow including a decap action, the driver should translate the inner as outer for actions coming after the decap action. In the case of flow splitting, the packet layers, used to detect the attributes, are inherited from the prefix flow to the suffix flow but the driver wrongly didn't handle the decap adjustment and the inner layers didn't shift to the outer. This patch adjusts the inherited layers in case of decap. Fixes: 6e77151286b2 ("net/mlx5: fix match information in meter") Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5_flow_dv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index c1505b69e6..500ffaf013 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -112,6 +112,13 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, * have the user defined items as the flow is split. */ if (layers) { + if (tunnel_decap) { + /* + * If decap action before modify, it means the driver + * should take the inner as outer for the modify actions. + */ + layers = ((layers >> 6) & MLX5_FLOW_LAYER_OUTER); + } if (layers & MLX5_FLOW_LAYER_OUTER_L3_IPV4) attr->ipv4 = 1; else if (layers & MLX5_FLOW_LAYER_OUTER_L3_IPV6) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.331185806 +0000 +++ 0048-net-mlx5-fix-modify-action-with-tunnel-decapsulation.patch 2022-11-03 09:27:25.449423912 +0000 @@ -1 +1 @@ -From 9f71a297da6b9d4be18e624107b8e0017e890154 Mon Sep 17 00:00:00 2001 +From eff9ad52b3c9669c682d288c9d18399f86fdbf17 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9f71a297da6b9d4be18e624107b8e0017e890154 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 52f1361a14..535b620ed4 100644 +index c1505b69e6..500ffaf013 100644 @@ -31 +32 @@ -@@ -121,6 +121,13 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, +@@ -112,6 +112,13 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix meter profile delete after disable' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (46 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/iavf: check illegal packet sizes' " luca.boccassi ` (50 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Shun Hao; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Thanks. Luca Boccassi --- From 897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Mon Sep 17 00:00:00 2001 From: Shun Hao <shunh@nvidia.com> Date: Sun, 18 Sep 2022 03:58:02 +0300 Subject: [PATCH] net/mlx5: fix meter profile delete after disable [ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ] If a meter's profile is changed after meter disabled, there's an issue that will fail when deleting the old profile. This patch fixes this by adding the correct process to decrease the old profile's reference count when changing profile. Fixes: 63ffeb2ff2 ("net/mlx5: support meter profile update") Signed-off-by: Shun Hao <shunh@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5_flow_meter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c index 058d94c9cf..9a7a781584 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -942,7 +942,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, fm->profile = fmp; /* Update meter params in HW (if not disabled). */ if (fm->active_state == MLX5_FLOW_METER_DISABLE) - return 0; + goto dec_ref_cnt; ret = mlx5_flow_meter_action_modify(priv, fm, &fm->profile->srtcm_prm, modify_bits, fm->active_state); if (ret) { @@ -952,6 +952,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, NULL, "Failed to update meter" " parameters in hardware."); } +dec_ref_cnt: old_fmp->ref_cnt--; fmp->ref_cnt++; return 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.408948740 +0000 +++ 0049-net-mlx5-fix-meter-profile-delete-after-disable.patch 2022-11-03 09:27:25.449423912 +0000 @@ -1 +1 @@ -From 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 Mon Sep 17 00:00:00 2001 +From 897dcb70d3bfc168276f13f74f4c192aaa9ba5d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9b7fcf395cd9f92e45bb322f983a3b9ead0d47e7 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 7c0d84907a..d4aafe4eea 100644 +index 058d94c9cf..9a7a781584 100644 @@ -25 +26 @@ -@@ -1656,7 +1656,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, +@@ -942,7 +942,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, @@ -32 +33 @@ - modify_bits, fm->active_state, 1); + modify_bits, fm->active_state); @@ -34 +35 @@ -@@ -1666,6 +1666,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, +@@ -952,6 +952,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: check illegal packet sizes' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (47 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/mlx5: fix meter profile delete after disable' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/ice: " luca.boccassi ` (49 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Kevin Liu; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4f523b99acacdee90cdc42b3e85ec9e48e975388 Thanks. Luca Boccassi --- From 4f523b99acacdee90cdc42b3e85ec9e48e975388 Mon Sep 17 00:00:00 2001 From: Kevin Liu <kevinx.liu@intel.com> Date: Tue, 27 Sep 2022 07:15:21 +0000 Subject: [PATCH] net/iavf: check illegal packet sizes [ upstream commit 19ee91c6bd9a196b17394d69b18576a7ff8e2489 ] If the length of data_len in mbuf is less than 17 or greater than the maximum frame size, it is illegal. These illegal packets will lead to Tx/Rx hang and can't recover automatically. This patch check those illegal packets and protect Tx/Rx from hanging. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf_rxtx.c | 13 ++++++++++++- drivers/net/iavf/iavf_rxtx.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index f6049d8694..0053a36de2 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2329,12 +2329,15 @@ end_of_tx: /* TX prep functions */ uint16_t -iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { int i, ret; uint64_t ol_flags; struct rte_mbuf *m; + struct iavf_tx_queue *txq = tx_queue; + struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; + uint16_t max_frame_size = dev->data->mtu + IAVF_ETH_OVERHEAD; for (i = 0; i < nb_pkts; i++) { m = tx_pkts[i]; @@ -2358,6 +2361,14 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } + /* check the data_len in mbuf */ + if (m->data_len < IAVF_TX_MIN_PKT_LEN || + m->data_len > max_frame_size) { + rte_errno = EINVAL; + PMD_DRV_LOG(ERR, "INVALID mbuf: bad data_len=[%hu]", m->data_len); + return i; + } + #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h index 557a7e46a7..047743de4f 100644 --- a/drivers/net/iavf/iavf_rxtx.h +++ b/drivers/net/iavf/iavf_rxtx.h @@ -39,6 +39,8 @@ #define IAVF_TSO_MAX_SEG UINT8_MAX #define IAVF_TX_MAX_MTU_SEG 8 +#define IAVF_TX_MIN_PKT_LEN 17 + #define IAVF_TX_CKSUM_OFFLOAD_MASK ( \ PKT_TX_IP_CKSUM | \ PKT_TX_L4_MASK | \ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.463235768 +0000 +++ 0050-net-iavf-check-illegal-packet-sizes.patch 2022-11-03 09:27:25.449423912 +0000 @@ -1 +1 @@ -From 19ee91c6bd9a196b17394d69b18576a7ff8e2489 Mon Sep 17 00:00:00 2001 +From 4f523b99acacdee90cdc42b3e85ec9e48e975388 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 19ee91c6bd9a196b17394d69b18576a7ff8e2489 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -21,3 +22,3 @@ - drivers/net/iavf/iavf_rxtx.c | 9 +++++++++ - drivers/net/iavf/iavf_rxtx.h | 2 ++ - 2 files changed, 11 insertions(+) + drivers/net/iavf/iavf_rxtx.c | 13 ++++++++++++- + drivers/net/iavf/iavf_rxtx.h | 2 ++ + 2 files changed, 14 insertions(+), 1 deletion(-) @@ -26 +27 @@ -index fc5d9e38cc..89a1d141ba 100644 +index f6049d8694..0053a36de2 100644 @@ -29 +30,10 @@ -@@ -2916,6 +2916,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -2329,12 +2329,15 @@ end_of_tx: + + /* TX prep functions */ + uint16_t +-iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, ++iavf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, + uint16_t nb_pkts) + { + int i, ret; + uint64_t ol_flags; @@ -31,2 +41,2 @@ - struct iavf_tx_queue *txq = tx_queue; - struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; ++ struct iavf_tx_queue *txq = tx_queue; ++ struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; @@ -34,2 +43,0 @@ - struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); - struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); @@ -37 +45,3 @@ -@@ -2944,6 +2945,14 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, + for (i = 0; i < nb_pkts; i++) { + m = tx_pkts[i]; +@@ -2358,6 +2361,14 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, @@ -49 +59 @@ - #ifdef RTE_ETHDEV_DEBUG_TX + #ifdef RTE_LIBRTE_ETHDEV_DEBUG @@ -53 +63 @@ -index 66e832713c..3c89303980 100644 +index 557a7e46a7..047743de4f 100644 @@ -56 +66 @@ -@@ -55,6 +55,8 @@ +@@ -39,6 +39,8 @@ @@ -63,2 +73,2 @@ - RTE_MBUF_F_TX_IP_CKSUM | \ - RTE_MBUF_F_TX_L4_MASK | \ + PKT_TX_IP_CKSUM | \ + PKT_TX_L4_MASK | \ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice: check illegal packet sizes' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (48 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/iavf: check illegal packet sizes' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: reset end of packet in scattered Rx' " luca.boccassi ` (48 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Kevin Liu; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5d9ff0ecf09710cd71e42eca104aedb39d0a521d Thanks. Luca Boccassi --- From 5d9ff0ecf09710cd71e42eca104aedb39d0a521d Mon Sep 17 00:00:00 2001 From: Kevin Liu <kevinx.liu@intel.com> Date: Tue, 27 Sep 2022 07:15:22 +0000 Subject: [PATCH] net/ice: check illegal packet sizes [ upstream commit ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 ] If the length of data_len in mbuf is less than 17 or greater than the maximum frame size, it is illegal. These illegal packets will lead to Tx/Rx hang and can't recover automatically. This patch check those illegal packets and protect Tx/Rx from hanging. Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx") Signed-off-by: Kevin Liu <kevinx.liu@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/ice_rxtx.c | 11 +++++++++++ drivers/net/ice/ice_rxtx.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 5f94b4174d..fe1f3eea2d 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -3209,6 +3209,9 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, int i, ret; uint64_t ol_flags; struct rte_mbuf *m; + struct ice_tx_queue *txq = tx_queue; + struct rte_eth_dev *dev = &rte_eth_devices[txq->port_id]; + uint16_t max_frame_size = dev->data->mtu + ICE_ETH_OVERHEAD; for (i = 0; i < nb_pkts; i++) { m = tx_pkts[i]; @@ -3225,6 +3228,14 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } + /* check the data_len in mbuf */ + if (m->data_len < ICE_TX_MIN_PKT_LEN || + m->data_len > max_frame_size) { + rte_errno = EINVAL; + PMD_DRV_LOG(ERR, "INVALID mbuf: bad data_len=[%hu]", m->data_len); + return i; + } + #ifdef RTE_LIBRTE_ETHDEV_DEBUG ret = rte_validate_tx_offload(m); if (ret != 0) { diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index a74c4b3492..1ba264ddbc 100644 --- a/drivers/net/ice/ice_rxtx.h +++ b/drivers/net/ice/ice_rxtx.h @@ -40,6 +40,8 @@ #define ICE_RXDID_COMMS_OVS 22 +#define ICE_TX_MIN_PKT_LEN 17 + typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq); typedef void (*ice_tx_release_mbufs_t)(struct ice_tx_queue *txq); typedef void (*ice_rxd_to_pkt_fields_t)(struct ice_rx_queue *rxq, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.521032733 +0000 +++ 0051-net-ice-check-illegal-packet-sizes.patch 2022-11-03 09:27:25.453423990 +0000 @@ -1 +1 @@ -From ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 Mon Sep 17 00:00:00 2001 +From 5d9ff0ecf09710cd71e42eca104aedb39d0a521d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ccf33dccf7aaf208ef67ed7b8ef45d05bce5e3a5 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 5af7c0c8f6..d1e1fadf9d 100644 +index 5f94b4174d..fe1f3eea2d 100644 @@ -29 +30 @@ -@@ -3442,6 +3442,9 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -3209,6 +3209,9 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, @@ -39 +40 @@ -@@ -3458,6 +3461,14 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -3225,6 +3228,14 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, @@ -51 +52 @@ - #ifdef RTE_ETHDEV_DEBUG_TX + #ifdef RTE_LIBRTE_ETHDEV_DEBUG @@ -55 +56 @@ -index 6c08c175dc..e1d4fe8e47 100644 +index a74c4b3492..1ba264ddbc 100644 @@ -64,3 +65,3 @@ - extern uint64_t ice_timestamp_dynflag; - extern int ice_timestamp_dynfield_offset; - + typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq); + typedef void (*ice_tx_release_mbufs_t)(struct ice_tx_queue *txq); + typedef void (*ice_rxd_to_pkt_fields_t)(struct ice_rx_queue *rxq, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: reset end of packet in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (49 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/ice: " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " luca.boccassi ` (47 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c8fbd023ef95008f1a0f5ea8caeef0489584c99e Thanks. Luca Boccassi --- From c8fbd023ef95008f1a0f5ea8caeef0489584c99e Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Wed, 7 Sep 2022 23:31:07 -0400 Subject: [PATCH] net/axgbe: reset end of packet in scattered Rx [ upstream commit 2a761aec228caf66025cacf07c7c9662ae021e03 ] Reset the EOP in the failure scenario and also after the last segment. Remove updating the packet length explicitly as it is done in chaining. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 55aed1e73b..3875348f97 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -326,10 +326,11 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, unsigned int err = 0; uint32_t error_status = 0; uint16_t idx, pidx, data_len = 0, pkt_len = 0; + bool eop = 0; idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); + while (nb_rx < nb_pkts) { - bool eop = 0; next_desc: idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur); @@ -396,9 +397,12 @@ next_desc: mbuf->pkt_len = data_len; if (first_seg != NULL) { - if (rte_pktmbuf_chain(first_seg, mbuf) != 0) + if (rte_pktmbuf_chain(first_seg, mbuf) != 0) { rte_mempool_put(rxq->mb_pool, first_seg); + eop = 0; + break; + } } else { first_seg = mbuf; } @@ -418,8 +422,8 @@ err_set: if (!eop) goto next_desc; + eop = 0; - first_seg->pkt_len = pkt_len; rxq->bytes += pkt_len; first_seg->port = rxq->port_id; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.580658796 +0000 +++ 0052-net-axgbe-reset-end-of-packet-in-scattered-Rx.patch 2022-11-03 09:27:25.457424066 +0000 @@ -1 +1 @@ -From 2a761aec228caf66025cacf07c7c9662ae021e03 Mon Sep 17 00:00:00 2001 +From c8fbd023ef95008f1a0f5ea8caeef0489584c99e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2a761aec228caf66025cacf07c7c9662ae021e03 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d4224992ee..4c16c59f37 100644 +index 55aed1e73b..3875348f97 100644 @@ -22 +23,2 @@ -@@ -346,10 +346,11 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, +@@ -326,10 +326,11 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue, + unsigned int err = 0; @@ -25 +26,0 @@ - uint64_t offloads; @@ -35 +36 @@ -@@ -416,9 +417,12 @@ next_desc: +@@ -396,9 +397,12 @@ next_desc: @@ -49 +50 @@ -@@ -460,8 +464,8 @@ err_set: +@@ -418,8 +422,8 @@ err_set: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: clear buffer on scattered Rx chaining failure' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (50 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/axgbe: reset end of packet in scattered Rx' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: save segment data in scattered Rx' " luca.boccassi ` (46 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2f92b609867414b2821caf311d4994f5bbf1de49 Thanks. Luca Boccassi --- From 2f92b609867414b2821caf311d4994f5bbf1de49 Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Wed, 7 Sep 2022 23:31:08 -0400 Subject: [PATCH] net/axgbe: clear buffer on scattered Rx chaining failure [ upstream commit 30ff4d00d92dd4126efc8236299126e199e92461 ] Clearing mbuf, first_seg when chaining mbufs fail. Increment the error count for the same. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 3875348f97..35925d3a7f 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -398,8 +398,10 @@ next_desc: if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) { - rte_mempool_put(rxq->mb_pool, - first_seg); + rte_pktmbuf_free(first_seg); + first_seg = NULL; + rte_pktmbuf_free(mbuf); + rxq->errors++; eop = 0; break; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.632232059 +0000 +++ 0053-net-axgbe-clear-buffer-on-scattered-Rx-chaining-fail.patch 2022-11-03 09:27:25.457424066 +0000 @@ -1 +1 @@ -From 30ff4d00d92dd4126efc8236299126e199e92461 Mon Sep 17 00:00:00 2001 +From 2f92b609867414b2821caf311d4994f5bbf1de49 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 30ff4d00d92dd4126efc8236299126e199e92461 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 4c16c59f37..f2136e30b0 100644 +index 3875348f97..35925d3a7f 100644 @@ -22 +23 @@ -@@ -418,8 +418,10 @@ next_desc: +@@ -398,8 +398,10 @@ next_desc: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/axgbe: save segment data in scattered Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (51 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " luca.boccassi ` (45 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Bhagyada Modali; +Cc: Chandubabu Namburu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f7b1922b93acfc46b00d19b35aa8d21e21e3c8fe Thanks. Luca Boccassi --- From f7b1922b93acfc46b00d19b35aa8d21e21e3c8fe Mon Sep 17 00:00:00 2001 From: Bhagyada Modali <bhagyada.modali@amd.com> Date: Wed, 7 Sep 2022 23:31:09 -0400 Subject: [PATCH] net/axgbe: save segment data in scattered Rx [ upstream commit 91907ec24783fedb28c7ebd82b88942caf0863ca ] Saving the current segments of the packet, when the next segment data is not ready. Fixes: 965b3127d425 ("net/axgbe: support scattered Rx") Signed-off-by: Bhagyada Modali <bhagyada.modali@amd.com> Acked-by: Chandubabu Namburu <chandu@amd.com> --- drivers/net/axgbe/axgbe_rxtx.c | 10 ++++++++++ drivers/net/axgbe/axgbe_rxtx.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 35925d3a7f..edc0844a25 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -396,11 +396,17 @@ next_desc: mbuf->data_len = data_len; mbuf->pkt_len = data_len; + if (rxq->saved_mbuf) { + first_seg = rxq->saved_mbuf; + rxq->saved_mbuf = NULL; + } + if (first_seg != NULL) { if (rte_pktmbuf_chain(first_seg, mbuf) != 0) { rte_pktmbuf_free(first_seg); first_seg = NULL; rte_pktmbuf_free(mbuf); + rxq->saved_mbuf = NULL; rxq->errors++; eop = 0; break; @@ -457,6 +463,10 @@ err_set: first_seg = NULL; } + /* Check if we need to save state before leaving */ + if (first_seg != NULL && eop == 0) + rxq->saved_mbuf = first_seg; + /* Save receive context.*/ rxq->pkts += nb_rx; diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h index f2fbe9299d..54eaca1be5 100644 --- a/drivers/net/axgbe/axgbe_rxtx.h +++ b/drivers/net/axgbe/axgbe_rxtx.h @@ -65,6 +65,12 @@ struct axgbe_rx_queue { uint16_t crc_len; /* address of s/w rx buffers */ struct rte_mbuf **sw_ring; + + /* For segemented packets - save the current state + * of packet, if next descriptor is not ready yet + */ + struct rte_mbuf *saved_mbuf; + /* Port private data */ struct axgbe_port *pdata; /* Number of Rx descriptors in queue */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.683741179 +0000 +++ 0054-net-axgbe-save-segment-data-in-scattered-Rx.patch 2022-11-03 09:27:25.457424066 +0000 @@ -1 +1 @@ -From 91907ec24783fedb28c7ebd82b88942caf0863ca Mon Sep 17 00:00:00 2001 +From f7b1922b93acfc46b00d19b35aa8d21e21e3c8fe Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 91907ec24783fedb28c7ebd82b88942caf0863ca ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index f2136e30b0..a1a463bc79 100644 +index 35925d3a7f..edc0844a25 100644 @@ -23 +24 @@ -@@ -416,11 +416,17 @@ next_desc: +@@ -396,11 +396,17 @@ next_desc: @@ -41 +42 @@ -@@ -499,6 +505,10 @@ err_set: +@@ -457,6 +463,10 @@ err_set: @@ -53 +54 @@ -index 2a330339cd..2da3095547 100644 +index f2fbe9299d..54eaca1be5 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'common/sfc_efx/base: fix maximum Tx data count' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (52 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/axgbe: save segment data in scattered Rx' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'event/dlb2: handle enqueuing more than maximum depth' " luca.boccassi ` (44 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0893316e1f61bac357feaa71ae543ce3311d71a4 Thanks. Luca Boccassi --- From 0893316e1f61bac357feaa71ae543ce3311d71a4 Mon Sep 17 00:00:00 2001 From: Ivan Malov <ivan.malov@oktetlabs.ru> Date: Fri, 12 Aug 2022 15:24:52 +0300 Subject: [PATCH] common/sfc_efx/base: fix maximum Tx data count [ upstream commit 79b0c1926137690d680dec1b96b7a03279674fb9 ] Maximum data count of a Tx descriptor is advertised to users, however, this value is mistakenly derived from the Rx define. Use the Tx one instead. The resulting value will be the same. Fixes: 1e43fe3cb41e ("net/sfc/base: separate limitations on Tx DMA descriptors") Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> --- drivers/common/sfc_efx/base/ef10_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c index ccce7b7437..8d378449af 100644 --- a/drivers/common/sfc_efx/base/ef10_nic.c +++ b/drivers/common/sfc_efx/base/ef10_nic.c @@ -2117,7 +2117,7 @@ ef10_nic_board_cfg( /* Alignment for WPTR updates */ encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN; - encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_RX_KER_BYTE_CNT); + encp->enc_tx_dma_desc_size_max = EFX_MASK32(ESF_DZ_TX_KER_BYTE_CNT); /* No boundary crossing limits */ encp->enc_tx_dma_desc_boundary = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.740618397 +0000 +++ 0055-common-sfc_efx-base-fix-maximum-Tx-data-count.patch 2022-11-03 09:27:25.461424145 +0000 @@ -1 +1 @@ -From 79b0c1926137690d680dec1b96b7a03279674fb9 Mon Sep 17 00:00:00 2001 +From 0893316e1f61bac357feaa71ae543ce3311d71a4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 79b0c1926137690d680dec1b96b7a03279674fb9 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index b27fc64210..7bda778f8b 100644 +index ccce7b7437..8d378449af 100644 @@ -23 +24 @@ -@@ -2233,7 +2233,7 @@ ef10_nic_board_cfg( +@@ -2117,7 +2117,7 @@ ef10_nic_board_cfg( ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (53 preceding siblings ...) 2022-11-03 9:27 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 16:20 ` Sevincer, Abdullah 2022-11-03 9:27 ` patch 'cryptodev: fix unduly newlines in logs' " luca.boccassi ` (43 subsequent siblings) 98 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Abdullah Sevincer; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Thanks. Luca Boccassi --- From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001 From: Abdullah Sevincer <abdullah.sevincer@intel.com> Date: Wed, 28 Sep 2022 13:44:19 -0500 Subject: [PATCH] event/dlb2: handle enqueuing more than maximum depth [ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ] This patch addresses an issue of enqueuing more than max_enq_depth and not able to dequeuing events equal to max_cq_depth in a single call of rte_event_enqueue_burst and rte_event_dequeue_burst. Apply fix for restricting enqueue of events to max_enq_depth so that in a single rte_event_enqueue_burst() call at most max_enq_depth events are enqueued. Also set per port and domain history list sizes based on cq_depth. This results in dequeuing correct number of events as set by max_cq_depth. Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure") Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com> --- drivers/event/dlb2/dlb2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 97ae8a8b7e..b71c697625 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev *handle, cfg->num_ldb_queues; cfg->num_hist_list_entries = resources_asked->num_ldb_ports * - DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; + evdev_dlb2_default_info.max_event_port_dequeue_depth; DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n", cfg->num_ldb_queues, @@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, cfg.cq_depth = rte_align32pow2(dequeue_depth); cfg.cq_depth_threshold = 1; - cfg.cq_history_list_size = DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; + cfg.cq_history_list_size = cfg.cq_depth; if (handle->cos_id == DLB2_COS_DEFAULT) cfg.cos_id = 0; @@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port, struct dlb2_eventdev_port *ev_port = event_port; struct dlb2_port *qm_port = &ev_port->qm_port; struct process_local_port_data *port_data; + int num_tx; int i; RTE_ASSERT(ev_port->enq_configured); @@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port, i = 0; port_data = &dlb2_port[qm_port->id][PORT_TYPE(qm_port)]; - - while (i < num) { + num_tx = RTE_MIN(num, ev_port->conf.enqueue_depth); + while (i < num_tx) { uint8_t sched_types[DLB2_NUM_QES_PER_CACHE_LINE]; uint8_t queue_ids[DLB2_NUM_QES_PER_CACHE_LINE]; int pop_offs = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.792535817 +0000 +++ 0056-event-dlb2-handle-enqueuing-more-than-maximum-depth.patch 2022-11-03 09:27:25.461424145 +0000 @@ -1 +1 @@ -From 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 Mon Sep 17 00:00:00 2001 +From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 164ebbcfe2..7fd89e940b 100644 +index 97ae8a8b7e..b71c697625 100644 @@ -31 +32 @@ -@@ -860,7 +860,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, +@@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev *handle, @@ -38,3 +39,3 @@ - if (device_version == DLB2_HW_V2_5) { - DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d\n", -@@ -1585,7 +1585,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, + DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n", + cfg->num_ldb_queues, +@@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, @@ -47,3 +48,4 @@ - cfg.cos_id = ev_port->cos_id; - cfg.cos_strict = 0;/* best effots */ -@@ -3033,6 +3033,7 @@ __dlb2_event_enqueue_burst(void *event_port, + if (handle->cos_id == DLB2_COS_DEFAULT) + cfg.cos_id = 0; +@@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port, + struct dlb2_eventdev_port *ev_port = event_port; @@ -52 +53,0 @@ - int retries = ev_port->enq_retries; @@ -57 +58 @@ -@@ -3041,8 +3042,8 @@ __dlb2_event_enqueue_burst(void *event_port, +@@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port, ^ permalink raw reply [flat|nested] 207+ messages in thread
* RE: patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7 2022-11-03 9:27 ` patch 'event/dlb2: handle enqueuing more than maximum depth' " luca.boccassi @ 2022-11-03 16:20 ` Sevincer, Abdullah 0 siblings, 0 replies; 207+ messages in thread From: Sevincer, Abdullah @ 2022-11-03 16:20 UTC (permalink / raw) To: luca.boccassi; +Cc: dpdk stable Sure, thanks Luca. -----Original Message----- From: luca.boccassi@gmail.com <luca.boccassi@gmail.com> Sent: Thursday, November 3, 2022 2:27 AM To: Sevincer, Abdullah <abdullah.sevincer@intel.com> Cc: dpdk stable <stable@dpdk.org> Subject: patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7 Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Thanks. Luca Boccassi --- From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001 From: Abdullah Sevincer <abdullah.sevincer@intel.com> Date: Wed, 28 Sep 2022 13:44:19 -0500 Subject: [PATCH] event/dlb2: handle enqueuing more than maximum depth [ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ] This patch addresses an issue of enqueuing more than max_enq_depth and not able to dequeuing events equal to max_cq_depth in a single call of rte_event_enqueue_burst and rte_event_dequeue_burst. Apply fix for restricting enqueue of events to max_enq_depth so that in a single rte_event_enqueue_burst() call at most max_enq_depth events are enqueued. Also set per port and domain history list sizes based on cq_depth. This results in dequeuing correct number of events as set by max_cq_depth. Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure") Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com> --- drivers/event/dlb2/dlb2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 97ae8a8b7e..b71c697625 100644 --- a/drivers/event/dlb2/dlb2.c +++ b/drivers/event/dlb2/dlb2.c @@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev *handle, cfg->num_ldb_queues; cfg->num_hist_list_entries = resources_asked->num_ldb_ports * - DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; + evdev_dlb2_default_info.max_event_port_dequeue_depth; DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n", cfg->num_ldb_queues, @@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, cfg.cq_depth = rte_align32pow2(dequeue_depth); cfg.cq_depth_threshold = 1; - cfg.cq_history_list_size = DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT; + cfg.cq_history_list_size = cfg.cq_depth; if (handle->cos_id == DLB2_COS_DEFAULT) cfg.cos_id = 0; @@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port, struct dlb2_eventdev_port *ev_port = event_port; struct dlb2_port *qm_port = &ev_port->qm_port; struct process_local_port_data *port_data; + int num_tx; int i; RTE_ASSERT(ev_port->enq_configured); @@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port, i = 0; port_data = &dlb2_port[qm_port->id][PORT_TYPE(qm_port)]; - - while (i < num) { + num_tx = RTE_MIN(num, ev_port->conf.enqueue_depth); + while (i < num_tx) { uint8_t sched_types[DLB2_NUM_QES_PER_CACHE_LINE]; uint8_t queue_ids[DLB2_NUM_QES_PER_CACHE_LINE]; int pop_offs = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.792535817 +0000 +++ 0056-event-dlb2-handle-enqueuing-more-than-maximum-depth.patch 2022-11-03 09:27:25.461424145 +0000 @@ -1 +1 @@ -From 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 Mon Sep 17 00:00:00 2001 +From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 164ebbcfe2..7fd89e940b 100644 +index 97ae8a8b7e..b71c697625 100644 @@ -31 +32 @@ -@@ -860,7 +860,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2, +@@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev +*handle, @@ -38,3 +39,3 @@ - if (device_version == DLB2_HW_V2_5) { - DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d\n", -@@ -1585,7 +1585,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2, + DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n", + cfg->num_ldb_queues, +@@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev +*dlb2, @@ -47,3 +48,4 @@ - cfg.cos_id = ev_port->cos_id; - cfg.cos_strict = 0;/* best effots */ -@@ -3033,6 +3033,7 @@ __dlb2_event_enqueue_burst(void *event_port, + if (handle->cos_id == DLB2_COS_DEFAULT) + cfg.cos_id = 0; +@@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port, + struct dlb2_eventdev_port *ev_port = event_port; @@ -52 +53,0 @@ - int retries = ev_port->enq_retries; @@ -57 +58 @@ -@@ -3041,8 +3042,8 @@ __dlb2_event_enqueue_burst(void *event_port, +@@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'cryptodev: fix unduly newlines in logs' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (54 preceding siblings ...) 2022-11-03 9:27 ` patch 'event/dlb2: handle enqueuing more than maximum depth' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix null pointer dereference in LED config' " luca.boccassi ` (42 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Olivier Matz; +Cc: David Marchand, Akhil Goyal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3c6f65c8741cff891db01ec3dc7dedac754f8886 Thanks. Luca Boccassi --- From 3c6f65c8741cff891db01ec3dc7dedac754f8886 Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:05:01 +0200 Subject: [PATCH] cryptodev: fix unduly newlines in logs [ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ] The CDEV_LOG_* macros already add a '\n' at the end of the line. Remove it from format strings to avoid duplicated newlines. Fixes: 9e6edea4180 ("cryptodev: add APIs to assist PMD initialisation") Fixes: e764cd72a9b ("cryptodev: update symmetric session structure") Fixes: 1d6f89885e1 ("cryptodev: add sym session mempool create") Fixes: 1f1e4b7cbaa ("cryptodev: use single mempool for asymmetric session") Fixes: 757f40e28e1 ("cryptodev: modify return value for asym session create") Fixes: cea66374dcb ("cryptodev: support asymmetric operations") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Acked-by: Akhil Goyal <gakhil@marvell.com> --- lib/librte_cryptodev/rte_cryptodev.c | 20 ++++++++++---------- lib/librte_cryptodev/rte_cryptodev_pmd.c | 4 ++-- lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 3d95ac6ea2..3c32952282 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -1088,13 +1088,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, } if (!qp_conf) { - CDEV_LOG_ERR("qp_conf cannot be NULL\n"); + CDEV_LOG_ERR("qp_conf cannot be NULL"); return -EINVAL; } if ((qp_conf->mp_session && !qp_conf->mp_session_private) || (!qp_conf->mp_session && qp_conf->mp_session_private)) { - CDEV_LOG_ERR("Invalid mempools\n"); + CDEV_LOG_ERR("Invalid mempools"); return -EINVAL; } @@ -1107,7 +1107,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, pool_priv = rte_mempool_get_priv(qp_conf->mp_session); if (!pool_priv || qp_conf->mp_session->private_data_size < sizeof(*pool_priv)) { - CDEV_LOG_ERR("Invalid mempool\n"); + CDEV_LOG_ERR("Invalid mempool"); return -EINVAL; } @@ -1118,7 +1118,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, obj_size) || (s.nb_drivers <= dev->driver_id) || rte_cryptodev_sym_get_private_session_size(dev_id) > obj_priv_size) { - CDEV_LOG_ERR("Invalid mempool\n"); + CDEV_LOG_ERR("Invalid mempool"); return -EINVAL; } } @@ -1407,7 +1407,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, obj_sz = rte_cryptodev_sym_get_header_session_size() + user_data_size; if (obj_sz > elt_size) - CDEV_LOG_INFO("elt_size %u is expanded to %u\n", elt_size, + CDEV_LOG_INFO("elt_size %u is expanded to %u", elt_size, obj_sz); else obj_sz = elt_size; @@ -1417,14 +1417,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, NULL, NULL, NULL, NULL, socket_id, 0); if (mp == NULL) { - CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n", + CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d", __func__, name, rte_errno); return NULL; } pool_priv = rte_mempool_get_priv(mp); if (!pool_priv) { - CDEV_LOG_ERR("%s(name=%s) failed to get private data\n", + CDEV_LOG_ERR("%s(name=%s) failed to get private data", __func__, name); rte_mempool_free(mp); return NULL; @@ -1472,7 +1472,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp) struct rte_cryptodev_sym_session_pool_private_data *pool_priv; if (!rte_cryptodev_sym_is_valid_session_pool(mp)) { - CDEV_LOG_ERR("Invalid mempool\n"); + CDEV_LOG_ERR("Invalid mempool"); return NULL; } @@ -1506,7 +1506,7 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp) rte_cryptodev_asym_get_header_session_size(); if (!mp) { - CDEV_LOG_ERR("invalid mempool\n"); + CDEV_LOG_ERR("invalid mempool"); return NULL; } @@ -1889,7 +1889,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type, elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op), sizeof(struct rte_crypto_asym_op)); } else { - CDEV_LOG_ERR("Invalid op_type\n"); + CDEV_LOG_ERR("Invalid op_type"); return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c index e342daabc4..5445b015d9 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c @@ -94,11 +94,11 @@ rte_cryptodev_pmd_create(const char *name, struct rte_cryptodev *cryptodev; if (params->name[0] != '\0') { - CDEV_LOG_INFO("User specified device name = %s\n", params->name); + CDEV_LOG_INFO("User specified device name = %s", params->name); name = params->name; } - CDEV_LOG_INFO("Creating cryptodev %s\n", name); + CDEV_LOG_INFO("Creating cryptodev %s", name); CDEV_LOG_INFO("Initialisation parameters - name: %s," "socket id: %d, max queue pairs: %u", diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index 6c46acf7c2..f35c66868f 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -541,7 +541,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess, uint8_t driver_id, void *private_data) { if (unlikely(sess->nb_drivers <= driver_id)) { - CDEV_LOG_ERR("Set private data for driver %u not allowed\n", + CDEV_LOG_ERR("Set private data for driver %u not allowed", driver_id); return; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.857362508 +0000 +++ 0057-cryptodev-fix-unduly-newlines-in-logs.patch 2022-11-03 09:27:25.465424221 +0000 @@ -1 +1 @@ -From a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd Mon Sep 17 00:00:00 2001 +From 3c6f65c8741cff891db01ec3dc7dedac754f8886 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -22,4 +23,4 @@ - lib/cryptodev/cryptodev_pmd.c | 4 ++-- - lib/cryptodev/cryptodev_pmd.h | 2 +- - lib/cryptodev/rte_cryptodev.c | 26 +++++++++++++------------- - 3 files changed, 16 insertions(+), 16 deletions(-) + lib/librte_cryptodev/rte_cryptodev.c | 20 ++++++++++---------- + lib/librte_cryptodev/rte_cryptodev_pmd.c | 4 ++-- + lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- + 3 files changed, 13 insertions(+), 13 deletions(-) @@ -27,36 +28,5 @@ -diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c -index d90b2570b1..77b269f312 100644 ---- a/lib/cryptodev/cryptodev_pmd.c -+++ b/lib/cryptodev/cryptodev_pmd.c -@@ -99,11 +99,11 @@ rte_cryptodev_pmd_create(const char *name, - struct rte_cryptodev *cryptodev; - - if (params->name[0] != '\0') { -- CDEV_LOG_INFO("User specified device name = %s\n", params->name); -+ CDEV_LOG_INFO("User specified device name = %s", params->name); - name = params->name; - } - -- CDEV_LOG_INFO("Creating cryptodev %s\n", name); -+ CDEV_LOG_INFO("Creating cryptodev %s", name); - - CDEV_LOG_INFO("Initialisation parameters - name: %s," - "socket id: %d, max queue pairs: %u", -diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h -index 96d7e225b0..09ba952455 100644 ---- a/lib/cryptodev/cryptodev_pmd.h -+++ b/lib/cryptodev/cryptodev_pmd.h -@@ -652,7 +652,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess, - uint8_t driver_id, void *private_data) - { - if (unlikely(sess->nb_drivers <= driver_id)) { -- CDEV_LOG_ERR("Set private data for driver %u not allowed\n", -+ CDEV_LOG_ERR("Set private data for driver %u not allowed", - driver_id); - return; - } -diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c -index 0b3c64df89..9e76a1c72d 100644 ---- a/lib/cryptodev/rte_cryptodev.c -+++ b/lib/cryptodev/rte_cryptodev.c -@@ -1351,13 +1351,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, +diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c +index 3d95ac6ea2..3c32952282 100644 +--- a/lib/librte_cryptodev/rte_cryptodev.c ++++ b/lib/librte_cryptodev/rte_cryptodev.c +@@ -1088,13 +1088,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, @@ -78 +48 @@ -@@ -1370,7 +1370,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, +@@ -1107,7 +1107,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, @@ -87 +57 @@ -@@ -1381,7 +1381,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, +@@ -1118,7 +1118,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, @@ -96 +66 @@ -@@ -1921,7 +1921,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, +@@ -1407,7 +1407,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, @@ -105,27 +75 @@ -@@ -1931,14 +1931,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, - NULL, NULL, NULL, NULL, - socket_id, 0); - if (mp == NULL) { -- CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n", -+ CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d", - __func__, name, rte_errno); - return NULL; - } - - pool_priv = rte_mempool_get_priv(mp); - if (!pool_priv) { -- CDEV_LOG_ERR("%s(name=%s) failed to get private data\n", -+ CDEV_LOG_ERR("%s(name=%s) failed to get private data", - __func__, name); - rte_mempool_free(mp); - return NULL; -@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts, - max_priv_sz = priv_sz; - } - if (max_priv_sz == 0) { -- CDEV_LOG_INFO("Could not set max private session size\n"); -+ CDEV_LOG_INFO("Could not set max private session size"); - return NULL; - } - -@@ -1982,14 +1982,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts, +@@ -1417,14 +1417,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, @@ -148 +92 @@ -@@ -2036,7 +2036,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp) +@@ -1472,7 +1472,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp) @@ -157,2 +101,2 @@ -@@ -2086,7 +2086,7 @@ rte_cryptodev_asym_session_create(uint8_t dev_id, - return -EINVAL; +@@ -1506,7 +1506,7 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp) + rte_cryptodev_asym_get_header_session_size(); @@ -163 +107 @@ - return -EINVAL; + return NULL; @@ -166 +110 @@ -@@ -2570,7 +2570,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type, +@@ -1889,7 +1889,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type, @@ -174,0 +119,31 @@ +diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c +index e342daabc4..5445b015d9 100644 +--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c ++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c +@@ -94,11 +94,11 @@ rte_cryptodev_pmd_create(const char *name, + struct rte_cryptodev *cryptodev; + + if (params->name[0] != '\0') { +- CDEV_LOG_INFO("User specified device name = %s\n", params->name); ++ CDEV_LOG_INFO("User specified device name = %s", params->name); + name = params->name; + } + +- CDEV_LOG_INFO("Creating cryptodev %s\n", name); ++ CDEV_LOG_INFO("Creating cryptodev %s", name); + + CDEV_LOG_INFO("Initialisation parameters - name: %s," + "socket id: %d, max queue pairs: %u", +diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h +index 6c46acf7c2..f35c66868f 100644 +--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h ++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h +@@ -541,7 +541,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess, + uint8_t driver_id, void *private_data) + { + if (unlikely(sess->nb_drivers <= driver_id)) { +- CDEV_LOG_ERR("Set private data for driver %u not allowed\n", ++ CDEV_LOG_ERR("Set private data for driver %u not allowed", + driver_id); + return; + } ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (55 preceding siblings ...) 2022-11-03 9:27 ` patch 'cryptodev: fix unduly newlines in logs' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-17 9:10 ` 答复: " Mao,Yingming 2022-11-03 9:27 ` patch 'net/bnxt: remove unnecessary check' " luca.boccassi ` (41 subsequent siblings) 98 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Mao YingMing; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0bf3f8ef0a20742340887646d41290ab8278ce34 Thanks. Luca Boccassi --- From 0bf3f8ef0a20742340887646d41290ab8278ce34 Mon Sep 17 00:00:00 2001 From: Mao YingMing <maoyingming@baidu.com> Date: Tue, 2 Aug 2022 12:08:17 +0800 Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config [ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 <rte_eth_devices>) 9: rte_eth_led_on (port_id=0) 8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true) 7: DpdkTRexPortAttr::DpdkTRexPortAttr 6: CTRexExtendedDriverBnxt::create_port_attr 5: CPhyEthIF::Create 4: CGlobalTRex::device_start 3: CGlobalTRex::Create 2: main_test 1: main Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation") Signed-off-by: Mao YingMing <maoyingming@baidu.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> --- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 8b50e44fcf..bdb76e44d7 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4409,7 +4409,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) uint16_t duration = 0; int rc, i; - if (!bp->leds->num_leds || BNXT_VF(bp)) + if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds) return -EOPNOTSUPP; HWRM_PREP(&req, HWRM_PORT_LED_CFG, BNXT_USE_CHIMP_MB); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.912610262 +0000 +++ 0058-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch 2022-11-03 09:27:25.469424299 +0000 @@ -1 +1 @@ -From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001 +From 0bf3f8ef0a20742340887646d41290ab8278ce34 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index 9c5257309a..51e1e2d6b3 100644 +index 8b50e44fcf..bdb76e44d7 100644 @@ -36 +37 @@ -@@ -4535,7 +4535,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) +@@ -4409,7 +4409,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) ^ permalink raw reply [flat|nested] 207+ messages in thread
* 答复: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 20.11.7 2022-11-03 9:27 ` patch 'net/bnxt: fix null pointer dereference in LED config' " luca.boccassi @ 2022-11-17 9:10 ` Mao,Yingming 0 siblings, 0 replies; 207+ messages in thread From: Mao,Yingming @ 2022-11-17 9:10 UTC (permalink / raw) To: luca.boccassi; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable Hi Luca, I had received your email in 2022/11/03. Sorry for late reply. I have tested the following patch base dpdk20.11.6, it works ok. https://github.com/kevintraynor/dpdk-stable/commit/d4774717275b47c291f8da09da17aea4deedd822 This patch should backport to dpdk 20.11. Please push it do dpdk LTS 20.11. This patch dose not need to be backported and does not apply to 19.11 Regards, Mao Yingming -----邮件原件----- 发件人: luca.boccassi@gmail.com <luca.boccassi@gmail.com> 发送时间: 2022年11月3日 17:27 收件人: Mao,Yingming <maoyingming@baidu.com> 抄送: Somnath Kotur <somnath.kotur@broadcom.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; dpdk stable <stable@dpdk.org> 主题: patch 'net/bnxt: fix null pointer dereference in LED config' has been queued to stable release 20.11.7 Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0bf3f8ef0a20742340887646d41290ab8278ce34 Thanks. Luca Boccassi --- From 0bf3f8ef0a20742340887646d41290ab8278ce34 Mon Sep 17 00:00:00 2001 From: Mao YingMing <maoyingming@baidu.com> Date: Tue, 2 Aug 2022 12:08:17 +0800 Subject: [PATCH] net/bnxt: fix null pointer dereference in LED config [ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] For VFs, bp->leds is uninitialized, check bp->leds is not null before checking for bp->leds->num_leds. segfault backtrace in trex program when use VF: 11: bnxt_hwrm_port_led_cfg (bp=0x23ffb2140, led_on=true) 10: bnxt_dev_led_on_op (dev=0x22d7780 <rte_eth_devices>) 9: rte_eth_led_on (port_id=0) 8: DpdkTRexPortAttr::set_led (this=0x23b6ce0, on=true) 7: DpdkTRexPortAttr::DpdkTRexPortAttr 6: CTRexExtendedDriverBnxt::create_port_attr 5: CPhyEthIF::Create 4: CGlobalTRex::device_start 3: CGlobalTRex::Create 2: main_test 1: main Fixes: d4d5a04 ("net/bnxt: fix unnecessary memory allocation") Signed-off-by: Mao YingMing <maoyingming@baidu.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> --- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 8b50e44fcf..bdb76e44d7 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -4409,7 +4409,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) uint16_t duration = 0; int rc, i; - if (!bp->leds->num_leds || BNXT_VF(bp)) + if (BNXT_VF(bp) || !bp->leds || !bp->leds->num_leds) return -EOPNOTSUPP; HWRM_PREP(&req, HWRM_PORT_LED_CFG, BNXT_USE_CHIMP_MB); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.912610262 +0000 +++ 0058-net-bnxt-fix-null-pointer-dereference-in-LED-config.patch 2022-11-03 09:27:25.469424299 +0000 @@ -1 +1 @@ -From 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 Mon Sep 17 00:00:00 2001 +From 0bf3f8ef0a20742340887646d41290ab8278ce34 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4bfb499829fa2bf216e38e56aa313c1dceef6ed5 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index 9c5257309a..51e1e2d6b3 100644 +index 8b50e44fcf..bdb76e44d7 100644 @@ -36 +37 @@ -@@ -4535,7 +4535,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on) +@@ -4409,7 +4409,7 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool +led_on) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bnxt: remove unnecessary check' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (56 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/bnxt: fix null pointer dereference in LED config' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix representor info freeing' " luca.boccassi ` (40 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f115c8ba75be98cb280c27d09569aeea5edb33ba Thanks. Luca Boccassi --- From f115c8ba75be98cb280c27d09569aeea5edb33ba Mon Sep 17 00:00:00 2001 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue, 27 Sep 2022 21:29:01 +0530 Subject: [PATCH] net/bnxt: remove unnecessary check [ upstream commit aaa44cb125ba43e543955831b6eba19c41c4fa87 ] We are not invoking rte_eth_switch_domain_free currently owing to an unnecessary check. This patch fixes that. Fixes: e2895305a5b5 ("net/bnxt: fix resource cleanup") Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> --- drivers/net/bnxt/bnxt_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 0ca79229e6..22b52188b8 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -5902,8 +5902,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) bnxt_uninit_ctx_mem(bp); bnxt_free_flow_stats_info(bp); - if (bp->rep_info != NULL) - bnxt_free_switch_domain(bp); + bnxt_free_switch_domain(bp); bnxt_free_rep_info(bp); rte_free(bp->ptp_cfg); bp->ptp_cfg = NULL; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:28.972337561 +0000 +++ 0059-net-bnxt-remove-unnecessary-check.patch 2022-11-03 09:27:25.473424377 +0000 @@ -1 +1 @@ -From aaa44cb125ba43e543955831b6eba19c41c4fa87 Mon Sep 17 00:00:00 2001 +From f115c8ba75be98cb280c27d09569aeea5edb33ba Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit aaa44cb125ba43e543955831b6eba19c41c4fa87 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index c4d863e3fe..2b5279f32c 100644 +index 0ca79229e6..22b52188b8 100644 @@ -23 +24 @@ -@@ -5977,8 +5977,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) +@@ -5902,8 +5902,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bnxt: fix representor info freeing' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (57 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/bnxt: remove unnecessary check' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix build with GCC 13' " luca.boccassi ` (39 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8a78fa6b597477fb827334da3017f442621e2710 Thanks. Luca Boccassi --- From 8a78fa6b597477fb827334da3017f442621e2710 Mon Sep 17 00:00:00 2001 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Tue, 27 Sep 2022 21:29:02 +0530 Subject: [PATCH] net/bnxt: fix representor info freeing [ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ] Driver allocates "bp->rep_info" inside bnxt_init_rep_info() which is invoked from bnxt_rep_port_probe(). But the memory is freed inside bnxt_uninit_resources(), which is wrong. As a result, after error recovery bp->rep_info will be NULL. The memory should have freed inside bnxt_drv_uninit() to maintain symmetry of calls. Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 22b52188b8..44056c9c4d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1611,6 +1611,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) bnxt_free_link_info(bp); bnxt_free_parent_info(bp); bnxt_uninit_locks(bp); + bnxt_free_rep_info(bp); rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone); bp->tx_mem_zone = NULL; @@ -5903,7 +5904,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) bnxt_free_flow_stats_info(bp); bnxt_free_switch_domain(bp); - bnxt_free_rep_info(bp); rte_free(bp->ptp_cfg); bp->ptp_cfg = NULL; return rc; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.027508578 +0000 +++ 0060-net-bnxt-fix-representor-info-freeing.patch 2022-11-03 09:27:25.477424454 +0000 @@ -1 +1 @@ -From 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 Mon Sep 17 00:00:00 2001 +From 8a78fa6b597477fb827334da3017f442621e2710 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5fdf25bd5531b3cb267201272c259ba4d0a32ca5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 2b5279f32c..3dfe9efc09 100644 +index 22b52188b8..44056c9c4d 100644 @@ -26 +27 @@ -@@ -1654,6 +1654,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) +@@ -1611,6 +1611,7 @@ static void bnxt_drv_uninit(struct bnxt *bp) @@ -34 +35 @@ -@@ -5978,7 +5979,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) +@@ -5903,7 +5904,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bnxt: fix build with GCC 13' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (58 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/bnxt: fix representor info freeing' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'mem: fix API doc about allocation on secondary processes' " luca.boccassi ` (38 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: David Marchand; +Cc: Ajit Khaparde, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2c7dd3db0baa82d682be5dc122931c17a66ae95d Thanks. Luca Boccassi --- From 2c7dd3db0baa82d682be5dc122931c17a66ae95d Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Mon, 3 Oct 2022 18:57:44 +0200 Subject: [PATCH] net/bnxt: fix build with GCC 13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit bb7e1f17a6f3419725d11184e68749298205a8dc ] GCC 13 complains with: ../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.c:962:1: error: conflicting types for ‘ulp_flow_db_flush_flows’ due to enum/integer mismatch; have ‘int32_t(struct bnxt_ulp_context *, enum bnxt_ulp_fdb_type)’ {aka ‘int(struct bnxt_ulp_context *, enum bnxt_ulp_fdb_type)’} [-Werror=enum-int-mismatch] 962 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx, | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.c:12: ../../../dpdk/drivers/net/bnxt/tf_ulp/ulp_flow_db.h:211:1: note: previous declaration of ‘ulp_flow_db_flush_flows’ with type ‘int32_t(struct bnxt_ulp_context *, uint32_t)’ {aka ‘int(struct bnxt_ulp_context *, unsigned int)’} 211 | ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx, | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: 30683082a8ed ("net/bnxt: combine default and regular flows") Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> --- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h index a2a04cef42..ce33f5da90 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.h +++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.h @@ -199,13 +199,13 @@ ulp_flow_db_resource_get(struct bnxt_ulp_context *ulp_ctxt, * Flush all flows in the flow database. * * ulp_ctxt [in] Ptr to ulp context - * tbl_idx [in] The index to table + * flow_type [in] - specify default or regular * * returns 0 on success or negative number on failure */ int32_t ulp_flow_db_flush_flows(struct bnxt_ulp_context *ulp_ctx, - uint32_t idx); + enum bnxt_ulp_fdb_type flow_type); /* * Flush all flows in the flow database that belong to a device function. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.090164878 +0000 +++ 0061-net-bnxt-fix-build-with-GCC-13.patch 2022-11-03 09:27:25.477424454 +0000 @@ -1 +1 @@ -From bb7e1f17a6f3419725d11184e68749298205a8dc Mon Sep 17 00:00:00 2001 +From 2c7dd3db0baa82d682be5dc122931c17a66ae95d Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit bb7e1f17a6f3419725d11184e68749298205a8dc ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index b27678dae9..2b02836a40 100644 +index a2a04cef42..ce33f5da90 100644 @@ -41 +42 @@ -@@ -203,13 +203,13 @@ ulp_flow_db_resource_get(struct bnxt_ulp_context *ulp_ctxt, +@@ -199,13 +199,13 @@ ulp_flow_db_resource_get(struct bnxt_ulp_context *ulp_ctxt, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'mem: fix API doc about allocation on secondary processes' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (59 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/bnxt: fix build with GCC 13' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'examples/vm_power_manager: use safe list iterator' " luca.boccassi ` (37 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Olivier Matz; +Cc: Honnappa Nagarahalli, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5e0e9abbdbcb495983405ffeb70d4fa98e759615 Thanks. Luca Boccassi --- From 5e0e9abbdbcb495983405ffeb70d4fa98e759615 Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:23:11 +0200 Subject: [PATCH] mem: fix API doc about allocation on secondary processes [ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ] Since 10 years, memzone allocation is allowed on secondary processes. Now it's time to update the documentation accordingly. At the same time, fix mempool, mbuf and ring documentation which rely on memzones internally. Bugzilla ID: 1074 Fixes: 916e4f4f4e45 ("memory: fix for multi process support") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> --- lib/librte_eal/include/rte_memzone.h | 3 --- lib/librte_mbuf/rte_mbuf.h | 3 --- lib/librte_mempool/rte_mempool.h | 1 - lib/librte_ring/rte_ring.h | 1 - lib/librte_ring/rte_ring_elem.h | 1 - 5 files changed, 9 deletions(-) diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h index 5db1210831..bb4223a056 100644 --- a/lib/librte_eal/include/rte_memzone.h +++ b/lib/librte_eal/include/rte_memzone.h @@ -118,7 +118,6 @@ struct rte_memzone { * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone @@ -184,7 +183,6 @@ const struct rte_memzone *rte_memzone_reserve(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone @@ -256,7 +254,6 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index bcd8b743a7..d0794623c6 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -685,7 +685,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists @@ -727,7 +726,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists @@ -781,7 +779,6 @@ struct rte_pktmbuf_extmem { * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 9c990a5593..7516d90824 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -993,7 +993,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index da17ed6d7c..937cfbb7a0 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -164,7 +164,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - count provided is not a power of 2 * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h index 0057da3597..b79ba5cb7f 100644 --- a/lib/librte_ring/rte_ring_elem.h +++ b/lib/librte_ring/rte_ring_elem.h @@ -95,7 +95,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - esize is not a multiple of 4 or count provided is not a * power of 2. * - ENOSPC - the maximum number of memzones has already been allocated -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.141810098 +0000 +++ 0062-mem-fix-API-doc-about-allocation-on-secondary-proces.patch 2022-11-03 09:27:25.481424532 +0000 @@ -1 +1 @@ -From d5262b521d096349e9e96b436f90eee6554ba595 Mon Sep 17 00:00:00 2001 +From 5e0e9abbdbcb495983405ffeb70d4fa98e759615 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d5262b521d096349e9e96b436f90eee6554ba595 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19,5 +20,5 @@ - lib/eal/include/rte_memzone.h | 3 --- - lib/mbuf/rte_mbuf.h | 3 --- - lib/mempool/rte_mempool.h | 1 - - lib/ring/rte_ring.h | 1 - - lib/ring/rte_ring_elem.h | 1 - + lib/librte_eal/include/rte_memzone.h | 3 --- + lib/librte_mbuf/rte_mbuf.h | 3 --- + lib/librte_mempool/rte_mempool.h | 1 - + lib/librte_ring/rte_ring.h | 1 - + lib/librte_ring/rte_ring_elem.h | 1 - @@ -26 +27 @@ -diff --git a/lib/eal/include/rte_memzone.h b/lib/eal/include/rte_memzone.h +diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h @@ -28,2 +29,2 @@ ---- a/lib/eal/include/rte_memzone.h -+++ b/lib/eal/include/rte_memzone.h +--- a/lib/librte_eal/include/rte_memzone.h ++++ b/lib/librte_eal/include/rte_memzone.h @@ -54,5 +55,5 @@ -diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h -index 9811e8c760..b6e23d98ce 100644 ---- a/lib/mbuf/rte_mbuf.h -+++ b/lib/mbuf/rte_mbuf.h -@@ -664,7 +664,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg); +diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h +index bcd8b743a7..d0794623c6 100644 +--- a/lib/librte_mbuf/rte_mbuf.h ++++ b/lib/librte_mbuf/rte_mbuf.h +@@ -685,7 +685,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg); @@ -66 +67 @@ -@@ -706,7 +705,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, +@@ -727,7 +726,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, @@ -74 +75 @@ -@@ -760,7 +758,6 @@ struct rte_pktmbuf_extmem { +@@ -781,7 +779,6 @@ struct rte_pktmbuf_extmem { @@ -82,5 +83,5 @@ -diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h -index a3c4ee351d..4c4af2a8ed 100644 ---- a/lib/mempool/rte_mempool.h -+++ b/lib/mempool/rte_mempool.h -@@ -1023,7 +1023,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); +diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h +index 9c990a5593..7516d90824 100644 +--- a/lib/librte_mempool/rte_mempool.h ++++ b/lib/librte_mempool/rte_mempool.h +@@ -993,7 +993,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); @@ -91 +92 @@ - * - EINVAL - cache size provided is too large or an unknown flag was passed + * - EINVAL - cache size provided is too large @@ -94,5 +95,5 @@ -diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h -index 980e92e594..7c48e35d27 100644 ---- a/lib/ring/rte_ring.h -+++ b/lib/ring/rte_ring.h -@@ -180,7 +180,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, +diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h +index da17ed6d7c..937cfbb7a0 100644 +--- a/lib/librte_ring/rte_ring.h ++++ b/lib/librte_ring/rte_ring.h +@@ -164,7 +164,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, @@ -106,5 +107,5 @@ -diff --git a/lib/ring/rte_ring_elem.h b/lib/ring/rte_ring_elem.h -index fb1edc9aad..7f7d4951d3 100644 ---- a/lib/ring/rte_ring_elem.h -+++ b/lib/ring/rte_ring_elem.h -@@ -96,7 +96,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); +diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h +index 0057da3597..b79ba5cb7f 100644 +--- a/lib/librte_ring/rte_ring_elem.h ++++ b/lib/librte_ring/rte_ring_elem.h +@@ -95,7 +95,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/vm_power_manager: use safe list iterator' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (60 preceding siblings ...) 2022-11-03 9:27 ` patch 'mem: fix API doc about allocation on secondary processes' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'gro: fix chain index for more than 2 packets' " luca.boccassi ` (36 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Hamza Khan; +Cc: Reshma Pattan, David Hunt, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6c758fb1b4e3c5c7b5e6f9044055d8b9b3402ef2 Thanks. Luca Boccassi --- From 6c758fb1b4e3c5c7b5e6f9044055d8b9b3402ef2 Mon Sep 17 00:00:00 2001 From: Hamza Khan <hamza.khan@intel.com> Date: Tue, 4 Oct 2022 23:09:04 +0100 Subject: [PATCH] examples/vm_power_manager: use safe list iterator [ upstream commit 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb ] Currently, when vm_power_manager exits, we are using a LIST_FOREACH macro to iterate over VM info structures while freeing them. This leads to use-after-free error. To address this, replace all usages of LIST_* with TAILQ_* macros, and use the RTE_TAILQ_FOREACH_SAFE macro to iterate and delete VM info structures. Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host") Signed-off-by: Hamza Khan <hamza.khan@intel.com> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Acked-by: David Hunt <david.hunt@intel.com> --- examples/vm_power_manager/channel_manager.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 0a28cb643b..5e0bbbb4c9 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -23,6 +23,7 @@ #include <rte_log.h> #include <rte_atomic.h> #include <rte_spinlock.h> +#include <rte_tailq.h> #include <libvirt/libvirt.h> @@ -59,16 +60,16 @@ struct virtual_machine_info { virDomainInfo info; rte_spinlock_t config_spinlock; int allow_query; - LIST_ENTRY(virtual_machine_info) vms_info; + RTE_TAILQ_ENTRY(virtual_machine_info) vms_info; }; -LIST_HEAD(, virtual_machine_info) vm_list_head; +RTE_TAILQ_HEAD(, virtual_machine_info) vm_list_head; static struct virtual_machine_info * find_domain_by_name(const char *name) { struct virtual_machine_info *info; - LIST_FOREACH(info, &vm_list_head, vms_info) { + RTE_TAILQ_FOREACH(info, &vm_list_head, vms_info) { if (!strncmp(info->name, name, CHANNEL_MGR_MAX_NAME_LEN-1)) return info; } @@ -877,7 +878,7 @@ add_vm(const char *vm_name) new_domain->allow_query = 0; rte_spinlock_init(&(new_domain->config_spinlock)); - LIST_INSERT_HEAD(&vm_list_head, new_domain, vms_info); + TAILQ_INSERT_HEAD(&vm_list_head, new_domain, vms_info); return 0; } @@ -899,7 +900,7 @@ remove_vm(const char *vm_name) rte_spinlock_unlock(&vm_info->config_spinlock); return -1; } - LIST_REMOVE(vm_info, vms_info); + TAILQ_REMOVE(&vm_list_head, vm_info, vms_info); rte_spinlock_unlock(&vm_info->config_spinlock); rte_free(vm_info); return 0; @@ -952,7 +953,7 @@ channel_manager_init(const char *path __rte_unused) { virNodeInfo info; - LIST_INIT(&vm_list_head); + TAILQ_INIT(&vm_list_head); if (connect_hypervisor(path) < 0) { global_n_host_cpus = 64; global_hypervisor_available = 0; @@ -1004,9 +1005,9 @@ channel_manager_exit(void) { unsigned i; char mask[RTE_MAX_LCORE]; - struct virtual_machine_info *vm_info; + struct virtual_machine_info *vm_info, *tmp; - LIST_FOREACH(vm_info, &vm_list_head, vms_info) { + RTE_TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) { rte_spinlock_lock(&(vm_info->config_spinlock)); @@ -1021,7 +1022,7 @@ channel_manager_exit(void) } rte_spinlock_unlock(&(vm_info->config_spinlock)); - LIST_REMOVE(vm_info, vms_info); + TAILQ_REMOVE(&vm_list_head, vm_info, vms_info); rte_free(vm_info); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.198316570 +0000 +++ 0063-examples-vm_power_manager-use-safe-list-iterator.patch 2022-11-03 09:27:25.485424608 +0000 @@ -1 +1 @@ -From 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb Mon Sep 17 00:00:00 2001 +From 6c758fb1b4e3c5c7b5e6f9044055d8b9b3402ef2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9c20d0fdc536df2a320cb1ae6cce49c2c7a02ebb ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 838465ab4b..7d7efdd05a 100644 +index 0a28cb643b..5e0bbbb4c9 100644 @@ -26,2 +27 @@ -@@ -22,6 +22,7 @@ - #include <rte_mempool.h> +@@ -23,6 +23,7 @@ @@ -28,0 +29 @@ + #include <rte_atomic.h> @@ -34 +35 @@ -@@ -58,16 +59,16 @@ struct virtual_machine_info { +@@ -59,16 +60,16 @@ struct virtual_machine_info { @@ -54 +55 @@ -@@ -878,7 +879,7 @@ add_vm(const char *vm_name) +@@ -877,7 +878,7 @@ add_vm(const char *vm_name) @@ -63 +64 @@ -@@ -900,7 +901,7 @@ remove_vm(const char *vm_name) +@@ -899,7 +900,7 @@ remove_vm(const char *vm_name) @@ -72 +73 @@ -@@ -953,7 +954,7 @@ channel_manager_init(const char *path __rte_unused) +@@ -952,7 +953,7 @@ channel_manager_init(const char *path __rte_unused) @@ -81 +82 @@ -@@ -1005,9 +1006,9 @@ channel_manager_exit(void) +@@ -1004,9 +1005,9 @@ channel_manager_exit(void) @@ -93 +94 @@ -@@ -1022,7 +1023,7 @@ channel_manager_exit(void) +@@ -1021,7 +1022,7 @@ channel_manager_exit(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'gro: fix chain index for more than 2 packets' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (61 preceding siblings ...) 2022-11-03 9:27 ` patch 'examples/vm_power_manager: use safe list iterator' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'timer: fix stopping all timers' " luca.boccassi ` (35 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Kumara Parameshwaran; +Cc: Jiayu Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/035126419d2ea15a9f548f68a58cb104c706459c Thanks. Luca Boccassi --- From 035126419d2ea15a9f548f68a58cb104c706459c Mon Sep 17 00:00:00 2001 From: Kumara Parameshwaran <kumaraparamesh92@gmail.com> Date: Wed, 7 Sep 2022 15:02:05 +0530 Subject: [PATCH] gro: fix chain index for more than 2 packets [ upstream commit bc4a7f7ee0281d96b8d93ac2771135a670b4a00f ] When more than two packets are merged in a flow, and if we receive a 3rd packet which is matching the sequence of the 2nd packet the prev_idx will be 1 and not 2, hence resulting in packet re-ordering Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com> Acked-by: Jiayu Hu <jiayu.hu@intel.com> --- lib/librte_gro/gro_tcp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c index feb5855144..5f3b3a82ce 100644 --- a/lib/librte_gro/gro_tcp4.c +++ b/lib/librte_gro/gro_tcp4.c @@ -306,7 +306,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, * length is greater than the max value. Store * the packet into the flow. */ - if (insert_new_item(tbl, pkt, start_time, prev_idx, + if (insert_new_item(tbl, pkt, start_time, cur_idx, sent_seq, ip_id, is_atomic) == INVALID_ARRAY_INDEX) return -1; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.252487859 +0000 +++ 0064-gro-fix-chain-index-for-more-than-2-packets.patch 2022-11-03 09:27:25.485424608 +0000 @@ -1 +1 @@ -From bc4a7f7ee0281d96b8d93ac2771135a670b4a00f Mon Sep 17 00:00:00 2001 +From 035126419d2ea15a9f548f68a58cb104c706459c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bc4a7f7ee0281d96b8d93ac2771135a670b4a00f ] + @@ -13 +15 @@ - lib/gro/gro_tcp4.c | 2 +- + lib/librte_gro/gro_tcp4.c | 2 +- @@ -16,5 +18,5 @@ -diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c -index 7498c66141..9758e28fd5 100644 ---- a/lib/gro/gro_tcp4.c -+++ b/lib/gro/gro_tcp4.c -@@ -305,7 +305,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, +diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c +index feb5855144..5f3b3a82ce 100644 +--- a/lib/librte_gro/gro_tcp4.c ++++ b/lib/librte_gro/gro_tcp4.c +@@ -306,7 +306,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'timer: fix stopping all timers' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (62 preceding siblings ...) 2022-11-03 9:27 ` patch 'gro: fix chain index for more than 2 packets' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'service: fix stats race condition for MT safe service' " luca.boccassi ` (34 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Naga Harish K S V; +Cc: Erik Gabriel Carrillo, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/75564c250f61a4ab069c6eb8b95a9f1206e5efc3 Thanks. Luca Boccassi --- From 75564c250f61a4ab069c6eb8b95a9f1206e5efc3 Mon Sep 17 00:00:00 2001 From: Naga Harish K S V <s.v.naga.harish.k@intel.com> Date: Wed, 14 Sep 2022 10:33:18 -0500 Subject: [PATCH] timer: fix stopping all timers [ upstream commit eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf ] There is a possibility of deadlock in this API, as same spinlock is tried to be acquired in nested manner. If the lcore that is stopping the timer is different from the lcore that owns the timer, the timer list lock is acquired in timer_del(), even if local_is_locked is true. Because the same lock was already acquired in rte_timer_stop_all(), the thread will hang. This patch removes the acquisition of nested lock. Fixes: 821c51267bcd63a ("timer: add function to stop all timers in a list") Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> --- lib/librte_timer/rte_timer.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 6d19ce469b..98c1941cb1 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -587,7 +587,7 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks, } static int -__rte_timer_stop(struct rte_timer *tim, int local_is_locked, +__rte_timer_stop(struct rte_timer *tim, struct rte_timer_data *timer_data) { union rte_timer_status prev_status, status; @@ -609,7 +609,7 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked, /* remove it from list */ if (prev_status.state == RTE_TIMER_PENDING) { - timer_del(tim, prev_status, local_is_locked, priv_timer); + timer_del(tim, prev_status, 0, priv_timer); __TIMER_STAT_ADD(priv_timer, pending, -1); } @@ -638,7 +638,7 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim) TIMER_DATA_VALID_GET_OR_ERR_RET(timer_data_id, timer_data, -EINVAL); - return __rte_timer_stop(tim, 0, timer_data); + return __rte_timer_stop(tim, timer_data); } /* loop until rte_timer_stop() succeed */ @@ -994,21 +994,16 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores, walk_lcore = walk_lcores[i]; priv_timer = &timer_data->priv_timer[walk_lcore]; - rte_spinlock_lock(&priv_timer->list_lock); - for (tim = priv_timer->pending_head.sl_next[0]; tim != NULL; tim = next_tim) { next_tim = tim->sl_next[0]; - /* Call timer_stop with lock held */ - __rte_timer_stop(tim, 1, timer_data); + __rte_timer_stop(tim, timer_data); if (f) f(tim, f_arg); } - - rte_spinlock_unlock(&priv_timer->list_lock); } return 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.301470562 +0000 +++ 0065-timer-fix-stopping-all-timers.patch 2022-11-03 09:27:25.485424608 +0000 @@ -1 +1 @@ -From eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf Mon Sep 17 00:00:00 2001 +From 75564c250f61a4ab069c6eb8b95a9f1206e5efc3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit eb63c85d7bae32fdc1cbafcd91e88bd6515c39cf ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - lib/timer/rte_timer.c | 13 ++++--------- + lib/librte_timer/rte_timer.c | 13 ++++--------- @@ -25,5 +26,5 @@ -diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c -index 9994813d0d..85d67573eb 100644 ---- a/lib/timer/rte_timer.c -+++ b/lib/timer/rte_timer.c -@@ -580,7 +580,7 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks, +diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c +index 6d19ce469b..98c1941cb1 100644 +--- a/lib/librte_timer/rte_timer.c ++++ b/lib/librte_timer/rte_timer.c +@@ -587,7 +587,7 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks, @@ -38 +39 @@ -@@ -602,7 +602,7 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked, +@@ -609,7 +609,7 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked, @@ -47 +48 @@ -@@ -631,7 +631,7 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim) +@@ -638,7 +638,7 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim) @@ -56 +57 @@ -@@ -987,21 +987,16 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores, +@@ -994,21 +994,16 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'service: fix stats race condition for MT safe service' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (63 preceding siblings ...) 2022-11-03 9:27 ` patch 'timer: fix stopping all timers' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/qede/base: fix 32-bit build with GCC 12' " luca.boccassi ` (33 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Harry van Haaren Cc: Mattias Rönnblom, Honnappa Nagarahalli, Morten Brørup, Bruce Richardson, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/027b9bcee35794f6cf27ad8399fbcbaf37d9b2c0 Thanks. Luca Boccassi --- From 027b9bcee35794f6cf27ad8399fbcbaf37d9b2c0 Mon Sep 17 00:00:00 2001 From: Harry van Haaren <harry.van.haaren@intel.com> Date: Mon, 11 Jul 2022 13:18:25 +0000 Subject: [PATCH] service: fix stats race condition for MT safe service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 99e4e840479ab44ffb35177e22c9999fec64b848 ] This commit fixes a potential racey-add that could occur if multiple service-lcores were executing the same MT-safe service at the same time, with service statistics collection enabled. Because multiple threads can run and execute the service, the stats values can have multiple writer threads, resulting in the requirement of using atomic addition for correctness. Note that when a MT unsafe service is executed, a spinlock is held, so the stats increments are protected. This fact is used to avoid executing atomic add instructions when not required. Regular reads and increments are used, and only the store is specified as atomic, reducing perf impact on e.g. x86 arch. This patch causes a 1.25x increase in cycle-cost for polling a MT safe service when statistics are enabled. No change was seen for MT unsafe services, or when statistics are disabled. Fixes: 21698354c832 ("service: introduce service cores concept") Reported-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Suggested-by: Morten Brørup <mb@smartsharesystems.com> Suggested-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> --- lib/librte_eal/common/rte_service.c | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index e76c2baffc..d5e3574ec7 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -56,10 +56,17 @@ struct rte_service_spec_impl { * on currently. */ uint32_t num_mapped_cores; - uint64_t calls; - uint64_t cycles_spent; + + /* 32-bit builds won't naturally align a uint64_t, so force alignment, + * allowing regular reads to be atomic. + */ + uint64_t calls __rte_aligned(8); + uint64_t cycles_spent __rte_aligned(8); } __rte_cache_aligned; +/* Mask used to ensure uint64_t 8 byte vars are naturally aligned. */ +#define RTE_SERVICE_STAT_ALIGN_MASK (8 - 1) + /* the internal values of a service core */ struct core_state { /* map of services IDs are run on this core */ @@ -365,13 +372,29 @@ service_runner_do_callback(struct rte_service_spec_impl *s, { void *userdata = s->spec.callback_userdata; + /* Ensure the atomically stored variables are naturally aligned, + * as required for regular loads to be atomic. + */ + RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, calls) + & RTE_SERVICE_STAT_ALIGN_MASK) != 0); + RTE_BUILD_BUG_ON((offsetof(struct rte_service_spec_impl, cycles_spent) + & RTE_SERVICE_STAT_ALIGN_MASK) != 0); + if (service_stats_enabled(s)) { uint64_t start = rte_rdtsc(); s->spec.callback(userdata); uint64_t end = rte_rdtsc(); - s->cycles_spent += end - start; + uint64_t cycles = end - start; cs->calls_per_service[service_idx]++; - s->calls++; + if (service_mt_safe(s)) { + __atomic_fetch_add(&s->cycles_spent, cycles, __ATOMIC_RELAXED); + __atomic_fetch_add(&s->calls, 1, __ATOMIC_RELAXED); + } else { + uint64_t cycles_new = s->cycles_spent + cycles; + uint64_t calls_new = s->calls++; + __atomic_store_n(&s->cycles_spent, cycles_new, __ATOMIC_RELAXED); + __atomic_store_n(&s->calls, calls_new, __ATOMIC_RELAXED); + } } else s->spec.callback(userdata); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.365045661 +0000 +++ 0066-service-fix-stats-race-condition-for-MT-safe-service.patch 2022-11-03 09:27:25.485424608 +0000 @@ -1 +1 @@ -From 99e4e840479ab44ffb35177e22c9999fec64b848 Mon Sep 17 00:00:00 2001 +From 027b9bcee35794f6cf27ad8399fbcbaf37d9b2c0 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 99e4e840479ab44ffb35177e22c9999fec64b848 ] + @@ -35 +37 @@ - lib/eal/common/rte_service.c | 31 +++++++++++++++++++++++++++---- + lib/librte_eal/common/rte_service.c | 31 +++++++++++++++++++++++++---- @@ -38,5 +40,5 @@ -diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c -index d2b7275ac0..94cb056196 100644 ---- a/lib/eal/common/rte_service.c -+++ b/lib/eal/common/rte_service.c -@@ -50,10 +50,17 @@ struct rte_service_spec_impl { +diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c +index e76c2baffc..d5e3574ec7 100644 +--- a/lib/librte_eal/common/rte_service.c ++++ b/lib/librte_eal/common/rte_service.c +@@ -56,10 +56,17 @@ struct rte_service_spec_impl { @@ -62 +64 @@ -@@ -359,13 +366,29 @@ service_runner_do_callback(struct rte_service_spec_impl *s, +@@ -365,13 +372,29 @@ service_runner_do_callback(struct rte_service_spec_impl *s, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/qede/base: fix 32-bit build with GCC 12' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (64 preceding siblings ...) 2022-11-03 9:27 ` patch 'service: fix stats race condition for MT safe service' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'test/service: fix spurious failures by extending timeout' " luca.boccassi ` (32 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Amit Prakash Shukla; +Cc: Thomas Monjalon, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/92baf3027ef00f49a994a068d39627b917996d37 Thanks. Luca Boccassi --- From 92baf3027ef00f49a994a068d39627b917996d37 Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla <amitprakashs@marvell.com> Date: Wed, 24 Aug 2022 19:33:39 +0530 Subject: [PATCH] net/qede/base: fix 32-bit build with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit acc0ed087cd1ce6464f63489ab17eca52b0c94b2 ] A pointer is passed to a macro and it seems mistakenly referenced. This issue is seen only when compiling with GCC 12 for 32-bit: drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25: error: array subscript 1 is outside array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds] 1418 | ecore_wr(dev, ptt, ((addr) + (4 * i)), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1419 | ((u32 *)&(arr))[i]); \ | ~~~~~~~~~~~~~~~~~~~ drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17: note: in expansion of macro ‘ARR_REG_WR’ 1465 | ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords); | ^~~~~~~~~~ drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35: note: at offset 4 into object ‘pData’ of size 4 1439 | u32 *pData, | ~~~~~^~~~~ Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0") Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> --- drivers/net/qede/base/ecore_init_fw_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/base/ecore_init_fw_funcs.c b/drivers/net/qede/base/ecore_init_fw_funcs.c index 6a52f32cc9..4e4d1dc374 100644 --- a/drivers/net/qede/base/ecore_init_fw_funcs.c +++ b/drivers/net/qede/base/ecore_init_fw_funcs.c @@ -1416,7 +1416,7 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn, u32 i; \ for (i = 0; i < (arr_size); i++) \ ecore_wr(dev, ptt, ((addr) + (4 * i)), \ - ((u32 *)&(arr))[i]); \ + ((u32 *)(arr))[i]); \ } while (0) #ifndef DWORDS_TO_BYTES -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.417471004 +0000 +++ 0067-net-qede-base-fix-32-bit-build-with-GCC-12.patch 2022-11-03 09:27:25.489424686 +0000 @@ -1 +1 @@ -From acc0ed087cd1ce6464f63489ab17eca52b0c94b2 Mon Sep 17 00:00:00 2001 +From 92baf3027ef00f49a994a068d39627b917996d37 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit acc0ed087cd1ce6464f63489ab17eca52b0c94b2 ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/service: fix spurious failures by extending timeout' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (65 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/qede/base: fix 32-bit build with GCC 12' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/tap: fix overflow of network interface index' " luca.boccassi ` (31 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Harry van Haaren Cc: David Marchand, Mattias Rönnblom, Morten Brørup, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/fa67204c3d10bb105b0a801a0601e26f0c255b19 Thanks. Luca Boccassi --- From fa67204c3d10bb105b0a801a0601e26f0c255b19 Mon Sep 17 00:00:00 2001 From: Harry van Haaren <harry.van.haaren@intel.com> Date: Thu, 6 Oct 2022 12:52:47 +0000 Subject: [PATCH] test/service: fix spurious failures by extending timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 6caffbb319ce8847696b9da1b05df8b631390835 ] This commit extends the timeout for service_may_be_active() from 100ms to 1000ms. Local testing on a idle and loaded system (compiling DPDK with all cores) always completes after 1 ms. The wait time for a service-lcore to finish is also extended from 100ms to 1000ms. The same timeout waiting code was duplicated in two tests, and is now refactored to a standalone function avoiding duplication. Reported-by: David Marchand <david.marchand@redhat.com> Suggested-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> --- app/test/test_service_cores.c | 49 ++++++++++++++++------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 0aee8c04e3..4f4f450df1 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -22,6 +22,7 @@ static uint64_t service_tick; static uint32_t service_remote_launch_flag; #define SERVICE_DELAY 1 +#define TIMEOUT_MS 1000 #define DUMMY_SERVICE_NAME "dummy_service" #define MT_SAFE_SERVICE_NAME "mt_safe_service" @@ -119,15 +120,15 @@ unregister_all(void) return TEST_SUCCESS; } -/* Wait until service lcore not active, or for 100x SERVICE_DELAY */ +/* Wait until service lcore not active, or for TIMEOUT_MS */ static void wait_slcore_inactive(uint32_t slcore_id) { int i; for (i = 0; rte_service_lcore_may_be_active(slcore_id) == 1 && - i < 100; i++) - rte_delay_ms(SERVICE_DELAY); + i < TIMEOUT_MS; i++) + rte_delay_ms(1); } /* register a single dummy service */ @@ -903,12 +904,25 @@ service_lcore_start_stop(void) return unregister_all(); } +static int +service_ensure_stopped_with_timeout(uint32_t sid) +{ + /* give the service time to stop running */ + int i; + for (i = 0; i < TIMEOUT_MS; i++) { + if (!rte_service_may_be_active(sid)) + break; + rte_delay_ms(1); + } + + return rte_service_may_be_active(sid); +} + /* stop a service and wait for it to become inactive */ static int service_may_be_active(void) { const uint32_t sid = 0; - int i; /* expected failure cases */ TEST_ASSERT_EQUAL(-EINVAL, rte_service_may_be_active(10000), @@ -928,19 +942,11 @@ service_may_be_active(void) TEST_ASSERT_EQUAL(1, service_lcore_running_check(), "Service core expected to poll service but it didn't"); - /* stop the service */ + /* stop the service, and wait for not-active with timeout */ TEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0), "Error: Service stop returned non-zero"); - - /* give the service 100ms to stop running */ - for (i = 0; i < 100; i++) { - if (!rte_service_may_be_active(sid)) - break; - rte_delay_ms(SERVICE_DELAY); - } - - TEST_ASSERT_EQUAL(0, rte_service_may_be_active(sid), - "Error: Service not stopped after 100ms"); + TEST_ASSERT_EQUAL(0, service_ensure_stopped_with_timeout(sid), + "Error: Service not stopped after timeout period."); return unregister_all(); } @@ -954,7 +960,6 @@ service_active_two_cores(void) return TEST_SKIPPED; const uint32_t sid = 0; - int i; uint32_t lcore = rte_get_next_lcore(/* start core */ -1, /* skip main */ 1, @@ -984,16 +989,8 @@ service_active_two_cores(void) /* stop the service */ TEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0), "Error: Service stop returned non-zero"); - - /* give the service 100ms to stop running */ - for (i = 0; i < 100; i++) { - if (!rte_service_may_be_active(sid)) - break; - rte_delay_ms(SERVICE_DELAY); - } - - TEST_ASSERT_EQUAL(0, rte_service_may_be_active(sid), - "Error: Service not stopped after 100ms"); + TEST_ASSERT_EQUAL(0, service_ensure_stopped_with_timeout(sid), + "Error: Service not stopped after timeout period."); return unregister_all(); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.483709777 +0000 +++ 0068-test-service-fix-spurious-failures-by-extending-time.patch 2022-11-03 09:27:25.489424686 +0000 @@ -1 +1 @@ -From 6caffbb319ce8847696b9da1b05df8b631390835 Mon Sep 17 00:00:00 2001 +From fa67204c3d10bb105b0a801a0601e26f0c255b19 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 6caffbb319ce8847696b9da1b05df8b631390835 ] + @@ -29 +31 @@ -index 359b6dcd8b..637fcd7cf9 100644 +index 0aee8c04e3..4f4f450df1 100644 @@ -40 +42 @@ -@@ -123,15 +124,15 @@ unregister_all(void) +@@ -119,15 +120,15 @@ unregister_all(void) @@ -59 +61 @@ -@@ -921,12 +922,25 @@ service_lcore_start_stop(void) +@@ -903,12 +904,25 @@ service_lcore_start_stop(void) @@ -86 +88 @@ -@@ -946,19 +960,11 @@ service_may_be_active(void) +@@ -928,19 +942,11 @@ service_may_be_active(void) @@ -109 +111 @@ -@@ -972,7 +978,6 @@ service_active_two_cores(void) +@@ -954,7 +960,6 @@ service_active_two_cores(void) @@ -117 +119 @@ -@@ -1002,16 +1007,8 @@ service_active_two_cores(void) +@@ -984,16 +989,8 @@ service_active_two_cores(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/tap: fix overflow of network interface index' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (66 preceding siblings ...) 2022-11-03 9:27 ` patch 'test/service: fix spurious failures by extending timeout' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " luca.boccassi ` (30 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Alex Kiselev; +Cc: Stephen Hemminger, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f221336cf997d828a3d7d3e68f23694b18a516f2 Thanks. Luca Boccassi --- From f221336cf997d828a3d7d3e68f23694b18a516f2 Mon Sep 17 00:00:00 2001 From: Alex Kiselev <alex@bisonrouter.com> Date: Thu, 21 Jul 2022 11:13:01 +0000 Subject: [PATCH] net/tap: fix overflow of network interface index [ upstream commit 8772bbfa717fdf3251b32ea48bdd21ddd6836dde ] On Linux and most other systems, network interface index is a 32-bit integer. Indexes overflowing the 16-bit integer are frequently seen when used inside a Docker container. Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API") Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture") Signed-off-by: Alex Kiselev <alex@bisonrouter.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/tap/tap_flow.c | 2 +- drivers/net/tap/tap_tcmsgs.c | 18 +++++++++--------- drivers/net/tap/tap_tcmsgs.h | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index 6e51b1c2a3..3141598742 100644 --- a/drivers/net/tap/tap_flow.c +++ b/drivers/net/tap/tap_flow.c @@ -1684,7 +1684,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd, struct rte_flow_item *items = implicit_rte_flows[idx].items; struct rte_flow_attr *attr = &implicit_rte_flows[idx].attr; struct rte_flow_item_eth eth_local = { .type = 0 }; - uint16_t if_index = pmd->remote_if_index; + unsigned int if_index = pmd->remote_if_index; struct rte_flow *remote_flow = NULL; struct nlmsg *msg = NULL; int err = 0; diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c index b478b5951e..a3aae3c814 100644 --- a/drivers/net/tap/tap_tcmsgs.c +++ b/drivers/net/tap/tap_tcmsgs.c @@ -19,7 +19,7 @@ struct qdisc { struct list_args { int nlsk_fd; - uint16_t ifindex; + unsigned int ifindex; void *custom_arg; }; @@ -42,7 +42,7 @@ struct qdisc_custom_arg { * Overrides the default netlink flags for this msg with those specified. */ void -tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type, uint16_t flags) +tc_init_msg(struct nlmsg *msg, unsigned int ifindex, uint16_t type, uint16_t flags) { struct nlmsghdr *n = &msg->nh; @@ -70,7 +70,7 @@ tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type, uint16_t flags) * 0 on success, -1 otherwise with errno set. */ static int -qdisc_del(int nlsk_fd, uint16_t ifindex, struct qdisc *qinfo) +qdisc_del(int nlsk_fd, unsigned int ifindex, struct qdisc *qinfo) { struct nlmsg msg; int fd = 0; @@ -114,7 +114,7 @@ error: * 0 on success, -1 otherwise with errno set. */ int -qdisc_add_multiq(int nlsk_fd, uint16_t ifindex) +qdisc_add_multiq(int nlsk_fd, unsigned int ifindex) { struct tc_multiq_qopt opt = {0}; struct nlmsg msg; @@ -144,7 +144,7 @@ qdisc_add_multiq(int nlsk_fd, uint16_t ifindex) * 0 on success, -1 otherwise with errno set. */ int -qdisc_add_ingress(int nlsk_fd, uint16_t ifindex) +qdisc_add_ingress(int nlsk_fd, unsigned int ifindex) { struct nlmsg msg; @@ -208,7 +208,7 @@ qdisc_del_cb(struct nlmsghdr *nh, void *arg) * 0 on success, -1 otherwise with errno set. */ static int -qdisc_iterate(int nlsk_fd, uint16_t ifindex, +qdisc_iterate(int nlsk_fd, unsigned int ifindex, int (*callback)(struct nlmsghdr *, void *), void *arg) { struct nlmsg msg; @@ -238,7 +238,7 @@ qdisc_iterate(int nlsk_fd, uint16_t ifindex, * 0 on success, -1 otherwise with errno set. */ int -qdisc_flush(int nlsk_fd, uint16_t ifindex) +qdisc_flush(int nlsk_fd, unsigned int ifindex) { return qdisc_iterate(nlsk_fd, ifindex, qdisc_del_cb, NULL); } @@ -256,7 +256,7 @@ qdisc_flush(int nlsk_fd, uint16_t ifindex) * Return -1 otherwise. */ int -qdisc_create_multiq(int nlsk_fd, uint16_t ifindex) +qdisc_create_multiq(int nlsk_fd, unsigned int ifindex) { int err = 0; @@ -282,7 +282,7 @@ qdisc_create_multiq(int nlsk_fd, uint16_t ifindex) * Return -1 otherwise. */ int -qdisc_create_ingress(int nlsk_fd, uint16_t ifindex) +qdisc_create_ingress(int nlsk_fd, unsigned int ifindex) { int err = 0; diff --git a/drivers/net/tap/tap_tcmsgs.h b/drivers/net/tap/tap_tcmsgs.h index 8cedea8462..a64cb29d6f 100644 --- a/drivers/net/tap/tap_tcmsgs.h +++ b/drivers/net/tap/tap_tcmsgs.h @@ -24,14 +24,14 @@ #define MULTIQ_MAJOR_HANDLE (1 << 16) -void tc_init_msg(struct nlmsg *msg, uint16_t ifindex, uint16_t type, +void tc_init_msg(struct nlmsg *msg, unsigned int ifindex, uint16_t type, uint16_t flags); -int qdisc_list(int nlsk_fd, uint16_t ifindex); -int qdisc_flush(int nlsk_fd, uint16_t ifindex); -int qdisc_create_ingress(int nlsk_fd, uint16_t ifindex); -int qdisc_create_multiq(int nlsk_fd, uint16_t ifindex); -int qdisc_add_ingress(int nlsk_fd, uint16_t ifindex); -int qdisc_add_multiq(int nlsk_fd, uint16_t ifindex); -int filter_list_ingress(int nlsk_fd, uint16_t ifindex); +int qdisc_list(int nlsk_fd, unsigned int ifindex); +int qdisc_flush(int nlsk_fd, unsigned int ifindex); +int qdisc_create_ingress(int nlsk_fd, unsigned int ifindex); +int qdisc_create_multiq(int nlsk_fd, unsigned int ifindex); +int qdisc_add_ingress(int nlsk_fd, unsigned int ifindex); +int qdisc_add_multiq(int nlsk_fd, unsigned int ifindex); +int filter_list_ingress(int nlsk_fd, unsigned int ifindex); #endif /* _TAP_TCMSGS_H_ */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.542645040 +0000 +++ 0069-net-tap-fix-overflow-of-network-interface-index.patch 2022-11-03 09:27:25.489424686 +0000 @@ -1 +1 @@ -From 8772bbfa717fdf3251b32ea48bdd21ddd6836dde Mon Sep 17 00:00:00 2001 +From f221336cf997d828a3d7d3e68f23694b18a516f2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8772bbfa717fdf3251b32ea48bdd21ddd6836dde ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index a9a55e439e..efe66fe059 100644 +index 6e51b1c2a3..3141598742 100644 @@ -26 +27 @@ -@@ -1682,7 +1682,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd, +@@ -1684,7 +1684,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/memif: fix crash with different number of Rx/Tx queues' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (67 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/tap: fix overflow of network interface index' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix code check warnings' " luca.boccassi ` (29 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huzaifa Rahman; +Cc: Joyce Kong, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1ec58a78f5873eee1c4c10016db03ec685b2a112 Thanks. Luca Boccassi --- From 1ec58a78f5873eee1c4c10016db03ec685b2a112 Mon Sep 17 00:00:00 2001 From: Huzaifa Rahman <huzaifa.rahman@emumba.com> Date: Tue, 26 Jul 2022 15:16:28 +0500 Subject: [PATCH] net/memif: fix crash with different number of Rx/Tx queues [ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ] There's a bug in memif_stats_get() function due to confusion between C2S (client->server) and S2C (server->client) rings, causing a crash if there's a different number of Rx and Tx queues. Fixit by selectiing the correct rings for Rx and Tx i.e for Rx, S2C rings are selected and for Tx, C2S rings are selected. Bugzilla ID: 734 Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Huzaifa Rahman <huzaifa.rahman@emumba.com> Reviewed-by: Joyce Kong <joyce.kong@arm.com> --- drivers/net/memif/rte_eth_memif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 642c44d4ac..ee5292cc2b 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1396,8 +1396,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->opackets = 0; stats->obytes = 0; - tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings : - pmd->run.num_s2c_rings; + tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings : + pmd->run.num_c2s_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; @@ -1410,8 +1410,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) stats->ibytes += mq->n_bytes; } - tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_s2c_rings : - pmd->run.num_c2s_rings; + tmp = (pmd->role == MEMIF_ROLE_CLIENT) ? pmd->run.num_c2s_rings : + pmd->run.num_s2c_rings; nq = (tmp < RTE_ETHDEV_QUEUE_STAT_CNTRS) ? tmp : RTE_ETHDEV_QUEUE_STAT_CNTRS; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.596082470 +0000 +++ 0070-net-memif-fix-crash-with-different-number-of-Rx-Tx-q.patch 2022-11-03 09:27:25.493424764 +0000 @@ -1 +1 @@ -From 231435a5e6c7fa915697d8f84a91b44176bba4d1 Mon Sep 17 00:00:00 2001 +From 1ec58a78f5873eee1c4c10016db03ec685b2a112 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 231435a5e6c7fa915697d8f84a91b44176bba4d1 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index a574bce49e..5b5cae34ea 100644 +index 642c44d4ac..ee5292cc2b 100644 @@ -27 +28 @@ -@@ -1444,8 +1444,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1396,8 +1396,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) @@ -38 +39 @@ -@@ -1458,8 +1458,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) +@@ -1410,8 +1410,8 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix code check warnings' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (68 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in SVE Tx' " luca.boccassi ` (28 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Min Hu (Connor); +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/57097e984cebe0d82dfa894bcc3b3231644fd7ec Thanks. Luca Boccassi --- From 57097e984cebe0d82dfa894bcc3b3231644fd7ec Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" <humin29@huawei.com> Date: Mon, 5 Sep 2022 16:59:28 +0800 Subject: [PATCH] net/hns3: fix code check warnings [ upstream commit 82c2ca6dddfd177b05d8e68cd20fe111f9cad6cc ] Fix code check warnings according to: - function should have same name with previous declaration; - local variable should no be referenced in macro referenced; - macro argument 'adapter' should be enclosed in parentheses. Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.h | 12 ++++++------ drivers/net/hns3/hns3_flow.c | 4 ++-- drivers/net/hns3/hns3_intr.c | 27 ++++++++++++--------------- drivers/net/hns3/hns3_intr.h | 4 ++-- drivers/net/hns3/hns3_rss.c | 2 +- drivers/net/hns3/hns3_rss.h | 2 +- drivers/net/hns3/hns3_rxtx.c | 4 ++-- drivers/net/hns3/hns3_rxtx.h | 14 +++++++++----- drivers/net/hns3/hns3_stats.h | 5 +++-- 9 files changed, 38 insertions(+), 36 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index de0084c352..fcea844037 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -810,9 +810,9 @@ struct hns3_adapter { hns3_get_bit((hw)->capability, HNS3_DEV_SUPPORT_STASH_B) #define HNS3_DEV_PRIVATE_TO_HW(adapter) \ - (&((struct hns3_adapter *)adapter)->hw) + (&((struct hns3_adapter *)(adapter))->hw) #define HNS3_DEV_PRIVATE_TO_PF(adapter) \ - (&((struct hns3_adapter *)adapter)->pf) + (&((struct hns3_adapter *)(adapter))->pf) #define HNS3_DEV_HW_TO_ADAPTER(hw) \ container_of(hw, struct hns3_adapter, hw) @@ -899,10 +899,10 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg) #define NEXT_ITEM_OF_ACTION(act, actions, index) \ do { \ - act = (actions) + (index); \ - while (act->type == RTE_FLOW_ACTION_TYPE_VOID) { \ + (act) = (actions) + (index); \ + while ((act)->type == RTE_FLOW_ACTION_TYPE_VOID) { \ (index)++; \ - act = actions + index; \ + (act) = (actions) + (index); \ } \ } while (0) @@ -934,7 +934,7 @@ hns3_atomic_clear_bit(unsigned int nr, volatile uint64_t *addr) __atomic_fetch_and(addr, ~(1UL << nr), __ATOMIC_RELAXED); } -static inline int64_t +static inline uint64_t hns3_test_and_clear_bit(unsigned int nr, volatile uint64_t *addr) { uint64_t mask = (1UL << nr); diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index a1acb0ebd5..c30a57d170 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -65,7 +65,7 @@ static enum rte_flow_item_type tunnel_next_items[] = { struct items_step_mngr { enum rte_flow_item_type *items; - int count; + size_t count; }; static inline void @@ -1120,7 +1120,7 @@ hns3_validate_item(const struct rte_flow_item *item, struct items_step_mngr step_mngr, struct rte_flow_error *error) { - int i; + uint32_t i; if (item->last) return rte_flow_error_set(error, ENOTSUP, diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 0fa21e4824..a54f23ea45 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -16,12 +16,6 @@ #define SWITCH_CONTEXT_US 10 -#define HNS3_CHECK_MERGE_CNT(val) \ - do { \ - if (val) \ - hw->reset.stats.merge_cnt++; \ - } while (0) - static const char *reset_string[HNS3_MAX_RESET] = { "none", "vf_func", "vf_pf_func", "vf_full", "flr", "vf_global", "pf_func", "global", "IMP", @@ -1890,20 +1884,20 @@ static void hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) { uint64_t merge_cnt = hw->reset.stats.merge_cnt; - int64_t tmp; + uint64_t tmp; switch (hw->reset.level) { case HNS3_IMP_RESET: hns3_atomic_clear_bit(HNS3_IMP_RESET, levels); tmp = hns3_test_and_clear_bit(HNS3_GLOBAL_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; tmp = hns3_test_and_clear_bit(HNS3_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; break; case HNS3_GLOBAL_RESET: hns3_atomic_clear_bit(HNS3_GLOBAL_RESET, levels); tmp = hns3_test_and_clear_bit(HNS3_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; break; case HNS3_FUNC_RESET: hns3_atomic_clear_bit(HNS3_FUNC_RESET, levels); @@ -1911,19 +1905,19 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) case HNS3_VF_RESET: hns3_atomic_clear_bit(HNS3_VF_RESET, levels); tmp = hns3_test_and_clear_bit(HNS3_VF_PF_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; tmp = hns3_test_and_clear_bit(HNS3_VF_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; break; case HNS3_VF_FULL_RESET: hns3_atomic_clear_bit(HNS3_VF_FULL_RESET, levels); tmp = hns3_test_and_clear_bit(HNS3_VF_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; break; case HNS3_VF_PF_FUNC_RESET: hns3_atomic_clear_bit(HNS3_VF_PF_FUNC_RESET, levels); tmp = hns3_test_and_clear_bit(HNS3_VF_FUNC_RESET, levels); - HNS3_CHECK_MERGE_CNT(tmp); + merge_cnt = tmp > 0 ? merge_cnt + 1 : merge_cnt; break; case HNS3_VF_FUNC_RESET: hns3_atomic_clear_bit(HNS3_VF_FUNC_RESET, levels); @@ -1935,13 +1929,16 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) default: return; }; - if (merge_cnt != hw->reset.stats.merge_cnt) + + if (merge_cnt != hw->reset.stats.merge_cnt) { hns3_warn(hw, "No need to do low-level reset after %s reset. " "merge cnt: %" PRIu64 " total merge cnt: %" PRIu64, reset_string[hw->reset.level], hw->reset.stats.merge_cnt - merge_cnt, hw->reset.stats.merge_cnt); + hw->reset.stats.merge_cnt = merge_cnt; + } } static bool diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h index 17bd0519c4..e705e5fe6b 100644 --- a/drivers/net/hns3/hns3_intr.h +++ b/drivers/net/hns3/hns3_intr.h @@ -98,7 +98,7 @@ struct hns3_hw_error_desc { const struct hns3_hw_error *hw_err; }; -int hns3_enable_hw_error_intr(struct hns3_adapter *hns, bool state); +int hns3_enable_hw_error_intr(struct hns3_adapter *hns, bool en); void hns3_handle_msix_error(struct hns3_adapter *hns, uint64_t *levels); void hns3_handle_ras_error(struct hns3_adapter *hns, uint64_t *levels); @@ -111,7 +111,7 @@ void hns3_schedule_reset(struct hns3_adapter *hns); void hns3_schedule_delayed_reset(struct hns3_adapter *hns); int hns3_reset_req_hw_reset(struct hns3_adapter *hns); int hns3_reset_process(struct hns3_adapter *hns, - enum hns3_reset_level reset_level); + enum hns3_reset_level new_level); void hns3_reset_abort(struct hns3_adapter *hns); #endif /* _HNS3_INTR_H_ */ diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 6a4ba26b7e..8da680050f 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -10,7 +10,7 @@ #include "hns3_logs.h" /* Default hash keys */ -const uint8_t hns3_hash_key[] = { +const uint8_t hns3_hash_key[HNS3_RSS_KEY_SIZE] = { 0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2, 0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0, 0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4, diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 7493292a1a..47dfda3d09 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -88,7 +88,7 @@ static inline uint32_t roundup_pow_of_two(uint32_t x) return 1UL << fls(x - 1); } -extern const uint8_t hns3_hash_key[]; +extern const uint8_t hns3_hash_key[HNS3_RSS_KEY_SIZE]; struct hns3_adapter; diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index a1f301c344..c5f5ed46a7 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2504,7 +2504,7 @@ hns3_rx_check_vec_support(__rte_unused struct rte_eth_dev *dev) } uint16_t __rte_weak -hns3_recv_pkts_vec(__rte_unused void *tx_queue, +hns3_recv_pkts_vec(__rte_unused void *rx_queue, __rte_unused struct rte_mbuf **rx_pkts, __rte_unused uint16_t nb_pkts) { @@ -2512,7 +2512,7 @@ hns3_recv_pkts_vec(__rte_unused void *tx_queue, } uint16_t __rte_weak -hns3_recv_pkts_vec_sve(__rte_unused void *tx_queue, +hns3_recv_pkts_vec_sve(__rte_unused void *rx_queue, __rte_unused struct rte_mbuf **rx_pkts, __rte_unused uint16_t nb_pkts) { diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index 73f613b17e..aa128a345a 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -627,10 +627,12 @@ int hns3_rxq_iterate(struct rte_eth_dev *dev, int (*callback)(struct hns3_rx_queue *, void *), void *arg); void hns3_dev_release_mbufs(struct hns3_adapter *hns); int hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, - unsigned int socket, const struct rte_eth_rxconf *conf, + unsigned int socket_id, + const struct rte_eth_rxconf *conf, struct rte_mempool *mp); int hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, - unsigned int socket, const struct rte_eth_txconf *conf); + unsigned int socket_id, + const struct rte_eth_txconf *conf); uint32_t hns3_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); int hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id); int hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id); @@ -640,9 +642,11 @@ uint16_t hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts); uint16_t hns3_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts); -uint16_t hns3_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, +uint16_t hns3_recv_pkts_vec(void *__restrict rx_queue, + struct rte_mbuf **__restrict rx_pkts, uint16_t nb_pkts); -uint16_t hns3_recv_pkts_vec_sve(void *rx_queue, struct rte_mbuf **rx_pkts, +uint16_t hns3_recv_pkts_vec_sve(void *__restrict rx_queue, + struct rte_mbuf **__restrict rx_pkts, uint16_t nb_pkts); int hns3_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, @@ -685,7 +689,7 @@ void hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo); void hns3_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo); -uint32_t hns3_get_tqp_reg_offset(uint16_t idx); +uint32_t hns3_get_tqp_reg_offset(uint16_t queue_id); int hns3_start_all_txqs(struct rte_eth_dev *dev); int hns3_start_all_rxqs(struct rte_eth_dev *dev); void hns3_stop_all_txqs(struct rte_eth_dev *dev); diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h index 436fac3b31..47dce14190 100644 --- a/drivers/net/hns3/hns3_stats.h +++ b/drivers/net/hns3/hns3_stats.h @@ -128,7 +128,8 @@ struct hns3_reset_stats; #define HNS3_TX_ERROR_STATS_FIELD_OFFSET(f) \ (offsetof(struct hns3_tx_queue, f)) -int hns3_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats); +int hns3_stats_get(struct rte_eth_dev *eth_dev, + struct rte_eth_stats *rte_stats); int hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, unsigned int n); int hns3_dev_xstats_reset(struct rte_eth_dev *dev); @@ -143,7 +144,7 @@ int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, const uint64_t *ids, uint32_t size); -int hns3_stats_reset(struct rte_eth_dev *dev); +int hns3_stats_reset(struct rte_eth_dev *eth_dev); void hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err); int hns3_tqp_stats_init(struct hns3_hw *hw); void hns3_tqp_stats_uninit(struct hns3_hw *hw); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.653242852 +0000 +++ 0071-net-hns3-fix-code-check-warnings.patch 2022-11-03 09:27:25.501424919 +0000 @@ -1 +1 @@ -From 82c2ca6dddfd177b05d8e68cd20fe111f9cad6cc Mon Sep 17 00:00:00 2001 +From 57097e984cebe0d82dfa894bcc3b3231644fd7ec Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 82c2ca6dddfd177b05d8e68cd20fe111f9cad6cc ] + @@ -14,3 +16 @@ - drivers/net/hns3/hns3_common.c | 4 ++-- - drivers/net/hns3/hns3_dump.c | 4 ++-- - drivers/net/hns3/hns3_ethdev.h | 14 +++++++------- + drivers/net/hns3/hns3_ethdev.h | 12 ++++++------ @@ -20 +19,0 @@ - drivers/net/hns3/hns3_regs.c | 4 ++-- @@ -26 +25 @@ - 12 files changed, 45 insertions(+), 43 deletions(-) + 9 files changed, 38 insertions(+), 36 deletions(-) @@ -28,44 +26,0 @@ -diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c -index e8e5aa2c86..e732f68238 100644 ---- a/drivers/net/hns3/hns3_common.c -+++ b/drivers/net/hns3/hns3_common.c -@@ -493,7 +493,7 @@ hns3_configure_all_mac_addr(struct hns3_adapter *hns, bool del) - if (ret) { - hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, - addr); -- hns3_err(hw, "failed to %s mac addr(%s) index:%d ret = %d.", -+ hns3_err(hw, "failed to %s mac addr(%s) index:%u ret = %d.", - del ? "remove" : "restore", mac_str, i, ret); - } - } -@@ -680,7 +680,7 @@ hns3_init_ring_with_vector(struct hns3_hw *hw) - ret = hw->ops.bind_ring_with_vector(hw, vec, false, - HNS3_RING_TYPE_TX, i); - if (ret) { -- PMD_INIT_LOG(ERR, "fail to unbind TX ring(%d) with vector: %u, ret=%d", -+ PMD_INIT_LOG(ERR, "fail to unbind TX ring(%u) with vector: %u, ret=%d", - i, vec, ret); - return ret; - } -diff --git a/drivers/net/hns3/hns3_dump.c b/drivers/net/hns3/hns3_dump.c -index 2cfab429af..1738d3cd4e 100644 ---- a/drivers/net/hns3/hns3_dump.c -+++ b/drivers/net/hns3/hns3_dump.c -@@ -342,7 +342,7 @@ static void - print_queue_state_perline(FILE *file, const uint32_t *queue_state, - uint32_t nb_queues, uint32_t line_num) - { --#define NUM_QUEUE_PER_LINE (sizeof(*queue_state) * CHAR_BIT) -+#define NUM_QUEUE_PER_LINE (sizeof(uint32_t) * HNS3_UINT8_BIT) - uint32_t qid = line_num * NUM_QUEUE_PER_LINE; - uint32_t j; - -@@ -365,7 +365,7 @@ static void - display_queue_enable_state(FILE *file, const uint32_t *queue_state, - uint32_t nb_queues, bool is_rxq) - { --#define NUM_QUEUE_PER_LINE (sizeof(*queue_state) * CHAR_BIT) -+#define NUM_QUEUE_PER_LINE (sizeof(uint32_t) * HNS3_UINT8_BIT) - uint32_t i; - - if (nb_queues == 0) { @@ -73 +28 @@ -index 8de5a712f4..bd5fc689f8 100644 +index de0084c352..fcea844037 100644 @@ -76,2 +31,2 @@ -@@ -898,11 +898,11 @@ enum hns3_dev_cap { - hns3_get_bit((hw)->capability, HNS3_DEV_SUPPORT_##_name##_B) +@@ -810,9 +810,9 @@ struct hns3_adapter { + hns3_get_bit((hw)->capability, HNS3_DEV_SUPPORT_STASH_B) @@ -85,3 +39,0 @@ - #define HNS3_DEV_PRIVATE_TO_VF(adapter) \ -- (&((struct hns3_adapter *)adapter)->vf) -+ (&((struct hns3_adapter *)(adapter))->vf) @@ -91 +43 @@ -@@ -999,10 +999,10 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg) +@@ -899,10 +899,10 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg) @@ -105 +57 @@ -@@ -1027,7 +1027,7 @@ hns3_atomic_clear_bit(unsigned int nr, volatile uint64_t *addr) +@@ -934,7 +934,7 @@ hns3_atomic_clear_bit(unsigned int nr, volatile uint64_t *addr) @@ -115 +67 @@ -index fb9354fe7f..b84f26c26c 100644 +index a1acb0ebd5..c30a57d170 100644 @@ -118 +70 @@ -@@ -66,7 +66,7 @@ static enum rte_flow_item_type tunnel_next_items[] = { +@@ -65,7 +65,7 @@ static enum rte_flow_item_type tunnel_next_items[] = { @@ -127 +79 @@ -@@ -1141,7 +1141,7 @@ hns3_validate_item(const struct rte_flow_item *item, +@@ -1120,7 +1120,7 @@ hns3_validate_item(const struct rte_flow_item *item, @@ -137 +89 @@ -index 3ca2e1e338..4bdcd6070b 100644 +index 0fa21e4824..a54f23ea45 100644 @@ -151,3 +103,3 @@ - "flr", "vf_func", "vf_pf_func", "vf_full", "vf_global", - "pf_func", "global", "IMP", "none", -@@ -2525,20 +2519,20 @@ static void + "none", "vf_func", "vf_pf_func", "vf_full", "flr", + "vf_global", "pf_func", "global", "IMP", +@@ -1890,20 +1884,20 @@ static void @@ -178 +130 @@ -@@ -2546,19 +2540,19 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) +@@ -1911,19 +1905,19 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) @@ -202 +154 @@ -@@ -2570,13 +2564,16 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) +@@ -1935,13 +1929,16 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels) @@ -221 +173 @@ -index 1a0f196614..1490a5e387 100644 +index 17bd0519c4..e705e5fe6b 100644 @@ -224 +176 @@ -@@ -170,7 +170,7 @@ struct hns3_hw_error_desc { +@@ -98,7 +98,7 @@ struct hns3_hw_error_desc { @@ -232,2 +184,2 @@ - void hns3_config_mac_tnl_int(struct hns3_hw *hw, bool en); -@@ -185,7 +185,7 @@ void hns3_schedule_reset(struct hns3_adapter *hns); + +@@ -111,7 +111,7 @@ void hns3_schedule_reset(struct hns3_adapter *hns); @@ -240,21 +191,0 @@ - void hns3_start_report_lse(struct rte_eth_dev *dev); - void hns3_stop_report_lse(struct rte_eth_dev *dev); -diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c -index 6778e4cfc2..33392fd1f0 100644 ---- a/drivers/net/hns3/hns3_regs.c -+++ b/drivers/net/hns3/hns3_regs.c -@@ -15,7 +15,7 @@ - #define REG_NUM_PER_LINE 4 - #define REG_LEN_PER_LINE (REG_NUM_PER_LINE * sizeof(uint32_t)) - --static int hns3_get_dfx_reg_line(struct hns3_hw *hw, uint32_t *length); -+static int hns3_get_dfx_reg_line(struct hns3_hw *hw, uint32_t *lines); - - static const uint32_t cmdq_reg_addrs[] = {HNS3_CMDQ_TX_ADDR_L_REG, - HNS3_CMDQ_TX_ADDR_H_REG, -@@ -295,7 +295,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data) - uint32_t *origin_data_ptr = data; - uint32_t reg_offset; - uint16_t i, j; -- int reg_num; -+ size_t reg_num; @@ -262,2 +193 @@ - /* fetching per-PF registers values from PF PCIe register space */ - reg_num = sizeof(cmdq_reg_addrs) / sizeof(uint32_t); + #endif /* _HNS3_INTR_H_ */ @@ -265 +195 @@ -index 1003daf03e..fc912ed2e8 100644 +index 6a4ba26b7e..8da680050f 100644 @@ -278 +208 @@ -index 56627cbd4c..39af01ef13 100644 +index 7493292a1a..47dfda3d09 100644 @@ -291 +221 @@ -index cd0c91f3a3..a6481bb68b 100644 +index a1f301c344..c5f5ed46a7 100644 @@ -294 +224 @@ -@@ -2759,7 +2759,7 @@ hns3_rx_check_vec_support(__rte_unused struct rte_eth_dev *dev) +@@ -2504,7 +2504,7 @@ hns3_rx_check_vec_support(__rte_unused struct rte_eth_dev *dev) @@ -303 +233 @@ -@@ -2767,7 +2767,7 @@ hns3_recv_pkts_vec(__rte_unused void *tx_queue, +@@ -2512,7 +2512,7 @@ hns3_recv_pkts_vec(__rte_unused void *tx_queue, @@ -313 +243 @@ -index 62efc854e4..455f8b9419 100644 +index 73f613b17e..aa128a345a 100644 @@ -316 +246 @@ -@@ -691,10 +691,12 @@ int hns3_rxq_iterate(struct rte_eth_dev *dev, +@@ -627,10 +627,12 @@ int hns3_rxq_iterate(struct rte_eth_dev *dev, @@ -328 +258 @@ - uint32_t hns3_rx_queue_count(void *rx_queue); + uint32_t hns3_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); @@ -331,2 +261,2 @@ -@@ -704,9 +706,11 @@ uint16_t hns3_recv_pkts_simple(void *rx_queue, struct rte_mbuf **rx_pkts, - uint16_t nb_pkts); +@@ -640,9 +642,11 @@ uint16_t hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); @@ -345 +275 @@ -@@ -751,7 +755,7 @@ void hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, +@@ -685,7 +689,7 @@ void hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, @@ -355 +285 @@ -index b5cd6188b4..9d84072205 100644 +index 436fac3b31..47dce14190 100644 @@ -358,3 +288,3 @@ -@@ -145,7 +145,8 @@ struct hns3_reset_stats; - #define HNS3_IMISSED_STATS_FIELD_OFFSET(f) \ - (offsetof(struct hns3_rx_missed_stats, f)) +@@ -128,7 +128,8 @@ struct hns3_reset_stats; + #define HNS3_TX_ERROR_STATS_FIELD_OFFSET(f) \ + (offsetof(struct hns3_tx_queue, f)) @@ -368,2 +298 @@ -@@ -160,7 +161,7 @@ int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, - const uint64_t *ids, +@@ -143,7 +144,7 @@ int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, @@ -370,0 +300 @@ + const uint64_t *ids, @@ -374,3 +304,3 @@ - int hns3_stats_init(struct hns3_hw *hw); - void hns3_stats_uninit(struct hns3_hw *hw); - int hns3_query_mac_stats_reg_num(struct hns3_hw *hw); + void hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err); + int hns3_tqp_stats_init(struct hns3_hw *hw); + void hns3_tqp_stats_uninit(struct hns3_hw *hw); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix next-to-use overflow in SVE Tx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (69 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix code check warnings' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in simple " luca.boccassi ` (27 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cf08ee6b1f4a9d442b078e84e72d06f672b7833a Thanks. Luca Boccassi --- From cf08ee6b1f4a9d442b078e84e72d06f672b7833a Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Mon, 5 Sep 2022 16:59:33 +0800 Subject: [PATCH] net/hns3: fix next-to-use overflow in SVE Tx [ upstream commit 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 ] If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using SVE xmit algorithm, the txq's next-to-use will equal nb_tx_desc after the xmit, this does not cause Tx exceptions, but may affect other ops that depend on this field, such as tx_descriptor_status. Fixes: f0c243a6cb6f ("net/hns3: support SVE Tx") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rxtx_vec_sve.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 67bf8ccdc5..e7446eb017 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -454,14 +454,16 @@ hns3_xmit_fixed_burst_vec_sve(void *__restrict tx_queue, return 0; } - if (txq->next_to_use + nb_pkts > txq->nb_tx_desc) { + if (txq->next_to_use + nb_pkts >= txq->nb_tx_desc) { nb_tx = txq->nb_tx_desc - txq->next_to_use; hns3_tx_fill_hw_ring_sve(txq, tx_pkts, nb_tx); txq->next_to_use = 0; } - hns3_tx_fill_hw_ring_sve(txq, tx_pkts + nb_tx, nb_pkts - nb_tx); - txq->next_to_use += nb_pkts - nb_tx; + if (nb_pkts > nb_tx) { + hns3_tx_fill_hw_ring_sve(txq, tx_pkts + nb_tx, nb_pkts - nb_tx); + txq->next_to_use += nb_pkts - nb_tx; + } txq->tx_bd_ready -= nb_pkts; hns3_write_reg_opt(txq->io_tail_reg, nb_pkts); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.718787706 +0000 +++ 0072-net-hns3-fix-next-to-use-overflow-in-SVE-Tx.patch 2022-11-03 09:27:25.501424919 +0000 @@ -1 +1 @@ -From 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 Mon Sep 17 00:00:00 2001 +From cf08ee6b1f4a9d442b078e84e72d06f672b7833a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3efbc3c4027c87c14727a6a5ce13b099cd8d5866 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index b0dfb052bb..f09a81dbd5 100644 +index 67bf8ccdc5..e7446eb017 100644 @@ -24 +25 @@ -@@ -464,14 +464,16 @@ hns3_xmit_fixed_burst_vec_sve(void *__restrict tx_queue, +@@ -454,14 +454,16 @@ hns3_xmit_fixed_burst_vec_sve(void *__restrict tx_queue, @@ -43 +44 @@ - hns3_write_txq_tail_reg(txq, nb_pkts); + hns3_write_reg_opt(txq->io_tail_reg, nb_pkts); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix next-to-use overflow in simple Tx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (70 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in SVE Tx' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: optimize SVE Tx performance' " luca.boccassi ` (26 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/19f514c65fdbaa94cf9e24ec0b9c05bbff342255 Thanks. Luca Boccassi --- From 19f514c65fdbaa94cf9e24ec0b9c05bbff342255 Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Mon, 5 Sep 2022 16:59:34 +0800 Subject: [PATCH] net/hns3: fix next-to-use overflow in simple Tx [ upstream commit 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 ] If txq's next-to-use plus nb_pkts equal txq's nb_tx_desc when using simple xmit algorithm, the txq's next-to-use will equal nb_tx_desc fter the xmit, this does not cause Tx exceptions, but may affect other ops that depend on this field, such as tx_descriptor_status. Fixes: 7ef933908f04 ("net/hns3: add simple Tx path") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index c5f5ed46a7..27f0fdbab2 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -3710,14 +3710,16 @@ hns3_xmit_pkts_simple(void *tx_queue, } txq->tx_bd_ready -= nb_pkts; - if (txq->next_to_use + nb_pkts > txq->nb_tx_desc) { + if (txq->next_to_use + nb_pkts >= txq->nb_tx_desc) { nb_tx = txq->nb_tx_desc - txq->next_to_use; hns3_tx_fill_hw_ring(txq, tx_pkts, nb_tx); txq->next_to_use = 0; } - hns3_tx_fill_hw_ring(txq, tx_pkts + nb_tx, nb_pkts - nb_tx); - txq->next_to_use += nb_pkts - nb_tx; + if (nb_pkts > nb_tx) { + hns3_tx_fill_hw_ring(txq, tx_pkts + nb_tx, nb_pkts - nb_tx); + txq->next_to_use += nb_pkts - nb_tx; + } hns3_write_reg_opt(txq->io_tail_reg, nb_pkts); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.780399340 +0000 +++ 0073-net-hns3-fix-next-to-use-overflow-in-simple-Tx.patch 2022-11-03 09:27:25.505424996 +0000 @@ -1 +1 @@ -From 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 Mon Sep 17 00:00:00 2001 +From 19f514c65fdbaa94cf9e24ec0b9c05bbff342255 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 76a9c980cf61d8ee21402d1d1d650d2f9d49cfb0 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index a6481bb68b..ecee5363b2 100644 +index c5f5ed46a7..27f0fdbab2 100644 @@ -24 +25 @@ -@@ -4126,14 +4126,16 @@ hns3_xmit_pkts_simple(void *tx_queue, +@@ -3710,14 +3710,16 @@ hns3_xmit_pkts_simple(void *tx_queue, @@ -42 +43 @@ - hns3_write_txq_tail_reg(txq, nb_pkts); + hns3_write_reg_opt(txq->io_tail_reg, nb_pkts); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: optimize SVE Tx performance' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (71 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in simple " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix crash when secondary process access FW' " luca.boccassi ` (25 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/af4494eb82d7da5ec8e219cf671cecc43ed45b1a Thanks. Luca Boccassi --- From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Mon, 5 Sep 2022 16:59:35 +0800 Subject: [PATCH] net/hns3: optimize SVE Tx performance [ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ] Optimize SVE xmit algorithm performance, will get about 1%+ performance gain under 64B macfwd. Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> --- drivers/net/hns3/hns3_rxtx_vec_sve.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index e7446eb017..888008d73f 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, HNS3_UINT32_BIT; svuint64_t base_addr, buf_iova, data_off, data_len, addr; svuint64_t offsets = svindex_u64(0, BD_SIZE); - uint32_t i = 0; - svbool_t pg = svwhilelt_b64_u32(i, nb_pkts); + uint32_t cnt = svcntd(); + svbool_t pg; + uint32_t i; - do { + for (i = 0; i < nb_pkts; /* i is updated in the inner loop */) { + pg = svwhilelt_b64_u32(i, nb_pkts); base_addr = svld1_u64(pg, (uint64_t *)pkts); /* calc mbuf's field buf_iova address */ buf_iova = svadd_n_u64_z(pg, base_addr, @@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, offsets, svdup_n_u64(valid_bit)); /* update index for next loop */ - i += svcntd(); - pkts += svcntd(); - txdp += svcntd(); - tx_entry += svcntd(); - pg = svwhilelt_b64_u32(i, nb_pkts); - } while (svptest_any(svptrue_b64(), pg)); + i += cnt; + pkts += cnt; + txdp += cnt; + tx_entry += cnt; + } } static uint16_t -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.847558960 +0000 +++ 0074-net-hns3-optimize-SVE-Tx-performance.patch 2022-11-03 09:27:25.505424996 +0000 @@ -1 +1 @@ -From 12590fc503e967df1e6e34667682fbb27aed5364 Mon Sep 17 00:00:00 2001 +From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ] + @@ -9,2 +10,0 @@ -Cc: stable@dpdk.org - @@ -17 +17 @@ -index f09a81dbd5..6f23ba674d 100644 +index e7446eb017..888008d73f 100644 @@ -20 +20 @@ -@@ -389,10 +389,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, +@@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, @@ -36,2 +36,2 @@ -@@ -439,12 +441,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, - (svaddv_u64(pg, data_len) >> HNS3_UINT16_BIT); +@@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, + offsets, svdup_n_u64(valid_bit)); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix crash when secondary process access FW' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (72 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: optimize SVE Tx performance' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: delete unused markup' " luca.boccassi ` (24 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/dfb7b1acec2b9889be3a263d5472180d41aae795 Thanks. Luca Boccassi --- From dfb7b1acec2b9889be3a263d5472180d41aae795 Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Mon, 5 Sep 2022 16:59:36 +0800 Subject: [PATCH] net/hns3: fix crash when secondary process access FW [ upstream commit a8f1f7cf1b429c3b95fa94f794f697a30f4c482d ] Currently, to prevent missing reporting of reset interrupts and quickly identify reset interrupts, the following logic is designed in the FW (firmware) command interface hns3_cmd_send: if an unprocessed interrupt exist (by checking reset registers), related reset task is scheduled. The secondary process may invoke the hns3_cmd_send interface (e.g. using proc-info query some stats). Unfortunately, the secondary process does not support reset processing, and a segment fault may occur if it schedules reset task. Fix it by limit the checking and scheduling of reset under only primary process. Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 10 +++++++++- drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 693b256ffb..eb075c8331 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5458,7 +5458,15 @@ hns3_is_reset_pending(struct hns3_adapter *hns) struct hns3_hw *hw = &hns->hw; enum hns3_reset_level reset; - hns3_check_event_cause(hns, NULL); + /* + * Check the registers to confirm whether there is reset pending. + * Note: This check may lead to schedule reset task, but only primary + * process can process the reset event. Therefore, limit the + * checking under only primary process. + */ + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + hns3_check_event_cause(hns, NULL); + reset = hns3_get_reset_level(hns, &hw->reset.pending); if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { hns3_warn(hw, "High level reset %d is pending", reset); diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index c1cf7a8c60..be6e37d4b4 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2316,8 +2316,15 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) if (hw->reset.level == HNS3_VF_FULL_RESET) return false; - /* Check the registers to confirm whether there is reset pending */ - hns3vf_check_event_cause(hns, NULL); + /* + * Check the registers to confirm whether there is reset pending. + * Note: This check may lead to schedule reset task, but only primary + * process can process the reset event. Therefore, limit the + * checking under only primary process. + */ + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + hns3vf_check_event_cause(hns, NULL); + reset = hns3vf_get_reset_level(hw, &hw->reset.pending); if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { hns3_warn(hw, "High level reset %d is pending", reset); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.899932084 +0000 +++ 0075-net-hns3-fix-crash-when-secondary-process-access-FW.patch 2022-11-03 09:27:25.513425150 +0000 @@ -1 +1 @@ -From a8f1f7cf1b429c3b95fa94f794f697a30f4c482d Mon Sep 17 00:00:00 2001 +From dfb7b1acec2b9889be3a263d5472180d41aae795 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a8f1f7cf1b429c3b95fa94f794f697a30f4c482d ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index 95d3c93c42..3d9f7c6ec7 100644 +index 693b256ffb..eb075c8331 100644 @@ -34 +35 @@ -@@ -5602,7 +5602,15 @@ hns3_is_reset_pending(struct hns3_adapter *hns) +@@ -5458,7 +5458,15 @@ hns3_is_reset_pending(struct hns3_adapter *hns) @@ -49,2 +50,2 @@ - if (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET && - hw->reset.level < reset) { + if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { + hns3_warn(hw, "High level reset %d is pending", reset); @@ -52 +53 @@ -index 86f2ba24cc..a72535eb7d 100644 +index c1cf7a8c60..be6e37d4b4 100644 @@ -55 +56 @@ -@@ -1864,8 +1864,15 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) +@@ -2316,8 +2316,15 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) @@ -71,2 +72,2 @@ - if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET && - hw->reset.level < reset) { + if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { + hns3_warn(hw, "High level reset %d is pending", reset); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: delete unused markup' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (73 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix crash when secondary process access FW' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix RSS filter restore' " luca.boccassi ` (23 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/824cd052ca391d5a3a30e6e02e075e919a4cfc27 Thanks. Luca Boccassi --- From 824cd052ca391d5a3a30e6e02e075e919a4cfc27 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Mon, 5 Sep 2022 16:59:37 +0800 Subject: [PATCH] net/hns3: delete unused markup [ upstream commit c05a540902b0e1661945775dc39b144a572c2404 ] The '__rte_unused' tag in the input parameter of 'hns3_mac_stats_reset' is redundant. This patch remove this tag. In addition, this function is aimed to clear MAC statics. So using 'struct hns3_hw' as input parameter is better than 'struct rte_eth_dev', and it also facilitates the call of this function. Fixes: 8839c5e202f3 ("net/hns3: support device stats") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_stats.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c index 3cb1e4cac1..6de3767c0b 100644 --- a/drivers/net/hns3/hns3_stats.c +++ b/drivers/net/hns3/hns3_stats.c @@ -427,15 +427,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw) return 0; } -static int -hns3_query_update_mac_stats(struct rte_eth_dev *dev) -{ - struct hns3_adapter *hns = dev->data->dev_private; - struct hns3_hw *hw = &hns->hw; - - return hns3_update_mac_stats(hw); -} - /* Get tqp stats from register */ static int hns3_update_tqp_stats(struct hns3_hw *hw) @@ -602,14 +593,13 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev) } static int -hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev) +hns3_mac_stats_reset(struct hns3_hw *hw) { - struct hns3_adapter *hns = dev->data->dev_private; - struct hns3_hw *hw = &hns->hw; struct hns3_mac_stats *mac_stats = &hw->mac_stats; int ret; - ret = hns3_query_update_mac_stats(dev); + /* Clear hardware MAC statistics by reading it. */ + ret = hns3_update_mac_stats(hw); if (ret) { hns3_err(hw, "Clear Mac stats fail : %d", ret); return ret; @@ -727,8 +717,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, count = 0; if (!hns->is_vf) { - /* Update Mac stats */ - ret = hns3_query_update_mac_stats(dev); + ret = hns3_update_mac_stats(hw); if (ret < 0) { hns3_err(hw, "Update Mac stats fail : %d", ret); return ret; @@ -1095,8 +1084,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev) if (hns->is_vf) return 0; - /* HW registers are cleared on read */ - ret = hns3_mac_stats_reset(dev); + ret = hns3_mac_stats_reset(&hns->hw); if (ret) return ret; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.965218149 +0000 +++ 0076-net-hns3-delete-unused-markup.patch 2022-11-03 09:27:25.513425150 +0000 @@ -1 +1 @@ -From c05a540902b0e1661945775dc39b144a572c2404 Mon Sep 17 00:00:00 2001 +From 824cd052ca391d5a3a30e6e02e075e919a4cfc27 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c05a540902b0e1661945775dc39b144a572c2404 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 4ec0911522..2ec7a9635e 100644 +index 3cb1e4cac1..6de3767c0b 100644 @@ -25 +26 @@ -@@ -406,15 +406,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw) +@@ -427,15 +427,6 @@ hns3_query_mac_stats_reg_num(struct hns3_hw *hw) @@ -37,0 +39 @@ + /* Get tqp stats from register */ @@ -39,3 +41,2 @@ - hns3_update_port_rpu_drop_stats(struct hns3_hw *hw) - { -@@ -763,14 +754,13 @@ out: + hns3_update_tqp_stats(struct hns3_hw *hw) +@@ -602,14 +593,13 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev) @@ -59,2 +60,2 @@ -@@ -1063,8 +1053,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, - hns3_tqp_basic_stats_get(dev, xstats, &count); +@@ -727,8 +717,7 @@ hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, + count = 0; @@ -68,2 +69,2 @@ - rte_spinlock_unlock(&hw->stats_lock); -@@ -1482,8 +1471,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev) + return ret; +@@ -1095,8 +1084,7 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev) @@ -71 +72 @@ - goto out; + return 0; @@ -75 +76,3 @@ -+ ret = hns3_mac_stats_reset(hw); ++ ret = hns3_mac_stats_reset(&hns->hw); + if (ret) + return ret; @@ -77,2 +79,0 @@ - out: - rte_spinlock_unlock(&hw->stats_lock); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix RSS filter restore' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (74 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: delete unused markup' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix lock protection of RSS flow rule' " luca.boccassi ` (22 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5a9558f9eb0d4647661562d218309d5e038627b4 Thanks. Luca Boccassi --- From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:03 +0800 Subject: [PATCH] net/hns3: fix RSS filter restore [ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ] Currently, driver sets RSS function to 'RTE_ETH_HASH_FUNCTION_MAX' when user flush all rules in order to judge whether driver needs to restore RSS rules. In fact, all rules are saved in flow RSS list. So there is no need to modify RSS function to this macro. And this list can be used to restore. The modification of RSS function may introduce new problem. Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_flow.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index c30a57d170..d1486175cc 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, rss_info->conf.queue_num = 0; } - /* set RSS func invalid after flushed */ - rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX; return 0; } @@ -1636,13 +1634,23 @@ int hns3_restore_rss_filter(struct rte_eth_dev *dev) { struct hns3_adapter *hns = dev->data->dev_private; + struct hns3_rss_conf_ele *filter; struct hns3_hw *hw = &hns->hw; + int ret = 0; - /* When user flush all rules, it doesn't need to restore RSS rule */ - if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX) - return 0; + TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) { + if (!filter->filter_info.valid) + continue; - return hns3_config_rss_filter(dev, &hw->rss_info, true); + ret = hns3_config_rss_filter(dev, &filter->filter_info, true); + if (ret != 0) { + hns3_err(hw, "restore RSS filter failed, ret=%d", ret); + goto out; + } + } + +out: + return ret; } static int -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.018779798 +0000 +++ 0077-net-hns3-fix-RSS-filter-restore.patch 2022-11-03 09:27:25.517425228 +0000 @@ -1 +1 @@ -From 705a50800334de0681f181d679ba746df4b61be0 Mon Sep 17 00:00:00 2001 +From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 4952d807b8..2fb83f756a 100644 +index c30a57d170..d1486175cc 100644 @@ -26 +27 @@ -@@ -1587,8 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, +@@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, @@ -35 +36 @@ -@@ -1659,13 +1657,23 @@ int +@@ -1636,13 +1634,23 @@ int ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix lock protection of RSS flow rule' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (75 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix RSS filter restore' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix RSS flow rule restore' " luca.boccassi ` (21 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3b9e0dd592b126d3939ef636ae7277e0d5f7f352 Thanks. Luca Boccassi --- From 3b9e0dd592b126d3939ef636ae7277e0d5f7f352 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:04 +0800 Subject: [PATCH] net/hns3: fix lock protection of RSS flow rule [ upstream commit a35799625e6849151f7d7bae312e300f8d5c2675 ] RSS flow rules are saved in RSS filter linked list. The linked list is modified by rte_flow API and is used to restore RSS rules during reset process. So this patch uses 'hw->flows_lock' to protect the configuration and recovery of RSS rule. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_flow.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index d1486175cc..6cb935cf0b 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1565,24 +1565,20 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, hns3_warn(hw, "Config queue numbers %u are beyond the scope of truncated", rss_flow_conf.queue_num); hns3_info(hw, "Max of contiguous %u PF queues are configured", num); - - rte_spinlock_lock(&hw->lock); if (num) { ret = hns3_update_indir_table(dev, &rss_flow_conf, num); if (ret) - goto rss_config_err; + return ret; } /* Set hash algorithm and flow types by the user's config */ ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf); if (ret) - goto rss_config_err; + return ret; ret = hns3_rss_conf_copy(rss_info, &rss_flow_conf); - if (ret) { + if (ret) hns3_err(hw, "RSS config init fail(%d)", ret); - goto rss_config_err; - } /* * When create a new RSS rule, the old rule will be overlaid and set @@ -1591,9 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, TAILQ_FOREACH(rss_filter_ptr, &hw->flow_rss_list, entries) rss_filter_ptr->filter_info.valid = false; -rss_config_err: - rte_spinlock_unlock(&hw->lock); - return ret; } @@ -1638,6 +1631,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) struct hns3_hw *hw = &hns->hw; int ret = 0; + pthread_mutex_lock(&hw->flows_lock); TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) { if (!filter->filter_info.valid) continue; @@ -1650,6 +1644,8 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) } out: + pthread_mutex_unlock(&hw->flows_lock); + return ret; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.070406727 +0000 +++ 0078-net-hns3-fix-lock-protection-of-RSS-flow-rule.patch 2022-11-03 09:27:25.517425228 +0000 @@ -1 +1 @@ -From a35799625e6849151f7d7bae312e300f8d5c2675 Mon Sep 17 00:00:00 2001 +From 3b9e0dd592b126d3939ef636ae7277e0d5f7f352 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a35799625e6849151f7d7bae312e300f8d5c2675 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 2fb83f756a..162a48e590 100644 +index d1486175cc..6cb935cf0b 100644 @@ -24 +25 @@ -@@ -1596,27 +1596,20 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, +@@ -1565,24 +1565,20 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, @@ -49 +50,7 @@ -- + + /* + * When create a new RSS rule, the old rule will be overlaid and set +@@ -1591,9 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, + TAILQ_FOREACH(rss_filter_ptr, &hw->flow_rss_list, entries) + rss_filter_ptr->filter_info.valid = false; + @@ -52 +59 @@ - +- @@ -55 +62,2 @@ -@@ -1661,6 +1654,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) + +@@ -1638,6 +1631,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) @@ -63 +71 @@ -@@ -1673,6 +1667,8 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) +@@ -1650,6 +1644,8 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix RSS flow rule restore' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (76 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix lock protection of RSS flow rule' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: move flow direction rule recovery' " luca.boccassi ` (20 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/10404a6eca91f66cef2b36f8a549984d916d2b59 Thanks. Luca Boccassi --- From 10404a6eca91f66cef2b36f8a549984d916d2b59 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:05 +0800 Subject: [PATCH] net/hns3: fix RSS flow rule restore [ upstream commit 43d8adf3891c3686d9a09a5e35897d3fb824fea8 ] After reset process, types of RSS flow rule cannot be restored when load driver without RTE_ETH_MQ_RX_RSS_FLAG flag. This is because the restoration for RSS flow rule is done in the 'hns3_config_rss()'. But this function is also used to configure and restore RSS configuration from ethdev ops, and doesn't configure RSS types if 'rxmode.mq_mode' has not the flag. As a result, RSS types configured by rte flow API can't be restored in this case when encounter reset. Actually, all RSS rules are saved to a global link list. Use the linked list to restore RSS flow rule. Fixes: 920be799dbc3 ("net/hns3: fix RSS indirection table configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 11 ++--------- drivers/net/hns3/hns3_ethdev_vf.c | 11 ++--------- drivers/net/hns3/hns3_flow.c | 8 +++++++- drivers/net/hns3/hns3_rss.h | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index eb075c8331..7ae9456664 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4890,6 +4890,7 @@ static int hns3_do_start(struct hns3_adapter *hns, bool reset_queue) { struct hns3_hw *hw = &hns->hw; + struct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id]; int ret; ret = hns3_update_queue_map_configure(hns); @@ -4910,7 +4911,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) PMD_INIT_LOG(ERR, "failed to enable MAC, ret = %d", ret); goto err_config_mac_mode; } - return 0; + return hns3_restore_filter(dev); err_config_mac_mode: hns3_dev_release_mbufs(hns); @@ -5018,12 +5019,6 @@ hns3_restore_rx_interrupt(struct hns3_hw *hw) return 0; } -static void -hns3_restore_filter(struct rte_eth_dev *dev) -{ - hns3_restore_rss_filter(dev); -} - static int hns3_dev_start(struct rte_eth_dev *dev) { @@ -5075,8 +5070,6 @@ hns3_dev_start(struct rte_eth_dev *dev) hns3_mp_req_start_rxtx(dev); rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, dev); - hns3_restore_filter(dev); - /* Enable interrupt of all rx queues before enabling queues */ hns3_dev_all_rx_queue_intr_enable(hw, true); diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index be6e37d4b4..d8739da89a 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2085,6 +2085,7 @@ static int hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) { struct hns3_hw *hw = &hns->hw; + struct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id]; uint16_t nb_rx_q = hw->data->nb_rx_queues; uint16_t nb_tx_q = hw->data->nb_tx_queues; int ret; @@ -2097,7 +2098,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) if (ret) hns3_err(hw, "failed to init queues, ret = %d.", ret); - return ret; + return hns3_restore_filter(dev); } static int @@ -2194,12 +2195,6 @@ hns3vf_restore_rx_interrupt(struct hns3_hw *hw) return 0; } -static void -hns3vf_restore_filter(struct rte_eth_dev *dev) -{ - hns3_restore_rss_filter(dev); -} - static int hns3vf_dev_start(struct rte_eth_dev *dev) { @@ -2250,8 +2245,6 @@ hns3vf_dev_start(struct rte_eth_dev *dev) hns3_mp_req_start_rxtx(dev); hns3vf_service_handler(dev); - hns3vf_restore_filter(dev); - /* Enable interrupt of all rx queues before enabling queues */ hns3_dev_all_rx_queue_intr_enable(hw, true); diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 6cb935cf0b..c71a22e6a6 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1623,7 +1623,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) return ret; } -int +static int hns3_restore_rss_filter(struct rte_eth_dev *dev) { struct hns3_adapter *hns = dev->data->dev_private; @@ -1649,6 +1649,12 @@ out: return ret; } +int +hns3_restore_filter(struct rte_eth_dev *dev) +{ + return hns3_restore_rss_filter(dev); +} + static int hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf, bool add) diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 47dfda3d09..b8ada8b07c 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -110,6 +110,6 @@ int hns3_config_rss(struct hns3_adapter *hns); void hns3_rss_uninit(struct hns3_adapter *hns); int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key); -int hns3_restore_rss_filter(struct rte_eth_dev *dev); +int hns3_restore_filter(struct rte_eth_dev *dev); #endif /* _HNS3_RSS_H_ */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.135420120 +0000 +++ 0079-net-hns3-fix-RSS-flow-rule-restore.patch 2022-11-03 09:27:25.525425383 +0000 @@ -1 +1 @@ -From 43d8adf3891c3686d9a09a5e35897d3fb824fea8 Mon Sep 17 00:00:00 2001 +From 10404a6eca91f66cef2b36f8a549984d916d2b59 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 43d8adf3891c3686d9a09a5e35897d3fb824fea8 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -26,3 +27,2 @@ - drivers/net/hns3/hns3_flow.h | 1 + - drivers/net/hns3/hns3_rss.h | 1 - - 5 files changed, 12 insertions(+), 20 deletions(-) + drivers/net/hns3/hns3_rss.h | 2 +- + 4 files changed, 12 insertions(+), 20 deletions(-) @@ -31 +31 @@ -index 3d9f7c6ec7..b0f69589d9 100644 +index eb075c8331..7ae9456664 100644 @@ -34 +34 @@ -@@ -5006,6 +5006,7 @@ static int +@@ -4890,6 +4890,7 @@ static int @@ -39 +38,0 @@ - bool link_en; @@ -42,4 +41,5 @@ -@@ -5042,7 +5043,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) - if (ret) - goto err_set_link_speed; - + ret = hns3_update_queue_map_configure(hns); +@@ -4910,7 +4911,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) + PMD_INIT_LOG(ERR, "failed to enable MAC, ret = %d", ret); + goto err_config_mac_mode; + } @@ -49,4 +49,4 @@ - err_set_link_speed: - (void)hns3_cfg_mac_mode(hw, false); -@@ -5059,12 +5060,6 @@ err_config_mac_mode: - return ret; + err_config_mac_mode: + hns3_dev_release_mbufs(hns); +@@ -5018,12 +5019,6 @@ hns3_restore_rx_interrupt(struct hns3_hw *hw) + return 0; @@ -64,2 +64 @@ -@@ -5121,8 +5116,6 @@ hns3_dev_start(struct rte_eth_dev *dev) - hns3_set_rxtx_function(dev); +@@ -5075,8 +5070,6 @@ hns3_dev_start(struct rte_eth_dev *dev) @@ -66,0 +66 @@ + rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, dev); @@ -74 +74 @@ -index a72535eb7d..bc8f5ecec2 100644 +index be6e37d4b4..d8739da89a 100644 @@ -77 +77 @@ -@@ -1727,6 +1727,7 @@ static int +@@ -2085,6 +2085,7 @@ static int @@ -85 +85 @@ -@@ -1741,13 +1742,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) +@@ -2097,7 +2098,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) @@ -90,2 +90,8 @@ --} -- ++ return hns3_restore_filter(dev); + } + + static int +@@ -2194,12 +2195,6 @@ hns3vf_restore_rx_interrupt(struct hns3_hw *hw) + return 0; + } + @@ -96,3 +102,2 @@ -+ return hns3_restore_filter(dev); - } - +-} +- @@ -100,2 +105,3 @@ -@@ -1799,8 +1794,6 @@ hns3vf_dev_start(struct rte_eth_dev *dev) - hns3_set_rxtx_function(dev); + hns3vf_dev_start(struct rte_eth_dev *dev) + { +@@ -2250,8 +2245,6 @@ hns3vf_dev_start(struct rte_eth_dev *dev) @@ -102,0 +109 @@ + hns3vf_service_handler(dev); @@ -108 +115 @@ - hns3_start_tqps(hw); + @@ -110 +117 @@ -index 162a48e590..08fa6da7bb 100644 +index 6cb935cf0b..c71a22e6a6 100644 @@ -113 +120 @@ -@@ -1646,7 +1646,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) +@@ -1623,7 +1623,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) @@ -122 +129 @@ -@@ -1672,6 +1672,12 @@ out: +@@ -1649,6 +1649,12 @@ out: @@ -135,11 +141,0 @@ -diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h -index 1ab3f9f5c6..0f5de129a3 100644 ---- a/drivers/net/hns3/hns3_flow.h -+++ b/drivers/net/hns3/hns3_flow.h -@@ -49,5 +49,6 @@ int hns3_dev_flow_ops_get(struct rte_eth_dev *dev, - const struct rte_flow_ops **ops); - void hns3_flow_init(struct rte_eth_dev *dev); - void hns3_flow_uninit(struct rte_eth_dev *dev); -+int hns3_restore_filter(struct rte_eth_dev *dev); - - #endif /* _HNS3_FLOW_H_ */ @@ -147 +143 @@ -index 39af01ef13..1589c67c59 100644 +index 47dfda3d09..b8ada8b07c 100644 @@ -150 +146 @@ -@@ -110,6 +110,5 @@ int hns3_config_rss(struct hns3_adapter *hns); +@@ -110,6 +110,6 @@ int hns3_config_rss(struct hns3_adapter *hns); @@ -153 +149 @@ - int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key); + int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key); @@ -154,0 +151 @@ ++int hns3_restore_filter(struct rte_eth_dev *dev); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: move flow direction rule recovery' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (77 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix RSS flow rule restore' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix restore filter function input' " luca.boccassi ` (19 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1edc00899d3163b01ffefea8d658c79581aab9e3 Thanks. Luca Boccassi --- From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:06 +0800 Subject: [PATCH] net/hns3: move flow direction rule recovery [ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ] The 'hns3_restore_filter' is used to restore flow rules from rte_flow API during the reset process. This patch moves the recovery of flow direction rule to this function to improve code maintainability. Fixes: fcba820d9b9e ("net/hns3: support flow director") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 4 ---- drivers/net/hns3/hns3_fdir.c | 3 +++ drivers/net/hns3/hns3_flow.c | 7 +++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 7ae9456664..33b10539e0 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns) if (ret) goto err_promisc; - ret = hns3_restore_all_fdir_filter(hns); - if (ret) - goto err_promisc; - ret = hns3_restore_rx_interrupt(hw); if (ret) goto err_promisc; diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 4e1667d2f8..f210c8b1e4 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) bool err = false; int ret; + if (hns->is_vf) + return 0; + /* * This API is called in the reset recovery process, the parent function * must hold hw->lock. diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index c71a22e6a6..ffdd131d15 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1652,6 +1652,13 @@ out: int hns3_restore_filter(struct rte_eth_dev *dev) { + struct hns3_adapter *hns = dev->data->dev_private; + int ret; + + ret = hns3_restore_all_fdir_filter(hns); + if (ret != 0) + return ret; + return hns3_restore_rss_filter(dev); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.199595860 +0000 +++ 0080-net-hns3-move-flow-direction-rule-recovery.patch 2022-11-03 09:27:25.529425461 +0000 @@ -1 +1 @@ -From 860ed8516afe49e61c537e19c1016f70b9a84fd2 Mon Sep 17 00:00:00 2001 +From 1edc00899d3163b01ffefea8d658c79581aab9e3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 860ed8516afe49e61c537e19c1016f70b9a84fd2 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index b0f69589d9..15d622a900 100644 +index 7ae9456664..33b10539e0 100644 @@ -26 +27 @@ -@@ -5907,10 +5907,6 @@ hns3_restore_conf(struct hns3_adapter *hns) +@@ -5753,10 +5753,6 @@ hns3_restore_conf(struct hns3_adapter *hns) @@ -34 +35 @@ - ret = hns3_restore_ptp(hns); + ret = hns3_restore_rx_interrupt(hw); @@ -38 +39 @@ -index 30e5e66772..48a91fb517 100644 +index 4e1667d2f8..f210c8b1e4 100644 @@ -41 +42 @@ -@@ -1068,6 +1068,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) +@@ -1056,6 +1056,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns) @@ -52 +53 @@ -index 08fa6da7bb..dd61ecd2aa 100644 +index c71a22e6a6..ffdd131d15 100644 @@ -55 +56 @@ -@@ -1675,6 +1675,13 @@ out: +@@ -1652,6 +1652,13 @@ out: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix restore filter function input' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (78 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: move flow direction rule recovery' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix build with gcov' " luca.boccassi ` (18 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4bd8b93920d55c80804c5d017897772ee880ee87 Thanks. Luca Boccassi --- From 4bd8b93920d55c80804c5d017897772ee880ee87 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:07 +0800 Subject: [PATCH] net/hns3: fix restore filter function input [ upstream commit 1042ed401f3d19efb499ef832eb3c48f77dac13f ] This 'hns3_restore_filter' is an internal interface of driver. Currently, it uses 'struct rte_eth_dev *dev' as input parameter, This is inconvenient for the function to call in driver because caller has to obtain its device address by global variable 'rte_eth_devices[]'. Fix the input of this function. Fixes: 920be799dbc3 ("net/hns3: fix RSS indirection table configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 3 +-- drivers/net/hns3/hns3_ethdev_vf.c | 3 +-- drivers/net/hns3/hns3_flow.c | 30 ++++++++++++------------------ drivers/net/hns3/hns3_rss.h | 2 +- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 33b10539e0..500de265c4 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4890,7 +4890,6 @@ static int hns3_do_start(struct hns3_adapter *hns, bool reset_queue) { struct hns3_hw *hw = &hns->hw; - struct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id]; int ret; ret = hns3_update_queue_map_configure(hns); @@ -4911,7 +4910,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) PMD_INIT_LOG(ERR, "failed to enable MAC, ret = %d", ret); goto err_config_mac_mode; } - return hns3_restore_filter(dev); + return hns3_restore_filter(hns); err_config_mac_mode: hns3_dev_release_mbufs(hns); diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index d8739da89a..17dbf48576 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2085,7 +2085,6 @@ static int hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) { struct hns3_hw *hw = &hns->hw; - struct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id]; uint16_t nb_rx_q = hw->data->nb_rx_queues; uint16_t nb_tx_q = hw->data->nb_tx_queues; int ret; @@ -2098,7 +2097,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) if (ret) hns3_err(hw, "failed to init queues, ret = %d.", ret); - return hns3_restore_filter(dev); + return hns3_restore_filter(hns); } static int diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index ffdd131d15..b1317d7311 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1476,11 +1476,9 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) } static int -hns3_update_indir_table(struct rte_eth_dev *dev, +hns3_update_indir_table(struct hns3_hw *hw, const struct rte_flow_action_rss *conf, uint16_t num) { - struct hns3_adapter *hns = dev->data->dev_private; - struct hns3_hw *hw = &hns->hw; uint16_t indir_tbl[HNS3_RSS_IND_TBL_SIZE_MAX]; uint16_t j; uint32_t i; @@ -1503,12 +1501,10 @@ hns3_update_indir_table(struct rte_eth_dev *dev, } static int -hns3_config_rss_filter(struct rte_eth_dev *dev, +hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf, bool add) { - struct hns3_adapter *hns = dev->data->dev_private; struct hns3_rss_conf_ele *rss_filter_ptr; - struct hns3_hw *hw = &hns->hw; struct hns3_rss_conf *rss_info; uint64_t flow_types; uint16_t num; @@ -1560,13 +1556,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, } /* Set rx queues to use */ - num = RTE_MIN(dev->data->nb_rx_queues, rss_flow_conf.queue_num); + num = RTE_MIN(hw->data->nb_rx_queues, rss_flow_conf.queue_num); if (rss_flow_conf.queue_num > num) hns3_warn(hw, "Config queue numbers %u are beyond the scope of truncated", rss_flow_conf.queue_num); hns3_info(hw, "Max of contiguous %u PF queues are configured", num); if (num) { - ret = hns3_update_indir_table(dev, &rss_flow_conf, num); + ret = hns3_update_indir_table(hw, &rss_flow_conf, num); if (ret) return ret; } @@ -1603,7 +1599,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list); while (rss_filter_ptr) { TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries); - ret = hns3_config_rss_filter(dev, &rss_filter_ptr->filter_info, + ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, false); if (ret) rss_rule_fail_cnt++; @@ -1624,11 +1620,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) } static int -hns3_restore_rss_filter(struct rte_eth_dev *dev) +hns3_restore_rss_filter(struct hns3_hw *hw) { - struct hns3_adapter *hns = dev->data->dev_private; struct hns3_rss_conf_ele *filter; - struct hns3_hw *hw = &hns->hw; int ret = 0; pthread_mutex_lock(&hw->flows_lock); @@ -1636,7 +1630,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) if (!filter->filter_info.valid) continue; - ret = hns3_config_rss_filter(dev, &filter->filter_info, true); + ret = hns3_config_rss_filter(hw, &filter->filter_info, true); if (ret != 0) { hns3_err(hw, "restore RSS filter failed, ret=%d", ret); goto out; @@ -1650,16 +1644,16 @@ out: } int -hns3_restore_filter(struct rte_eth_dev *dev) +hns3_restore_filter(struct hns3_adapter *hns) { - struct hns3_adapter *hns = dev->data->dev_private; + struct hns3_hw *hw = &hns->hw; int ret; ret = hns3_restore_all_fdir_filter(hns); if (ret != 0) return ret; - return hns3_restore_rss_filter(dev); + return hns3_restore_rss_filter(hw); } static int @@ -1676,7 +1670,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, return -EINVAL; } - return hns3_config_rss_filter(dev, conf, add); + return hns3_config_rss_filter(hw, conf, add); } static int @@ -1887,7 +1881,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, break; case RTE_ETH_FILTER_HASH: rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule; - ret = hns3_config_rss_filter(dev, &rss_filter_ptr->filter_info, + ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, false); if (ret) return rte_flow_error_set(error, EIO, diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index b8ada8b07c..4fe7363916 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -110,6 +110,6 @@ int hns3_config_rss(struct hns3_adapter *hns); void hns3_rss_uninit(struct hns3_adapter *hns); int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key); -int hns3_restore_filter(struct rte_eth_dev *dev); +int hns3_restore_filter(struct hns3_adapter *hns); #endif /* _HNS3_RSS_H_ */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.263781968 +0000 +++ 0081-net-hns3-fix-restore-filter-function-input.patch 2022-11-03 09:27:25.533425537 +0000 @@ -1 +1 @@ -From 1042ed401f3d19efb499ef832eb3c48f77dac13f Mon Sep 17 00:00:00 2001 +From 4bd8b93920d55c80804c5d017897772ee880ee87 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1042ed401f3d19efb499ef832eb3c48f77dac13f ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ - drivers/net/hns3/hns3_flow.h | 2 +- + drivers/net/hns3/hns3_rss.h | 2 +- @@ -25 +26 @@ -index 15d622a900..330a913cb8 100644 +index 33b10539e0..500de265c4 100644 @@ -28 +29 @@ -@@ -5006,7 +5006,6 @@ static int +@@ -4890,7 +4890,6 @@ static int @@ -33 +33,0 @@ - bool link_en; @@ -36,4 +36,5 @@ -@@ -5043,7 +5042,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) - if (ret) - goto err_set_link_speed; - + ret = hns3_update_queue_map_configure(hns); +@@ -4911,7 +4910,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) + PMD_INIT_LOG(ERR, "failed to enable MAC, ret = %d", ret); + goto err_config_mac_mode; + } @@ -43,2 +44,2 @@ - err_set_link_speed: - (void)hns3_cfg_mac_mode(hw, false); + err_config_mac_mode: + hns3_dev_release_mbufs(hns); @@ -46 +47 @@ -index bc8f5ecec2..446a0cdbc7 100644 +index d8739da89a..17dbf48576 100644 @@ -49 +50 @@ -@@ -1727,7 +1727,6 @@ static int +@@ -2085,7 +2085,6 @@ static int @@ -57 +58 @@ -@@ -1742,7 +1741,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) +@@ -2098,7 +2097,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) @@ -67 +68 @@ -index dd61ecd2aa..a2c1589c39 100644 +index ffdd131d15..b1317d7311 100644 @@ -70 +71 @@ -@@ -1508,11 +1508,9 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) +@@ -1476,11 +1476,9 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) @@ -83 +84 @@ -@@ -1535,11 +1533,9 @@ hns3_update_indir_table(struct rte_eth_dev *dev, +@@ -1503,12 +1501,10 @@ hns3_update_indir_table(struct rte_eth_dev *dev, @@ -91,0 +93 @@ + struct hns3_rss_conf_ele *rss_filter_ptr; @@ -96 +98 @@ -@@ -1591,13 +1587,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, +@@ -1560,13 +1556,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, @@ -112 +114 @@ -@@ -1627,7 +1623,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) +@@ -1603,7 +1599,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) @@ -121 +123 @@ -@@ -1647,11 +1643,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) +@@ -1624,11 +1620,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) @@ -134 +136 @@ -@@ -1659,7 +1653,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) +@@ -1636,7 +1630,7 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev) @@ -143 +145 @@ -@@ -1673,16 +1667,16 @@ out: +@@ -1650,16 +1644,16 @@ out: @@ -163 +165 @@ -@@ -1699,7 +1693,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, +@@ -1676,7 +1670,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, @@ -172 +174 @@ -@@ -1960,7 +1954,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, +@@ -1887,7 +1881,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, @@ -181,8 +183,8 @@ -diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h -index 0f5de129a3..854fbb7ff0 100644 ---- a/drivers/net/hns3/hns3_flow.h -+++ b/drivers/net/hns3/hns3_flow.h -@@ -49,6 +49,6 @@ int hns3_dev_flow_ops_get(struct rte_eth_dev *dev, - const struct rte_flow_ops **ops); - void hns3_flow_init(struct rte_eth_dev *dev); - void hns3_flow_uninit(struct rte_eth_dev *dev); +diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h +index b8ada8b07c..4fe7363916 100644 +--- a/drivers/net/hns3/hns3_rss.h ++++ b/drivers/net/hns3/hns3_rss.h +@@ -110,6 +110,6 @@ int hns3_config_rss(struct hns3_adapter *hns); + void hns3_rss_uninit(struct hns3_adapter *hns); + int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); + int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key); @@ -192 +194 @@ - #endif /* _HNS3_FLOW_H_ */ + #endif /* _HNS3_RSS_H_ */ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix build with gcov' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (79 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix restore filter function input' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix packet type for GENEVE' " luca.boccassi ` (17 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Dongdong Liu; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/85c5d6e7d7176ab1de3bdb3b1b794077efa8bedf Thanks. Luca Boccassi --- From 85c5d6e7d7176ab1de3bdb3b1b794077efa8bedf Mon Sep 17 00:00:00 2001 From: Dongdong Liu <liudongdong3@huawei.com> Date: Fri, 30 Sep 2022 15:22:08 +0800 Subject: [PATCH] net/hns3: fix build with gcov MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 38dc579e0f32d5b508f993cf017ce46806177e86 ] meson build -Db_coverage=true ninja -C build ../drivers/net/hns3/hns3_ethdev.c:2856:22: warning: ‘cfg.umv_space’ may be used uninitialized in this function [-Wmaybe-uninitialized] 2856 | pf->wanted_umv_size = cfg.umv_space; Fix compiling warnings using gcc 10.3.1. Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 500de265c4..be1d9db19d 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -3173,6 +3173,7 @@ hns3_get_board_configuration(struct hns3_hw *hw) struct hns3_cfg cfg; int ret; + memset(&cfg, 0, sizeof(cfg)); ret = hns3_get_board_cfg(hw, &cfg); if (ret) { PMD_INIT_LOG(ERR, "get board config failed %d", ret); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.336075580 +0000 +++ 0082-net-hns3-fix-build-with-gcov.patch 2022-11-03 09:27:25.537425615 +0000 @@ -1 +1 @@ -From 38dc579e0f32d5b508f993cf017ce46806177e86 Mon Sep 17 00:00:00 2001 +From 85c5d6e7d7176ab1de3bdb3b1b794077efa8bedf Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 38dc579e0f32d5b508f993cf017ce46806177e86 ] + @@ -24 +26 @@ -index 330a913cb8..bbc086f21d 100644 +index 500de265c4..be1d9db19d 100644 @@ -27 +29 @@ -@@ -2808,6 +2808,7 @@ hns3_get_board_configuration(struct hns3_hw *hw) +@@ -3173,6 +3173,7 @@ hns3_get_board_configuration(struct hns3_hw *hw) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix packet type for GENEVE' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (80 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix build with gcov' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix header files includes' " luca.boccassi ` (16 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3d817a2c4342b72e42a9b2a4d00750f6c9999ca2 Thanks. Luca Boccassi --- From 3d817a2c4342b72e42a9b2a4d00750f6c9999ca2 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:09 +0800 Subject: [PATCH] net/hns3: fix packet type for GENEVE [ upstream commit 904ee370e8086200859f8894bd0c32e3b7b77c65 ] Currently, hns3 reports VXLAN tunnel packet type for GENEVE, which is misleading to user. In fact, hns3 hardware cannot distinguish between VXLAN and GENEVE packet. So this patch uses RTE_PTYPE_TUNNEL_GRENAT packet type to report. Fixes: 7d6df32cf742 ("net/hns3: fix missing outer L4 UDP flag for VXLAN") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 27f0fdbab2..daf74696c8 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1989,7 +1989,7 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev) RTE_PTYPE_INNER_L4_TCP, RTE_PTYPE_INNER_L4_SCTP, RTE_PTYPE_INNER_L4_ICMP, - RTE_PTYPE_TUNNEL_VXLAN, + RTE_PTYPE_TUNNEL_GRENAT, RTE_PTYPE_TUNNEL_NVGRE, RTE_PTYPE_UNKNOWN }; @@ -2053,7 +2053,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl) tbl->ol3table[5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT; tbl->ol4table[0] = RTE_PTYPE_UNKNOWN; - tbl->ol4table[1] = RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN; + tbl->ol4table[1] = RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_GRENAT; tbl->ol4table[2] = RTE_PTYPE_TUNNEL_NVGRE; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.407291210 +0000 +++ 0083-net-hns3-fix-packet-type-for-GENEVE.patch 2022-11-03 09:27:25.537425615 +0000 @@ -1 +1 @@ -From 904ee370e8086200859f8894bd0c32e3b7b77c65 Mon Sep 17 00:00:00 2001 +From 3d817a2c4342b72e42a9b2a4d00750f6c9999ca2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 904ee370e8086200859f8894bd0c32e3b7b77c65 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index fc304e1efd..0a342ed9a2 100644 +index 27f0fdbab2..daf74696c8 100644 @@ -24 +25 @@ -@@ -1992,7 +1992,7 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev) +@@ -1989,7 +1989,7 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev) @@ -33 +34 @@ -@@ -2089,7 +2089,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl) +@@ -2053,7 +2053,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix header files includes' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (81 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix packet type for GENEVE' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 and IPv6 RSS' " luca.boccassi ` (15 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Min Hu, Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c23cc8ba1aec87c5bacf2509cbfa2d6e1a5275aa Thanks. Luca Boccassi --- From c23cc8ba1aec87c5bacf2509cbfa2d6e1a5275aa Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Fri, 30 Sep 2022 15:22:11 +0800 Subject: [PATCH] net/hns3: fix header files includes [ upstream commit 1c757dd5f636d1984326b1919c5356d19d1e4b9d ] Header files should be self contained and should not be cyclically dependent. Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_cmd.h | 3 +++ drivers/net/hns3/hns3_dcb.h | 3 +++ drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_fdir.h | 3 +++ drivers/net/hns3/hns3_intr.c | 2 +- drivers/net/hns3/hns3_mbx.h | 4 ++++ drivers/net/hns3/hns3_regs.h | 2 ++ drivers/net/hns3/hns3_rss.h | 2 ++ drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx.h | 8 ++++++++ drivers/net/hns3/hns3_stats.h | 4 ++++ 11 files changed, 32 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index 344474db6f..b7eaf924da 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -7,6 +7,9 @@ #include <stdint.h> +#include <rte_byteorder.h> +#include <rte_spinlock.h> + #define HNS3_CMDQ_TX_TIMEOUT 30000 #define HNS3_CMDQ_CLEAR_WAIT_TIME 200 #define HNS3_CMDQ_RX_INVLD_B 0 diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h index 0d167e75dc..b141b0f659 100644 --- a/drivers/net/hns3/hns3_dcb.h +++ b/drivers/net/hns3/hns3_dcb.h @@ -7,7 +7,10 @@ #include <stdint.h> +#include <rte_ethdev.h> + #include "hns3_cmd.h" +#include "hns3_ethdev.h" #define HNS3_ETHER_MAX_RATE 100000 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index be1d9db19d..9cf96f4167 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -8,13 +8,13 @@ #include <rte_io.h> #include <rte_pci.h> -#include "hns3_ethdev.h" #include "hns3_logs.h" #include "hns3_rxtx.h" #include "hns3_intr.h" #include "hns3_regs.h" #include "hns3_dcb.h" #include "hns3_mp.h" +#include "hns3_ethdev.h" #define HNS3_DEFAULT_PORT_CONF_BURST_SIZE 32 #define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM 1 diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h index 839fdb3a88..2d533c30ec 100644 --- a/drivers/net/hns3/hns3_fdir.h +++ b/drivers/net/hns3/hns3_fdir.h @@ -5,6 +5,8 @@ #ifndef _HNS3_FDIR_H_ #define _HNS3_FDIR_H_ +#include <stdint.h> + #include <rte_flow.h> struct hns3_fd_key_cfg { @@ -205,6 +207,7 @@ struct rte_flow { uint32_t counter_id; }; struct hns3_adapter; +struct hns3_hw; int hns3_init_fd_config(struct hns3_adapter *hns); int hns3_fdir_filter_init(struct hns3_adapter *hns); diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index a54f23ea45..7e945ba2e3 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -10,9 +10,9 @@ #include "hns3_ethdev.h" #include "hns3_logs.h" -#include "hns3_intr.h" #include "hns3_regs.h" #include "hns3_rxtx.h" +#include "hns3_intr.h" #define SWITCH_CONTEXT_US 10 diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h index 3f2e10c513..c61afc2f8e 100644 --- a/drivers/net/hns3/hns3_mbx.h +++ b/drivers/net/hns3/hns3_mbx.h @@ -5,6 +5,10 @@ #ifndef _HNS3_MBX_H_ #define _HNS3_MBX_H_ +#include <stdint.h> + +#include <rte_spinlock.h> + enum HNS3_MBX_OPCODE { HNS3_MBX_RESET = 0x01, /* (VF -> PF) assert reset */ HNS3_MBX_ASSERTING_RESET, /* (PF -> VF) PF is asserting reset */ diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h index cfdd208c7b..05cb8d25c0 100644 --- a/drivers/net/hns3/hns3_regs.h +++ b/drivers/net/hns3/hns3_regs.h @@ -5,6 +5,8 @@ #ifndef _HNS3_REGS_H_ #define _HNS3_REGS_H_ +#include <rte_dev_info.h> + /* bar registers for cmdq */ #define HNS3_CMDQ_TX_ADDR_L_REG 0x27000 #define HNS3_CMDQ_TX_ADDR_H_REG 0x27004 diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 4fe7363916..82c19b6b00 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -4,6 +4,7 @@ #ifndef _HNS3_RSS_H_ #define _HNS3_RSS_H_ + #include <rte_ethdev.h> #include <rte_flow.h> @@ -91,6 +92,7 @@ static inline uint32_t roundup_pow_of_two(uint32_t x) extern const uint8_t hns3_hash_key[HNS3_RSS_KEY_SIZE]; struct hns3_adapter; +struct hns3_hw; int hns3_dev_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf); diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index daf74696c8..fadec9c7e2 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -16,9 +16,9 @@ #endif #include "hns3_ethdev.h" -#include "hns3_rxtx.h" #include "hns3_regs.h" #include "hns3_logs.h" +#include "hns3_rxtx.h" #define HNS3_CFG_DESC_NUM(num) ((num) / 8 - 1) #define HNS3_RX_RING_PREFETCTH_MASK 3 diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index aa128a345a..b18c3f1165 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -6,7 +6,15 @@ #define _HNS3_RXTX_H_ #include <stdint.h> + #include <rte_mbuf_core.h> +#include <rte_ethdev.h> +#include <rte_ethdev_core.h> +#include <rte_io.h> +#include <rte_mempool.h> +#include <rte_memzone.h> + +#include "hns3_ethdev.h" #define HNS3_MIN_RING_DESC 64 #define HNS3_MAX_RING_DESC 32768 diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h index 47dce14190..9876e7d0cc 100644 --- a/drivers/net/hns3/hns3_stats.h +++ b/drivers/net/hns3/hns3_stats.h @@ -5,6 +5,8 @@ #ifndef _HNS3_STATS_H_ #define _HNS3_STATS_H_ +#include <rte_ethdev.h> + /* TQP stats */ struct hns3_tqp_stats { uint64_t rcb_tx_ring_pktnum_rcd; /* Total num of transmitted packets */ @@ -128,6 +130,8 @@ struct hns3_reset_stats; #define HNS3_TX_ERROR_STATS_FIELD_OFFSET(f) \ (offsetof(struct hns3_tx_queue, f)) +struct hns3_hw; + int hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats); int hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.482857508 +0000 +++ 0084-net-hns3-fix-header-files-includes.patch 2022-11-03 09:27:25.545425770 +0000 @@ -1 +1 @@ -From 1c757dd5f636d1984326b1919c5356d19d1e4b9d Mon Sep 17 00:00:00 2001 +From c23cc8ba1aec87c5bacf2509cbfa2d6e1a5275aa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1c757dd5f636d1984326b1919c5356d19d1e4b9d ] + @@ -14,2 +16 @@ - drivers/net/hns3/hns3_common.c | 2 +- - drivers/net/hns3/hns3_dcb.h | 4 ++++ + drivers/net/hns3/hns3_dcb.h | 3 +++ @@ -17,2 +18 @@ - drivers/net/hns3/hns3_fdir.h | 5 +++++ - drivers/net/hns3/hns3_flow.h | 3 +++ + drivers/net/hns3/hns3_fdir.h | 3 +++ @@ -21,2 +21 @@ - drivers/net/hns3/hns3_mp.h | 2 ++ - drivers/net/hns3/hns3_regs.h | 3 +++ + drivers/net/hns3/hns3_regs.h | 2 ++ @@ -25,4 +24,3 @@ - drivers/net/hns3/hns3_rxtx.h | 9 +++++++++ - drivers/net/hns3/hns3_stats.h | 5 +++++ - drivers/net/hns3/hns3_tm.h | 2 ++ - 15 files changed, 46 insertions(+), 4 deletions(-) + drivers/net/hns3/hns3_rxtx.h | 8 ++++++++ + drivers/net/hns3/hns3_stats.h | 4 ++++ + 11 files changed, 32 insertions(+), 3 deletions(-) @@ -31 +29 @@ -index 82c999061d..bee96c1e46 100644 +index 344474db6f..b7eaf924da 100644 @@ -44,16 +41,0 @@ -diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c -index e732f68238..14291193cb 100644 ---- a/drivers/net/hns3/hns3_common.c -+++ b/drivers/net/hns3/hns3_common.c -@@ -7,10 +7,10 @@ - #include <ethdev_pci.h> - #include <rte_pci.h> - --#include "hns3_common.h" - #include "hns3_logs.h" - #include "hns3_regs.h" - #include "hns3_rxtx.h" -+#include "hns3_common.h" - - int - hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, @@ -61 +43 @@ -index e06ec177c8..9d9e7684c1 100644 +index 0d167e75dc..b141b0f659 100644 @@ -64 +46 @@ -@@ -7,7 +7,11 @@ +@@ -7,7 +7,10 @@ @@ -68 +49,0 @@ -+#include <ethdev_driver.h> @@ -77 +58 @@ -index a1348f93a7..60e933998a 100644 +index be1d9db19d..9cf96f4167 100644 @@ -80,3 +61,3 @@ -@@ -6,7 +6,6 @@ - #include <bus_pci_driver.h> - #include <ethdev_pci.h> +@@ -8,13 +8,13 @@ + #include <rte_io.h> + #include <rte_pci.h> @@ -85,2 +65,0 @@ - #include "hns3_common.h" - #include "hns3_dump.h" @@ -88 +67,3 @@ -@@ -16,6 +15,7 @@ + #include "hns3_rxtx.h" + #include "hns3_intr.h" + #include "hns3_regs.h" @@ -91 +71,0 @@ - #include "hns3_flow.h" @@ -94,2 +74,2 @@ - #define HNS3_SERVICE_INTERVAL 1000000 /* us */ - #define HNS3_SERVICE_QUICK_INTERVAL 10 + #define HNS3_DEFAULT_PORT_CONF_BURST_SIZE 32 + #define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM 1 @@ -97 +77 @@ -index d81f04a3f3..1a14f1eceb 100644 +index 839fdb3a88..2d533c30ec 100644 @@ -100 +80 @@ -@@ -5,6 +5,10 @@ +@@ -5,6 +5,8 @@ @@ -106,2 +86,2 @@ -+#include <rte_flow.h> -+ + #include <rte_flow.h> + @@ -109,3 +89,2 @@ - uint8_t key_sel; - uint8_t inner_sipv6_word_en; -@@ -177,6 +181,7 @@ struct hns3_fdir_info { +@@ -205,6 +207,7 @@ struct rte_flow { + uint32_t counter_id; @@ -113 +91,0 @@ - @@ -119,14 +96,0 @@ -diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h -index 854fbb7ff0..ec94510152 100644 ---- a/drivers/net/hns3/hns3_flow.h -+++ b/drivers/net/hns3/hns3_flow.h -@@ -6,6 +6,9 @@ - #define _HNS3_FLOW_H_ - - #include <rte_flow.h> -+#include <ethdev_driver.h> -+ -+#include "hns3_rss.h" - - struct hns3_flow_counter { - LIST_ENTRY(hns3_flow_counter) next; /* Pointer to the next counter. */ @@ -134 +98 @@ -index 4bdcd6070b..57679254ee 100644 +index a54f23ea45..7e945ba2e3 100644 @@ -139 +103 @@ - #include "hns3_common.h" + #include "hns3_ethdev.h" @@ -149 +113 @@ -index 0172a2e288..97f704426c 100644 +index 3f2e10c513..c61afc2f8e 100644 @@ -163,13 +126,0 @@ -diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h -index a74221d086..230230bbfe 100644 ---- a/drivers/net/hns3/hns3_mp.h -+++ b/drivers/net/hns3/hns3_mp.h -@@ -5,6 +5,8 @@ - #ifndef _HNS3_MP_H_ - #define _HNS3_MP_H_ - -+#include <ethdev_driver.h> -+ - /* Local data for primary or secondary process. */ - struct hns3_process_local_data { - bool init_done; /* Process action register completed flag. */ @@ -177 +128 @@ -index 5812eb39db..2636429844 100644 +index cfdd208c7b..05cb8d25c0 100644 @@ -180 +131 @@ -@@ -5,6 +5,9 @@ +@@ -5,6 +5,8 @@ @@ -184 +134,0 @@ -+#include <ethdev_driver.h> @@ -191 +141 @@ -index 1589c67c59..6cae5f8634 100644 +index 4fe7363916..82c19b6b00 100644 @@ -211 +161 @@ -index 0a342ed9a2..f1163ce8a9 100644 +index daf74696c8..fadec9c7e2 100644 @@ -214 +164 @@ -@@ -17,10 +17,10 @@ +@@ -16,9 +16,9 @@ @@ -217 +167 @@ - #include "hns3_common.h" + #include "hns3_ethdev.h" @@ -221 +170,0 @@ - #include "hns3_mp.h" @@ -227 +176 @@ -index 455f8b9419..f2d73043b7 100644 +index aa128a345a..b18c3f1165 100644 @@ -230 +179 @@ -@@ -6,7 +6,16 @@ +@@ -6,7 +6,15 @@ @@ -235 +183,0 @@ -+#include <ethdev_driver.h> @@ -248 +196 @@ -index 9d84072205..9a360f8870 100644 +index 47dce14190..9876e7d0cc 100644 @@ -251 +199 @@ -@@ -5,6 +5,9 @@ +@@ -5,6 +5,8 @@ @@ -255 +202,0 @@ -+#include <ethdev_driver.h> @@ -261,3 +208,3 @@ -@@ -145,6 +148,8 @@ struct hns3_reset_stats; - #define HNS3_IMISSED_STATS_FIELD_OFFSET(f) \ - (offsetof(struct hns3_rx_missed_stats, f)) +@@ -128,6 +130,8 @@ struct hns3_reset_stats; + #define HNS3_TX_ERROR_STATS_FIELD_OFFSET(f) \ + (offsetof(struct hns3_tx_queue, f)) @@ -270,13 +216,0 @@ -diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h -index 83e9cc8ba9..47345eeed1 100644 ---- a/drivers/net/hns3/hns3_tm.h -+++ b/drivers/net/hns3/hns3_tm.h -@@ -105,6 +105,8 @@ hns3_tm_calc_node_tc_no(struct hns3_tm_conf *conf, uint32_t node_id) - return 0; - } - -+struct hns3_hw; -+ - void hns3_tm_conf_init(struct rte_eth_dev *dev); - void hns3_tm_conf_uninit(struct rte_eth_dev *dev); - int hns3_tm_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix IPv4 and IPv6 RSS' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (82 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix header files includes' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix typos in IPv6 SCTP fields' " luca.boccassi ` (14 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1e72007cd442562186a992d10ffd1fe2e73e8271 Thanks. Luca Boccassi --- From 1e72007cd442562186a992d10ffd1fe2e73e8271 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:14 +0800 Subject: [PATCH] net/hns3: fix IPv4 and IPv6 RSS [ upstream commit c56a1956b98d6c4eb2e1ebc486348feafd16143d ] Currently, hns3 driver use 'ipv4-other' and 'ipv6-other' as the flag of IP packets to judge if enable RSS tuple field. But user may use 'RTE_ETH_RSS_IPV4' or 'RTE_ETH_RSS_IPV6' as the flag. So this patch adds the processing of these macros. Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rss.c | 14 ++++++++++++++ drivers/net/hns3/hns3_rss.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 8da680050f..d3fb342cc2 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -102,6 +102,10 @@ static const struct { BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) }, { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) }, + { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, @@ -134,6 +138,10 @@ static const struct { BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) }, + { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, @@ -159,6 +167,9 @@ static const struct { BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) }, + { ETH_RSS_IPV4, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, { ETH_RSS_NONFRAG_IPV4_OTHER, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, @@ -177,6 +188,9 @@ static const struct { BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) }, + { ETH_RSS_IPV6, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, { ETH_RSS_NONFRAG_IPV6_OTHER, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) } diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 82c19b6b00..751e3475ed 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -9,11 +9,13 @@ #include <rte_flow.h> #define HNS3_ETH_RSS_SUPPORT ( \ + ETH_RSS_IPV4 | \ ETH_RSS_FRAG_IPV4 | \ ETH_RSS_NONFRAG_IPV4_TCP | \ ETH_RSS_NONFRAG_IPV4_UDP | \ ETH_RSS_NONFRAG_IPV4_SCTP | \ ETH_RSS_NONFRAG_IPV4_OTHER | \ + ETH_RSS_IPV6 | \ ETH_RSS_FRAG_IPV6 | \ ETH_RSS_NONFRAG_IPV6_TCP | \ ETH_RSS_NONFRAG_IPV6_UDP | \ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.583602198 +0000 +++ 0085-net-hns3-fix-IPv4-and-IPv6-RSS.patch 2022-11-03 09:27:25.545425770 +0000 @@ -1 +1 @@ -From c56a1956b98d6c4eb2e1ebc486348feafd16143d Mon Sep 17 00:00:00 2001 +From 1e72007cd442562186a992d10ffd1fe2e73e8271 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c56a1956b98d6c4eb2e1ebc486348feafd16143d ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index fc912ed2e8..e7e114727f 100644 +index 8da680050f..d3fb342cc2 100644 @@ -27 +28 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, @@ -29 +30 @@ -+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -31 +32 @@ -+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -33 +34 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -35 +36 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, @@ -38 +39 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, @@ -40 +41 @@ -+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -42 +43 @@ -+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -44 +45 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -46 +47 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, @@ -51 +52 @@ -+ { RTE_ETH_RSS_IPV4, ++ { ETH_RSS_IPV4, @@ -54 +55 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_OTHER, + { ETH_RSS_NONFRAG_IPV4_OTHER, @@ -61 +62 @@ -+ { RTE_ETH_RSS_IPV6, ++ { ETH_RSS_IPV6, @@ -64 +65 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_OTHER, + { ETH_RSS_NONFRAG_IPV6_OTHER, @@ -68 +69 @@ -index 55aafedcba..8e8b056f4e 100644 +index 82c19b6b00..751e3475ed 100644 @@ -75,10 +76,10 @@ -+ RTE_ETH_RSS_IPV4 | \ - RTE_ETH_RSS_FRAG_IPV4 | \ - RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ - RTE_ETH_RSS_NONFRAG_IPV4_UDP | \ - RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \ - RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \ -+ RTE_ETH_RSS_IPV6 | \ - RTE_ETH_RSS_FRAG_IPV6 | \ - RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ - RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ ++ ETH_RSS_IPV4 | \ + ETH_RSS_FRAG_IPV4 | \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + ETH_RSS_NONFRAG_IPV4_UDP | \ + ETH_RSS_NONFRAG_IPV4_SCTP | \ + ETH_RSS_NONFRAG_IPV4_OTHER | \ ++ ETH_RSS_IPV6 | \ + ETH_RSS_FRAG_IPV6 | \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + ETH_RSS_NONFRAG_IPV6_UDP | \ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix typos in IPv6 SCTP fields' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (83 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 and IPv6 RSS' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 RSS' " luca.boccassi ` (13 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9b11b4c1c862d58644c6da3d927f831b2b34ca5f Thanks. Luca Boccassi --- From 9b11b4c1c862d58644c6da3d927f831b2b34ca5f Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:15 +0800 Subject: [PATCH] net/hns3: fix typos in IPv6 SCTP fields [ upstream commit 2ecfc36ce1eb20428f6ce46b1be68f244db3bf11 ] Fix spelling errors about IPV6-SCTP macro. Fixes: 1bc633c34008 ("net/hns3: enable RSS for IPv6-SCTP dst/src port fields") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rss.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index d3fb342cc2..ad9e74262f 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -57,8 +57,8 @@ enum hns3_tuple_field { HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S, /* IPV6_SCTP ENABLE FIELD */ - HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D = 48, - HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S, + HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D = 48, + HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S, HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D, HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S, HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER, @@ -135,9 +135,9 @@ static const struct { { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, - BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, - BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) }, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) }, { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -185,8 +185,8 @@ static const struct { BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D) }, { ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) | - BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) }, { ETH_RSS_IPV6, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.644634851 +0000 +++ 0086-net-hns3-fix-typos-in-IPv6-SCTP-fields.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From 2ecfc36ce1eb20428f6ce46b1be68f244db3bf11 Mon Sep 17 00:00:00 2001 +From 9b11b4c1c862d58644c6da3d927f831b2b34ca5f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2ecfc36ce1eb20428f6ce46b1be68f244db3bf11 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index e7e114727f..6d71ee94a9 100644 +index d3fb342cc2..ad9e74262f 100644 @@ -33 +34 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, @@ -35 +36 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, @@ -38 +39 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, @@ -41 +42 @@ - { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -43 +44 @@ - { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -46 +47 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | + { ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | @@ -53 +54 @@ - { RTE_ETH_RSS_IPV6, + { ETH_RSS_IPV6, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix IPv4 RSS' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (84 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix typos in IPv6 SCTP fields' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: add L3 and L4 RSS types' " luca.boccassi ` (12 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1d2054bc3718635ead72104661a2d42b387e4aa7 Thanks. Luca Boccassi --- From 1d2054bc3718635ead72104661a2d42b387e4aa7 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:16 +0800 Subject: [PATCH] net/hns3: fix IPv4 RSS [ upstream commit 2bd90635bde040d5c8b66f3b48b7a48d2d4e4e83 ] When user only use 'ipv4' to set 'rss_hf', hns3 will enable all tuple fields for 'ipv4' flow. But if user use 'ipv4-tcp' , 'ipv4' and 'l4-src-only' to set 'rss_hf', driver does not enable all tuple fields for 'ipv4' flow. Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_rss.c | 270 ++++++++++++++++++++++++------------ 1 file changed, 178 insertions(+), 92 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index ad9e74262f..cec152baa4 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -70,130 +70,209 @@ enum hns3_tuple_field { HNS3_RSS_FIELD_IPV6_FRAG_IP_S }; +enum hns3_rss_tuple_type { + HNS3_RSS_IP_TUPLE, + HNS3_RSS_IP_L4_TUPLE, +}; + static const struct { uint64_t rss_types; + uint16_t tuple_type; uint64_t rss_field; } hns3_set_tuple_table[] = { + /* IPV4-FRAG */ { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S) }, { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) }, + { ETH_RSS_FRAG_IPV4, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) }, + + /* IPV4 */ + { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + { ETH_RSS_IPV4, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + + /* IPV4-OTHER */ + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + { ETH_RSS_NONFRAG_IPV4_OTHER, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + + /* IPV4-TCP */ { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) }, { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) }, + { ETH_RSS_NONFRAG_IPV4_TCP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) }, + + /* IPV4-UDP */ { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S) }, { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_D) }, + { ETH_RSS_NONFRAG_IPV4_UDP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_D) }, + + /* IPV4-SCTP */ { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) }, { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) }, - { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, - { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, - { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, - { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, + { ETH_RSS_NONFRAG_IPV4_SCTP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) }, + + /* IPV6-FRAG */ { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) }, { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D) }, + { ETH_RSS_FRAG_IPV6, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D) }, + + /* IPV6 */ + { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + { ETH_RSS_IPV6, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + + /* IPV6-OTHER */ + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + { ETH_RSS_NONFRAG_IPV6_OTHER, + HNS3_RSS_IP_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, + + /* IPV6-TCP */ { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_S) }, { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_D) }, + { ETH_RSS_NONFRAG_IPV6_TCP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_D) }, + + /* IPV6-UDP */ { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_S) }, { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D) }, + { ETH_RSS_NONFRAG_IPV6_UDP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_D) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D) }, + + /* IPV6-SCTP */ { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) }, { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, + HNS3_RSS_IP_L4_TUPLE, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) }, - { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, - { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, - { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, - { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, -}; - -static const struct { - uint64_t rss_types; - uint64_t rss_field; -} hns3_set_rss_types[] = { - { ETH_RSS_FRAG_IPV4, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S) }, - { ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) }, - { ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_D) }, - { ETH_RSS_NONFRAG_IPV4_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) }, - { ETH_RSS_IPV4, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, - { ETH_RSS_NONFRAG_IPV4_OTHER, - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, - { ETH_RSS_FRAG_IPV6, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_D) }, - { ETH_RSS_NONFRAG_IPV6_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_D) }, - { ETH_RSS_NONFRAG_IPV6_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_D) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D) }, - { ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | + { ETH_RSS_NONFRAG_IPV6_SCTP, + HNS3_RSS_IP_L4_TUPLE, + BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) }, - { ETH_RSS_IPV6, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, - { ETH_RSS_NONFRAG_IPV6_OTHER, - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | - BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) } }; /* @@ -321,46 +400,53 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) return ret; } -int -hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) +static uint64_t +hns3_rss_calc_tuple_filed(uint64_t rss_hf) { - struct hns3_rss_input_tuple_cmd *req; - struct hns3_cmd_desc desc; - uint32_t fields_count = 0; /* count times for setting tuple fields */ + uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L3_DST_ONLY; + uint64_t l4_only_mask = ETH_RSS_L4_SRC_ONLY | + ETH_RSS_L4_DST_ONLY; + uint64_t l3_l4_only_mask = l3_only_mask | l4_only_mask; + bool has_l3_l4_only = !!(rss_hf & l3_l4_only_mask); + bool has_l3_only = !!(rss_hf & l3_only_mask); + uint64_t tuple = 0; uint32_t i; - int ret; - - hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); - - req = (struct hns3_rss_input_tuple_cmd *)desc.data; for (i = 0; i < RTE_DIM(hns3_set_tuple_table); i++) { - if ((rss_hf & hns3_set_tuple_table[i].rss_types) == - hns3_set_tuple_table[i].rss_types) { - req->tuple_field |= - rte_cpu_to_le_64(hns3_set_tuple_table[i].rss_field); - fields_count++; - } - } + if ((rss_hf & hns3_set_tuple_table[i].rss_types) != + hns3_set_tuple_table[i].rss_types) + continue; - /* - * When user does not specify the following types or a combination of - * the following types, it enables all fields for the supported RSS - * types. the following types as: - * - ETH_RSS_L3_SRC_ONLY - * - ETH_RSS_L3_DST_ONLY - * - ETH_RSS_L4_SRC_ONLY - * - ETH_RSS_L4_DST_ONLY - */ - if (fields_count == 0) { - for (i = 0; i < RTE_DIM(hns3_set_rss_types); i++) { - if ((rss_hf & hns3_set_rss_types[i].rss_types) == - hns3_set_rss_types[i].rss_types) - req->tuple_field |= rte_cpu_to_le_64( - hns3_set_rss_types[i].rss_field); + if (hns3_set_tuple_table[i].tuple_type == HNS3_RSS_IP_TUPLE) { + if (hns3_set_tuple_table[i].rss_types & l3_only_mask || + !has_l3_only) + tuple |= hns3_set_tuple_table[i].rss_field; + continue; } + + /* For IP types with L4, we need check both L3 and L4 */ + if (hns3_set_tuple_table[i].rss_types & l3_l4_only_mask || + !has_l3_l4_only) + tuple |= hns3_set_tuple_table[i].rss_field; } + return tuple; +} + +int +hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) +{ + struct hns3_rss_input_tuple_cmd *req; + struct hns3_cmd_desc desc; + uint64_t tuple_field; + int ret; + + hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); + req = (struct hns3_rss_input_tuple_cmd *)desc.data; + + tuple_field = hns3_rss_calc_tuple_filed(rss_hf); + req->tuple_field = rte_cpu_to_le_64(tuple_field); ret = hns3_cmd_send(hw, &desc, 1); if (ret) { hns3_err(hw, "Update RSS flow types tuples failed %d", ret); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.750906100 +0000 +++ 0087-net-hns3-fix-IPv4-RSS.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From 2bd90635bde040d5c8b66f3b48b7a48d2d4e4e83 Mon Sep 17 00:00:00 2001 +From 1d2054bc3718635ead72104661a2d42b387e4aa7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2bd90635bde040d5c8b66f3b48b7a48d2d4e4e83 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/hns3/hns3_rss.c | 266 ++++++++++++++++++++++++------------ - 1 file changed, 176 insertions(+), 90 deletions(-) + drivers/net/hns3/hns3_rss.c | 270 ++++++++++++++++++++++++------------ + 1 file changed, 178 insertions(+), 92 deletions(-) @@ -21 +22 @@ -index 6d71ee94a9..ea745c791f 100644 +index ad9e74262f..cec152baa4 100644 @@ -39 +40 @@ - { RTE_ETH_RSS_FRAG_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -42 +43 @@ - { RTE_ETH_RSS_FRAG_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_FRAG_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -45 +46 @@ -+ { RTE_ETH_RSS_FRAG_IPV4, ++ { ETH_RSS_FRAG_IPV4, @@ -51 +52 @@ -+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -54 +55 @@ -+ { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -57 +58 @@ -+ { RTE_ETH_RSS_IPV4, ++ { ETH_RSS_IPV4, @@ -63 +64 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -66 +67 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, @@ -69 +70 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_OTHER, ++ { ETH_RSS_NONFRAG_IPV4_OTHER, @@ -75 +76 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, @@ -78 +79 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, @@ -81 +82 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, @@ -84 +85 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, @@ -87 +88 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_TCP, ++ { ETH_RSS_NONFRAG_IPV4_TCP, @@ -95 +96 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, @@ -98 +99 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, @@ -101 +102 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, @@ -104 +105 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_UDP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, @@ -107 +108 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_UDP, ++ { ETH_RSS_NONFRAG_IPV4_UDP, @@ -115 +116 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, @@ -118 +119 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, @@ -121 +122 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, @@ -124 +125 @@ - { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, @@ -127 +128 @@ -- { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, +- { ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, @@ -129 +130 @@ -- { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, +- { ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, @@ -131 +132 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, +- { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -133 +134 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY, +- { ETH_RSS_NONFRAG_IPV4_OTHER | ETH_RSS_L3_DST_ONLY, @@ -135 +136 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV4_SCTP, ++ { ETH_RSS_NONFRAG_IPV4_SCTP, @@ -144 +145 @@ - { RTE_ETH_RSS_FRAG_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -147 +148 @@ - { RTE_ETH_RSS_FRAG_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_FRAG_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -150 +151 @@ -+ { RTE_ETH_RSS_FRAG_IPV6, ++ { ETH_RSS_FRAG_IPV6, @@ -156 +157 @@ -+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -159 +160 @@ -+ { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -162 +163 @@ -+ { RTE_ETH_RSS_IPV6, ++ { ETH_RSS_IPV6, @@ -168 +169 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, ++ { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -171 +172 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY, ++ { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, @@ -174 +175 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV6_OTHER, ++ { ETH_RSS_NONFRAG_IPV6_OTHER, @@ -180 +181 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, @@ -183 +184 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, @@ -186 +187 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, @@ -189 +190 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_TCP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, @@ -192 +193 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV6_TCP, ++ { ETH_RSS_NONFRAG_IPV6_TCP, @@ -200 +201 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, @@ -203 +204 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, @@ -206 +207 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, @@ -209 +210 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_UDP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, @@ -212 +213 @@ -+ { RTE_ETH_RSS_NONFRAG_IPV6_UDP, ++ { ETH_RSS_NONFRAG_IPV6_UDP, @@ -220 +221 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L3_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, @@ -223 +224 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L3_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, @@ -226 +227 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_SRC_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, @@ -229 +230 @@ - { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY, + { ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, @@ -232 +233 @@ -- { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, +- { ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, @@ -234 +235 @@ -- { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, +- { ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, @@ -236 +237 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, +- { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_SRC_ONLY, @@ -238 +239 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY, +- { ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_L3_DST_ONLY, @@ -246 +247 @@ -- { RTE_ETH_RSS_FRAG_IPV4, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) | +- { ETH_RSS_FRAG_IPV4, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D) | @@ -248 +249 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) | +- { ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) | @@ -252 +253 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) | +- { ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) | @@ -256 +257 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) | +- { ETH_RSS_NONFRAG_IPV4_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) | @@ -261 +262 @@ -- { RTE_ETH_RSS_IPV4, +- { ETH_RSS_IPV4, @@ -264 +265 @@ -- { RTE_ETH_RSS_NONFRAG_IPV4_OTHER, +- { ETH_RSS_NONFRAG_IPV4_OTHER, @@ -267 +268 @@ -- { RTE_ETH_RSS_FRAG_IPV6, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) | +- { ETH_RSS_FRAG_IPV6, BIT_ULL(HNS3_RSS_FIELD_IPV6_FRAG_IP_S) | @@ -269 +270 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) | +- { ETH_RSS_NONFRAG_IPV6_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S) | @@ -273 +274 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S) | +- { ETH_RSS_NONFRAG_IPV6_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S) | @@ -277,2 +278,2 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | -+ { RTE_ETH_RSS_NONFRAG_IPV6_SCTP, +- { ETH_RSS_NONFRAG_IPV6_SCTP, BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) | ++ { ETH_RSS_NONFRAG_IPV6_SCTP, @@ -285 +286 @@ -- { RTE_ETH_RSS_IPV6, +- { ETH_RSS_IPV6, @@ -288 +289 @@ -- { RTE_ETH_RSS_NONFRAG_IPV6_OTHER, +- { ETH_RSS_NONFRAG_IPV6_OTHER, @@ -297,0 +299,2 @@ +-int +-hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) @@ -300,5 +303,8 @@ -+{ -+ uint64_t l3_only_mask = RTE_ETH_RSS_L3_SRC_ONLY | -+ RTE_ETH_RSS_L3_DST_ONLY; -+ uint64_t l4_only_mask = RTE_ETH_RSS_L4_SRC_ONLY | -+ RTE_ETH_RSS_L4_DST_ONLY; + { +- struct hns3_rss_input_tuple_cmd *req; +- struct hns3_cmd_desc desc; +- uint32_t fields_count = 0; /* count times for setting tuple fields */ ++ uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | ++ ETH_RSS_L3_DST_ONLY; ++ uint64_t l4_only_mask = ETH_RSS_L4_SRC_ONLY | ++ ETH_RSS_L4_DST_ONLY; @@ -309,34 +315,2 @@ -+ uint32_t i; -+ -+ for (i = 0; i < RTE_DIM(hns3_set_tuple_table); i++) { -+ if ((rss_hf & hns3_set_tuple_table[i].rss_types) != -+ hns3_set_tuple_table[i].rss_types) -+ continue; -+ -+ if (hns3_set_tuple_table[i].tuple_type == HNS3_RSS_IP_TUPLE) { -+ if (hns3_set_tuple_table[i].rss_types & l3_only_mask || -+ !has_l3_only) -+ tuple |= hns3_set_tuple_table[i].rss_field; -+ continue; -+ } -+ -+ /* For IP types with L4, we need check both L3 and L4 */ -+ if (hns3_set_tuple_table[i].rss_types & l3_l4_only_mask || -+ !has_l3_l4_only) -+ tuple |= hns3_set_tuple_table[i].rss_field; -+ } -+ -+ return tuple; -+} -+ - int - hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) - { - struct hns3_rss_input_tuple_cmd *req; - struct hns3_cmd_desc desc; -- uint32_t fields_count = 0; /* count times for setting tuple fields */ -- uint32_t i; -+ uint64_t tuple_field; - int ret; - - hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); + uint32_t i; +- int ret; @@ -344 +318,3 @@ - req = (struct hns3_rss_input_tuple_cmd *)desc.data; +- hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); +- +- req = (struct hns3_rss_input_tuple_cmd *)desc.data; @@ -346 +322 @@ -- for (i = 0; i < RTE_DIM(hns3_set_tuple_table); i++) { + for (i = 0; i < RTE_DIM(hns3_set_tuple_table); i++) { @@ -354 +330,4 @@ -- ++ if ((rss_hf & hns3_set_tuple_table[i].rss_types) != ++ hns3_set_tuple_table[i].rss_types) ++ continue; + @@ -359,4 +338,4 @@ -- * - RTE_ETH_RSS_L3_SRC_ONLY -- * - RTE_ETH_RSS_L3_DST_ONLY -- * - RTE_ETH_RSS_L4_SRC_ONLY -- * - RTE_ETH_RSS_L4_DST_ONLY +- * - ETH_RSS_L3_SRC_ONLY +- * - ETH_RSS_L3_DST_ONLY +- * - ETH_RSS_L4_SRC_ONLY +- * - ETH_RSS_L4_DST_ONLY @@ -370,3 +349,27 @@ -- } -- } -- ++ if (hns3_set_tuple_table[i].tuple_type == HNS3_RSS_IP_TUPLE) { ++ if (hns3_set_tuple_table[i].rss_types & l3_only_mask || ++ !has_l3_only) ++ tuple |= hns3_set_tuple_table[i].rss_field; ++ continue; + } ++ ++ /* For IP types with L4, we need check both L3 and L4 */ ++ if (hns3_set_tuple_table[i].rss_types & l3_l4_only_mask || ++ !has_l3_l4_only) ++ tuple |= hns3_set_tuple_table[i].rss_field; + } + ++ return tuple; ++} ++ ++int ++hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) ++{ ++ struct hns3_rss_input_tuple_cmd *req; ++ struct hns3_cmd_desc desc; ++ uint64_t tuple_field; ++ int ret; ++ ++ hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); ++ req = (struct hns3_rss_input_tuple_cmd *)desc.data; ++ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: add L3 and L4 RSS types' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (85 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 RSS' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: revert fix mailbox communication with HW' " luca.boccassi ` (11 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Huisong Li; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5ad4f4fb46c63e36675430d26b6e1c430766ec17 Thanks. Luca Boccassi --- From 5ad4f4fb46c63e36675430d26b6e1c430766ec17 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 30 Sep 2022 15:22:17 +0800 Subject: [PATCH] net/hns3: add L3 and L4 RSS types [ upstream commit 13c3993240c86446f876ea99fca8482ed511e7a8 ] When user set 'L3_SRC/DST_ONLY' or 'L4_SRC/DST_ONLY' to 'rss_hf' and do not specify the packet type, these types will be set to hardware. Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> --- drivers/net/hns3/hns3_rss.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index cec152baa4..c105072f24 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -400,8 +400,34 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) return ret; } +static void +hns3_rss_check_l3l4_types(struct hns3_hw *hw, uint64_t rss_hf) +{ + uint64_t ip_mask = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | + ETH_RSS_NONFRAG_IPV4_OTHER | + ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | + ETH_RSS_NONFRAG_IPV6_OTHER; + uint64_t l4_mask = ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_NONFRAG_IPV4_SCTP | + ETH_RSS_NONFRAG_IPV6_TCP | + ETH_RSS_NONFRAG_IPV6_UDP | + ETH_RSS_NONFRAG_IPV6_SCTP; + uint64_t l3_src_dst_mask = ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L3_DST_ONLY; + uint64_t l4_src_dst_mask = ETH_RSS_L4_SRC_ONLY | + ETH_RSS_L4_DST_ONLY; + + if (rss_hf & l3_src_dst_mask && + !(rss_hf & ip_mask || rss_hf & l4_mask)) + hns3_warn(hw, "packet type isn't specified, L3_SRC/DST_ONLY is ignored."); + + if (rss_hf & l4_src_dst_mask && !(rss_hf & l4_mask)) + hns3_warn(hw, "packet type isn't specified, L4_SRC/DST_ONLY is ignored."); +} + static uint64_t -hns3_rss_calc_tuple_filed(uint64_t rss_hf) +hns3_rss_calc_tuple_filed(struct hns3_hw *hw, uint64_t rss_hf) { uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY; @@ -430,6 +456,7 @@ hns3_rss_calc_tuple_filed(uint64_t rss_hf) !has_l3_l4_only) tuple |= hns3_set_tuple_table[i].rss_field; } + hns3_rss_check_l3l4_types(hw, rss_hf); return tuple; } @@ -445,7 +472,7 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false); req = (struct hns3_rss_input_tuple_cmd *)desc.data; - tuple_field = hns3_rss_calc_tuple_filed(rss_hf); + tuple_field = hns3_rss_calc_tuple_filed(hw, rss_hf); req->tuple_field = rte_cpu_to_le_64(tuple_field); ret = hns3_cmd_send(hw, &desc, 1); if (ret) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.828772172 +0000 +++ 0088-net-hns3-add-L3-and-L4-RSS-types.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From 13c3993240c86446f876ea99fca8482ed511e7a8 Mon Sep 17 00:00:00 2001 +From 5ad4f4fb46c63e36675430d26b6e1c430766ec17 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 13c3993240c86446f876ea99fca8482ed511e7a8 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index ea745c791f..ca5a129234 100644 +index cec152baa4..c105072f24 100644 @@ -28,14 +29,14 @@ -+ uint64_t ip_mask = RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_FRAG_IPV4 | -+ RTE_ETH_RSS_NONFRAG_IPV4_OTHER | -+ RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_FRAG_IPV6 | -+ RTE_ETH_RSS_NONFRAG_IPV6_OTHER; -+ uint64_t l4_mask = RTE_ETH_RSS_NONFRAG_IPV4_TCP | -+ RTE_ETH_RSS_NONFRAG_IPV4_UDP | -+ RTE_ETH_RSS_NONFRAG_IPV4_SCTP | -+ RTE_ETH_RSS_NONFRAG_IPV6_TCP | -+ RTE_ETH_RSS_NONFRAG_IPV6_UDP | -+ RTE_ETH_RSS_NONFRAG_IPV6_SCTP; -+ uint64_t l3_src_dst_mask = RTE_ETH_RSS_L3_SRC_ONLY | -+ RTE_ETH_RSS_L3_DST_ONLY; -+ uint64_t l4_src_dst_mask = RTE_ETH_RSS_L4_SRC_ONLY | -+ RTE_ETH_RSS_L4_DST_ONLY; ++ uint64_t ip_mask = ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | ++ ETH_RSS_NONFRAG_IPV4_OTHER | ++ ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | ++ ETH_RSS_NONFRAG_IPV6_OTHER; ++ uint64_t l4_mask = ETH_RSS_NONFRAG_IPV4_TCP | ++ ETH_RSS_NONFRAG_IPV4_UDP | ++ ETH_RSS_NONFRAG_IPV4_SCTP | ++ ETH_RSS_NONFRAG_IPV6_TCP | ++ ETH_RSS_NONFRAG_IPV6_UDP | ++ ETH_RSS_NONFRAG_IPV6_SCTP; ++ uint64_t l3_src_dst_mask = ETH_RSS_L3_SRC_ONLY | ++ ETH_RSS_L3_DST_ONLY; ++ uint64_t l4_src_dst_mask = ETH_RSS_L4_SRC_ONLY | ++ ETH_RSS_L4_DST_ONLY; @@ -55,2 +56,2 @@ - uint64_t l3_only_mask = RTE_ETH_RSS_L3_SRC_ONLY | - RTE_ETH_RSS_L3_DST_ONLY; + uint64_t l3_only_mask = ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L3_DST_ONLY; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: revert fix mailbox communication with HW' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (86 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: add L3 and L4 RSS types' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix VF mailbox message handling' " luca.boccassi ` (10 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1fa481da5bdd86946062f431901db52ae3bfd835 Thanks. Luca Boccassi --- From 1fa481da5bdd86946062f431901db52ae3bfd835 Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Fri, 30 Sep 2022 15:22:18 +0800 Subject: [PATCH] net/hns3: revert fix mailbox communication with HW [ upstream commit e0ec62d6e9185890716761ba00d9775d82507293 ] VF's command receive queue was mainly used to receive mailbox messages from PF. There are two type mailbox messages: request response message and message pushed by PF. There are two types of threads that can handle these messages: 1) the interrupt thread of the main process: it could handle both types of messages. 2) other threads: it could only handle request response messages. The collaboration mechanism between the two type threads is that other threads set the opcode of processed messages to zero so that the interrupt thread of the main process does not process these messages again. Because other threads can only process part of the messages, after the processing is complete, the next-to-use pointer of the command receive queue should not be updated. Otherwise, some messages (e.g. messages pushed by PF) maybe discarded. Unfortunately, the patch to be reverted updates next-to-use pointer of the command receive queue in other threads context, and this will lead to discard some mailbox message. So this commit reverts commit 599ef84add7e ("net/hns3: fix mailbox communication with HW") Fixes: 599ef84add7e ("net/hns3: fix mailbox communication with HW") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_mbx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index 1c95eb219d..e8d336f516 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -442,8 +442,10 @@ scan_next: next_to_use = (next_to_use + 1) % hw->cmq.crq.desc_num; } - crq->next_to_use = next_to_use; - hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use); + /* + * Note: the crq->next_to_use field should not updated, otherwise, + * mailbox messages may be discarded. + */ } void -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.899653474 +0000 +++ 0089-net-hns3-revert-fix-mailbox-communication-with-HW.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From e0ec62d6e9185890716761ba00d9775d82507293 Mon Sep 17 00:00:00 2001 +From 1fa481da5bdd86946062f431901db52ae3bfd835 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e0ec62d6e9185890716761ba00d9775d82507293 ] + @@ -31 +32,0 @@ -Cc: stable@dpdk.org @@ -40 +41 @@ -index 02028dcd9c..910a16c999 100644 +index 1c95eb219d..e8d336f516 100644 @@ -43 +44 @@ -@@ -436,8 +436,10 @@ scan_next: +@@ -442,8 +442,10 @@ scan_next: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix VF mailbox message handling' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (87 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: revert fix mailbox communication with HW' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix minimum Tx frame length' " luca.boccassi ` (9 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Chengwen Feng; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c24c705ee88adc9bf573c01443a2d2f0818721c0 Thanks. Luca Boccassi --- From c24c705ee88adc9bf573c01443a2d2f0818721c0 Mon Sep 17 00:00:00 2001 From: Chengwen Feng <fengchengwen@huawei.com> Date: Fri, 30 Sep 2022 15:22:19 +0800 Subject: [PATCH] net/hns3: fix VF mailbox message handling [ upstream commit bc6eeb29c64e9eda1862dd8410eb9f49cc42e77a ] VF's command receive queue was mainly used to receive mailbox messages from PF. There are two type mailbox messages: request response message and message pushed by PF. There are two types of threads that can handle these messages: 1) the interrupt thread of the main process: it could handle both types of messages. 2) other threads: it could only handle request response messages. The collaboration mechanism between the two type threads is that other threads set the opcode of processed messages to zero so that the interrupt thread of the main process does not process these messages again. Unfortunately, the other threads mark the message pointed to by the crq->next-to-use variable which is fixed in the loop, not the message pointed to by the next-to-use variable. Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary process") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index e8d336f516..63ec11b838 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -435,7 +435,7 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw) * Clear opcode to inform intr thread don't process * again. */ - crq->desc[crq->next_to_use].opcode = 0; + crq->desc[next_to_use].opcode = 0; } scan_next: -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.973946177 +0000 +++ 0090-net-hns3-fix-VF-mailbox-message-handling.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From bc6eeb29c64e9eda1862dd8410eb9f49cc42e77a Mon Sep 17 00:00:00 2001 +From c24c705ee88adc9bf573c01443a2d2f0818721c0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bc6eeb29c64e9eda1862dd8410eb9f49cc42e77a ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -34 +35 @@ -index 910a16c999..8e0a58aa02 100644 +index e8d336f516..63ec11b838 100644 @@ -37 +38 @@ -@@ -429,7 +429,7 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw) +@@ -435,7 +435,7 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/hns3: fix minimum Tx frame length' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (88 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix VF mailbox message handling' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/nfp: fix memory leak in Rx' " luca.boccassi ` (8 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Jie Hai; +Cc: Dongdong Liu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4c5ddfcccb55feb496cec5a3aac64436ad06888c Thanks. Luca Boccassi --- From 4c5ddfcccb55feb496cec5a3aac64436ad06888c Mon Sep 17 00:00:00 2001 From: Jie Hai <haijie1@huawei.com> Date: Fri, 30 Sep 2022 15:22:20 +0800 Subject: [PATCH] net/hns3: fix minimum Tx frame length [ upstream commit 5f5391d45b87a374de424c62da1d0cba41ac7207 ] When packet length in Tx is less than length hardware supported, the minimum frame length in hns3 is used to do padding to avoid hardware error. Currently, this length is fixed by macro, which is very unfavorable for subsequent hardware evolution. So fix it as firmware report. Fixes: 395b5e08ef8d ("net/hns3: add Tx short frame padding compatibility") Signed-off-by: Jie Hai <haijie1@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> --- drivers/net/hns3/hns3_cmd.h | 6 ++++++ drivers/net/hns3/hns3_ethdev.c | 4 +++- drivers/net/hns3/hns3_ethdev.h | 3 +-- drivers/net/hns3/hns3_ethdev_vf.c | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index b7eaf924da..02bb6fa3c8 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -875,6 +875,12 @@ struct hns3_dev_specs_0_cmd { uint32_t max_tm_rate; }; +struct hns3_dev_specs_1_cmd { + uint8_t rsv0[12]; + uint8_t min_tx_pkt_len; + uint8_t rsv1[11]; +}; + #define HNS3_MAX_TQP_NUM_HIP08_PF 64 #define HNS3_DEFAULT_TX_BUF 0x4000 /* 16k bytes */ #define HNS3_TOTAL_PKT_BUF 0x108000 /* 1.03125M bytes */ diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 9cf96f4167..9eaa6f3fa0 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -3022,14 +3022,17 @@ static void hns3_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc) { struct hns3_dev_specs_0_cmd *req0; + struct hns3_dev_specs_1_cmd *req1; req0 = (struct hns3_dev_specs_0_cmd *)desc[0].data; + req1 = (struct hns3_dev_specs_1_cmd *)desc[1].data; hw->max_non_tso_bd_num = req0->max_non_tso_bd_num; hw->rss_ind_tbl_size = rte_le_to_cpu_16(req0->rss_ind_tbl_size); hw->rss_key_size = rte_le_to_cpu_16(req0->rss_key_size); hw->max_tm_rate = rte_le_to_cpu_32(req0->max_tm_rate); hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max); + hw->min_tx_pkt_len = req1->min_tx_pkt_len; } static int @@ -3129,7 +3132,6 @@ hns3_get_capability(struct hns3_hw *hw) hw->intr.gl_unit = HNS3_INTR_COALESCE_GL_UINT_1US; hw->tso_mode = HNS3_TSO_HW_CAL_PSEUDO_H_CSUM; hw->vlan_mode = HNS3_HW_SHIFT_AND_DISCARD_MODE; - hw->min_tx_pkt_len = HNS3_HIP09_MIN_TX_PKT_LEN; pf->tqp_config_mode = HNS3_FLEX_MAX_TQP_NUM_MODE; hw->rss_info.ipv6_sctp_offload_supported = true; hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE; diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index fcea844037..03969bccee 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -69,7 +69,6 @@ #define HNS3_DEFAULT_MTU 1500UL #define HNS3_DEFAULT_FRAME_LEN (HNS3_DEFAULT_MTU + HNS3_ETH_OVERHEAD) #define HNS3_HIP08_MIN_TX_PKT_LEN 33 -#define HNS3_HIP09_MIN_TX_PKT_LEN 9 #define HNS3_BITS_PER_BYTE 8 @@ -474,7 +473,7 @@ struct hns3_hw { * The minimum length of the packet supported by hardware in the Tx * direction. */ - uint32_t min_tx_pkt_len; + uint8_t min_tx_pkt_len; struct hns3_queue_intr intr; /* diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 17dbf48576..61e6b9a867 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1146,13 +1146,16 @@ static void hns3vf_parse_dev_specifications(struct hns3_hw *hw, struct hns3_cmd_desc *desc) { struct hns3_dev_specs_0_cmd *req0; + struct hns3_dev_specs_1_cmd *req1; req0 = (struct hns3_dev_specs_0_cmd *)desc[0].data; + req1 = (struct hns3_dev_specs_1_cmd *)desc[1].data; hw->max_non_tso_bd_num = req0->max_non_tso_bd_num; hw->rss_ind_tbl_size = rte_le_to_cpu_16(req0->rss_ind_tbl_size); hw->rss_key_size = rte_le_to_cpu_16(req0->rss_key_size); hw->intr.int_ql_max = rte_le_to_cpu_16(req0->intr_ql_max); + hw->min_tx_pkt_len = req1->min_tx_pkt_len; } static int @@ -1235,7 +1238,6 @@ hns3vf_get_capability(struct hns3_hw *hw) hw->intr.mapping_mode = HNS3_INTR_MAPPING_VEC_ALL; hw->intr.gl_unit = HNS3_INTR_COALESCE_GL_UINT_1US; hw->tso_mode = HNS3_TSO_HW_CAL_PSEUDO_H_CSUM; - hw->min_tx_pkt_len = HNS3_HIP09_MIN_TX_PKT_LEN; hw->rss_info.ipv6_sctp_offload_supported = true; hw->promisc_mode = HNS3_LIMIT_PROMISC_MODE; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.051537779 +0000 +++ 0091-net-hns3-fix-minimum-Tx-frame-length.patch 2022-11-03 09:27:25.557426003 +0000 @@ -1 +1 @@ -From 5f5391d45b87a374de424c62da1d0cba41ac7207 Mon Sep 17 00:00:00 2001 +From 4c5ddfcccb55feb496cec5a3aac64436ad06888c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5f5391d45b87a374de424c62da1d0cba41ac7207 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 8ac8b45819..994dfc48cc 100644 +index b7eaf924da..02bb6fa3c8 100644 @@ -28 +29 @@ -@@ -967,6 +967,12 @@ struct hns3_dev_specs_0_cmd { +@@ -875,6 +875,12 @@ struct hns3_dev_specs_0_cmd { @@ -38,3 +39,3 @@ - struct hns3_query_rpu_cmd { - uint32_t tc_queue_num; - uint32_t rsv1[2]; + #define HNS3_MAX_TQP_NUM_HIP08_PF 64 + #define HNS3_DEFAULT_TX_BUF 0x4000 /* 16k bytes */ + #define HNS3_TOTAL_PKT_BUF 0x108000 /* 1.03125M bytes */ @@ -42 +43 @@ -index 60e933998a..813fcedc6a 100644 +index 9cf96f4167..9eaa6f3fa0 100644 @@ -45 +46 @@ -@@ -2661,14 +2661,17 @@ static void +@@ -3022,14 +3022,17 @@ static void @@ -63 +64,2 @@ -@@ -2763,7 +2766,6 @@ hns3_get_capability(struct hns3_hw *hw) +@@ -3129,7 +3132,6 @@ hns3_get_capability(struct hns3_hw *hw) + hw->intr.gl_unit = HNS3_INTR_COALESCE_GL_UINT_1US; @@ -66 +67,0 @@ - hw->drop_stats_mode = HNS3_PKTS_DROP_STATS_MODE2; @@ -72 +73 @@ -index 9fe9766736..2457754b3d 100644 +index fcea844037..03969bccee 100644 @@ -75 +76 @@ -@@ -75,7 +75,6 @@ +@@ -69,7 +69,6 @@ @@ -83 +84 @@ -@@ -550,7 +549,7 @@ struct hns3_hw { +@@ -474,7 +473,7 @@ struct hns3_hw { @@ -93 +94 @@ -index 446a0cdbc7..c1bbcf42b1 100644 +index 17dbf48576..61e6b9a867 100644 @@ -96 +97 @@ -@@ -701,13 +701,16 @@ static void +@@ -1146,13 +1146,16 @@ static void @@ -113 +114,2 @@ -@@ -846,7 +849,6 @@ hns3vf_get_capability(struct hns3_hw *hw) +@@ -1235,7 +1238,6 @@ hns3vf_get_capability(struct hns3_hw *hw) + hw->intr.mapping_mode = HNS3_INTR_MAPPING_VEC_ALL; @@ -116 +117,0 @@ - hw->drop_stats_mode = HNS3_PKTS_DROP_STATS_MODE2; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/nfp: fix memory leak in Rx' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (89 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/hns3: fix minimum Tx frame length' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/dpaa: fix jumbo packet Rx in case of VSP' " luca.boccassi ` (7 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Long Wu; +Cc: Niklas Söderlund, Chaoyong He, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8975b80d61bcbb4f55f59eb93901f1104cd882e4 Thanks. Luca Boccassi --- From 8975b80d61bcbb4f55f59eb93901f1104cd882e4 Mon Sep 17 00:00:00 2001 From: Long Wu <long.wu@corigine.com> Date: Thu, 22 Sep 2022 15:09:44 +0200 Subject: [PATCH] net/nfp: fix memory leak in Rx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit bb340f56fcb7bac9ec04c1c1ca7a2a4f3012c848 ] nfp_net_recv_pkts() should not return a value that less than 0 and the inappropriate return value in receive loop also causes the memory leak. Modify code to avoid return a value less than 0. Furthermore, When nfp_net_recv_pkts() break out from the receive loop because of packet problems, a rte_mbuf will not be freed and it will cause memory leak. Free the rte_mbuf before break out. Fixes: b812daadad0d ("nfp: add Rx and Tx") Signed-off-by: Long Wu <long.wu@corigine.com> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com> --- drivers/net/nfp/nfp_net.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 4fa0bcc9e7..1c2b676676 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2041,8 +2041,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) struct rte_mbuf *new_mb; uint16_t nb_hold; uint64_t dma_addr; - int avail; + uint16_t avail; + avail = 0; rxq = rx_queue; if (unlikely(rxq == NULL)) { /* @@ -2050,11 +2051,10 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) * enabled. But the queue needs to be configured */ RTE_LOG_DP(ERR, PMD, "RX Bad queue\n"); - return -EINVAL; + return avail; } hw = rxq->hw; - avail = 0; nb_hold = 0; while (avail < nb_pkts) { @@ -2120,7 +2120,8 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) hw->rx_offset, rxq->mbuf_size - hw->rx_offset, mb->data_len); - return -EINVAL; + rte_pktmbuf_free(mb); + break; } /* Filling the received mbuf with packet info */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.125868676 +0000 +++ 0092-net-nfp-fix-memory-leak-in-Rx.patch 2022-11-03 09:27:25.557426003 +0000 @@ -1 +1 @@ -From bb340f56fcb7bac9ec04c1c1ca7a2a4f3012c848 Mon Sep 17 00:00:00 2001 +From 8975b80d61bcbb4f55f59eb93901f1104cd882e4 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit bb340f56fcb7bac9ec04c1c1ca7a2a4f3012c848 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ - drivers/net/nfp/nfp_rxtx.c | 9 +++++---- + drivers/net/nfp/nfp_net.c | 9 +++++---- @@ -26,5 +27,5 @@ -diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c -index c1a1aba539..b8c874d315 100644 ---- a/drivers/net/nfp/nfp_rxtx.c -+++ b/drivers/net/nfp/nfp_rxtx.c -@@ -247,8 +247,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c +index 4fa0bcc9e7..1c2b676676 100644 +--- a/drivers/net/nfp/nfp_net.c ++++ b/drivers/net/nfp/nfp_net.c +@@ -2041,8 +2041,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) @@ -41 +42 @@ -@@ -256,11 +257,10 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -2050,11 +2051,10 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) @@ -54 +55 @@ -@@ -326,7 +326,8 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -2120,7 +2120,8 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/dpaa: fix jumbo packet Rx in case of VSP' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (90 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/nfp: fix memory leak in Rx' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/dpaa: fix buffer freeing in slow path' " luca.boccassi ` (6 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Thanks. Luca Boccassi --- From 280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Mon Sep 17 00:00:00 2001 From: Rohit Raj <rohit.raj@nxp.com> Date: Fri, 7 Oct 2022 08:57:37 +0530 Subject: [PATCH] net/dpaa: fix jumbo packet Rx in case of VSP [ upstream commit 65afdda04b071dd8d7f8d4171a0c0578932adcd7 ] For packet length of size more than 2K bytes, segmented packets were being received in DPDK even if mbuf size was greater than packet length. This is due to the configuration in VSP. This patch fixes the issue by configuring the VSP according to the mbuf size configured during mempool configuration. Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile") Signed-off-by: Rohit Raj <rohit.raj@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- drivers/net/dpaa/dpaa_ethdev.c | 5 ++--- drivers/net/dpaa/dpaa_flow.c | 13 ++++++------- drivers/net/dpaa/dpaa_flow.h | 5 +++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index a792c55b85..f2dac65ccc 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -995,8 +995,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, DPAA_PMD_WARN("The requested maximum Rx packet size (%u) is" " larger than a single mbuf (%u) and scattered" " mode has not been requested", - dev->data->dev_conf.rxmode.max_rx_pkt_len, - buffsz - RTE_PKTMBUF_HEADROOM); + dev->data->dev_conf.rxmode.max_rx_pkt_len, buffsz); } dpaa_intf->bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); @@ -1011,7 +1010,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, if (vsp_id >= 0) { ret = dpaa_port_vsp_update(dpaa_intf, fmc_q, vsp_id, DPAA_MEMPOOL_TO_POOL_INFO(mp)->bpid, - fif); + fif, buffsz + RTE_PKTMBUF_HEADROOM); if (ret) { DPAA_PMD_ERR("dpaa_port_vsp_update failed"); return ret; diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c index c5b5ec8695..d14303cc20 100644 --- a/drivers/net/dpaa/dpaa_flow.c +++ b/drivers/net/dpaa/dpaa_flow.c @@ -939,7 +939,7 @@ int dpaa_fm_term(void) static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, uint8_t vsp_id, t_handle fman_handle, - struct fman_if *fif) + struct fman_if *fif, u32 mbuf_data_room_size) { t_fm_vsp_params vsp_params; t_fm_buffer_prefix_content buf_prefix_cont; @@ -976,10 +976,8 @@ static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, return -1; } vsp_params.ext_buf_pools.num_of_pools_used = 1; - vsp_params.ext_buf_pools.ext_buf_pool[0].id = - dpaa_intf->vsp_bpid[vsp_id]; - vsp_params.ext_buf_pools.ext_buf_pool[0].size = - RTE_MBUF_DEFAULT_BUF_SIZE; + vsp_params.ext_buf_pools.ext_buf_pool[0].id = dpaa_intf->vsp_bpid[vsp_id]; + vsp_params.ext_buf_pools.ext_buf_pool[0].size = mbuf_data_room_size; dpaa_intf->vsp_handle[vsp_id] = fm_vsp_config(&vsp_params); if (!dpaa_intf->vsp_handle[vsp_id]) { @@ -1023,7 +1021,7 @@ static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf, int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, bool fmc_mode, uint8_t vsp_id, uint32_t bpid, - struct fman_if *fif) + struct fman_if *fif, u32 mbuf_data_room_size) { int ret = 0; t_handle fman_handle; @@ -1054,7 +1052,8 @@ int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, dpaa_intf->vsp_bpid[vsp_id] = bpid; - return dpaa_port_vsp_configure(dpaa_intf, vsp_id, fman_handle, fif); + return dpaa_port_vsp_configure(dpaa_intf, vsp_id, fman_handle, fif, + mbuf_data_room_size); } int dpaa_port_vsp_cleanup(struct dpaa_if *dpaa_intf, struct fman_if *fif) diff --git a/drivers/net/dpaa/dpaa_flow.h b/drivers/net/dpaa/dpaa_flow.h index f5e131acfa..4742b8dd0a 100644 --- a/drivers/net/dpaa/dpaa_flow.h +++ b/drivers/net/dpaa/dpaa_flow.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2017,2019 NXP + * Copyright 2017,2019,2022 NXP */ #ifndef __DPAA_FLOW_H__ @@ -11,7 +11,8 @@ int dpaa_fm_config(struct rte_eth_dev *dev, uint64_t req_dist_set); int dpaa_fm_deconfig(struct dpaa_if *dpaa_intf, struct fman_if *fif); void dpaa_write_fm_config_to_file(void); int dpaa_port_vsp_update(struct dpaa_if *dpaa_intf, - bool fmc_mode, uint8_t vsp_id, uint32_t bpid, struct fman_if *fif); + bool fmc_mode, uint8_t vsp_id, uint32_t bpid, struct fman_if *fif, + u32 mbuf_data_room_size); int dpaa_port_vsp_cleanup(struct dpaa_if *dpaa_intf, struct fman_if *fif); int dpaa_port_fmc_init(struct fman_if *fif, uint32_t *fqids, int8_t *vspids, int max_nb_rxq); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.192909688 +0000 +++ 0093-net-dpaa-fix-jumbo-packet-Rx-in-case-of-VSP.patch 2022-11-03 09:27:25.561426079 +0000 @@ -1 +1 @@ -From 65afdda04b071dd8d7f8d4171a0c0578932adcd7 Mon Sep 17 00:00:00 2001 +From 280f5ddc781f915bd48c1b78d88b3f6eab2625a0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 65afdda04b071dd8d7f8d4171a0c0578932adcd7 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index c4aac424b4..3b4d6575c9 100644 +index a792c55b85..f2dac65ccc 100644 @@ -28,2 +29 @@ -@@ -989,8 +989,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, - } else { +@@ -995,8 +995,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -32,3 +32,4 @@ -- " mode has not been requested", -- max_rx_pktlen, buffsz - RTE_PKTMBUF_HEADROOM); -+ " mode has not been requested", max_rx_pktlen, buffsz); + " mode has not been requested", +- dev->data->dev_conf.rxmode.max_rx_pkt_len, +- buffsz - RTE_PKTMBUF_HEADROOM); ++ dev->data->dev_conf.rxmode.max_rx_pkt_len, buffsz); @@ -38 +39 @@ -@@ -1005,7 +1004,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -1011,7 +1010,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -48 +49 @@ -index 1ccd036027..690ba6bcb3 100644 +index c5b5ec8695..d14303cc20 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/dpaa: fix buffer freeing in slow path' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (91 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/dpaa: fix jumbo packet Rx in case of VSP' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'mempool: fix get objects from mempool with cache' " luca.boccassi ` (5 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Gagandeep Singh; +Cc: Hemant Agrawal, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/733e3713ae0bb72ec0cb87bbb5fd51b2c1ff92b6 Thanks. Luca Boccassi --- From 733e3713ae0bb72ec0cb87bbb5fd51b2c1ff92b6 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh <g.singh@nxp.com> Date: Fri, 7 Oct 2022 08:57:43 +0530 Subject: [PATCH] net/dpaa: fix buffer freeing in slow path [ upstream commit 0bf99a02cc0be9de2e182e204ee0be2f21c9e705 ] If there is any error in packet or taildrop feature is enabled, HW can reject those packets and put them in error queue. Driver poll this error queue to free the buffers. DPAA driver has an issue while freeing these rejected buffers. In case of scatter gather packets, it is preparing the mbuf SG list by scanning the HW descriptors and once the mbuf SG list prepared, it free only first segment of the mbuf SG list by calling the API rte_pktmbuf_free_seg(), This will leak the memory of other segments and mempool can be empty. Also there is one more issue, external buffer's memory may not belong to mempool so driver itself free the external buffer after successfully send the packet to HW to transmit instead of let the HW to free it. So transmit function free all the external buffers. But driver has no check for external buffers while freeing the rejected buffers and this can do double free the memory which can corrupt the user pool and crashes and undefined behaviour of system can be seen. This patch fixes the above mentioned issue by checking each and every segment and freeing all the segments except external. Fixes: 9124e65dd3eb ("net/dpaa: enable Tx queue taildrop") Signed-off-by: Gagandeep Singh <g.singh@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- drivers/net/dpaa/dpaa_rxtx.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index bf57eddca3..a69f97f145 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -445,7 +445,7 @@ dpaa_free_mbuf(const struct qm_fd *fd) bp_info = DPAA_BPID_TO_POOL_INFO(fd->bpid); format = (fd->opaque & DPAA_FD_FORMAT_MASK) >> DPAA_FD_FORMAT_SHIFT; if (unlikely(format == qm_fd_sg)) { - struct rte_mbuf *first_seg, *prev_seg, *cur_seg, *temp; + struct rte_mbuf *first_seg, *cur_seg; struct qm_sg_entry *sgt, *sg_temp; void *vaddr, *sg_vaddr; int i = 0; @@ -459,32 +459,25 @@ dpaa_free_mbuf(const struct qm_fd *fd) sgt = vaddr + fd_offset; sg_temp = &sgt[i++]; hw_sg_to_cpu(sg_temp); - temp = (struct rte_mbuf *) - ((char *)vaddr - bp_info->meta_data_size); sg_vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_sg_entry_get64(sg_temp)); - first_seg = (struct rte_mbuf *)((char *)sg_vaddr - bp_info->meta_data_size); first_seg->nb_segs = 1; - prev_seg = first_seg; while (i < DPAA_SGT_MAX_ENTRIES) { sg_temp = &sgt[i++]; hw_sg_to_cpu(sg_temp); - sg_vaddr = DPAA_MEMPOOL_PTOV(bp_info, + if (sg_temp->bpid != 0xFF) { + bp_info = DPAA_BPID_TO_POOL_INFO(sg_temp->bpid); + sg_vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_sg_entry_get64(sg_temp)); - cur_seg = (struct rte_mbuf *)((char *)sg_vaddr - + cur_seg = (struct rte_mbuf *)((char *)sg_vaddr - bp_info->meta_data_size); - first_seg->nb_segs += 1; - prev_seg->next = cur_seg; - if (sg_temp->final) { - cur_seg->next = NULL; + rte_pktmbuf_free_seg(cur_seg); + } + if (sg_temp->final) break; - } - prev_seg = cur_seg; } - - rte_pktmbuf_free_seg(temp); rte_pktmbuf_free_seg(first_seg); return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.246967685 +0000 +++ 0094-net-dpaa-fix-buffer-freeing-in-slow-path.patch 2022-11-03 09:27:25.561426079 +0000 @@ -1 +1 @@ -From 0bf99a02cc0be9de2e182e204ee0be2f21c9e705 Mon Sep 17 00:00:00 2001 +From 733e3713ae0bb72ec0cb87bbb5fd51b2c1ff92b6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0bf99a02cc0be9de2e182e204ee0be2f21c9e705 ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index 4d285b4f38..ce4f3d6c85 100644 +index bf57eddca3..a69f97f145 100644 @@ -41 +42 @@ -@@ -455,7 +455,7 @@ dpaa_free_mbuf(const struct qm_fd *fd) +@@ -445,7 +445,7 @@ dpaa_free_mbuf(const struct qm_fd *fd) @@ -50 +51 @@ -@@ -469,32 +469,25 @@ dpaa_free_mbuf(const struct qm_fd *fd) +@@ -459,32 +459,25 @@ dpaa_free_mbuf(const struct qm_fd *fd) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'mempool: fix get objects from mempool with cache' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (92 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/dpaa: fix buffer freeing in slow path' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'gro: trim tail padding bytes' " luca.boccassi ` (4 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Morten Brørup; +Cc: Andrew Rybchenko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/26cb4c81b552594292f7c744afb904f01700dfe8 Thanks. Luca Boccassi --- From 26cb4c81b552594292f7c744afb904f01700dfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com> Date: Fri, 7 Oct 2022 13:44:50 +0300 Subject: [PATCH] mempool: fix get objects from mempool with cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit a2833ecc5ea4adcbc3b77e7aeac2a6fd945da6a0 ] A flush threshold for the mempool cache was introduced in DPDK version 1.3, but rte_mempool_do_generic_get() was not completely updated back then, and some inefficiencies were introduced. Fix the following in rte_mempool_do_generic_get(): 1. The code that initially screens the cache request was not updated with the change in DPDK version 1.3. The initial screening compared the request length to the cache size, which was correct before, but became irrelevant with the introduction of the flush threshold. E.g. the cache can hold up to flushthresh objects, which is more than its size, so some requests were not served from the cache, even though they could be. The initial screening has now been corrected to match the initial screening in rte_mempool_do_generic_put(), which verifies that a cache is present, and that the length of the request does not overflow the memory allocated for the cache. This bug caused a major performance degradation in scenarios where the application burst length is the same as the cache size. In such cases, the objects were not ever fetched from the mempool cache, regardless if they could have been. This scenario occurs e.g. if an application has configured a mempool with a size matching the application's burst size. 2. The function is a helper for rte_mempool_generic_get(), so it must behave according to the description of that function. Specifically, objects must first be returned from the cache, subsequently from the backend. After the change in DPDK version 1.3, this was not the behavior when the request was partially satisfied from the cache; instead, the objects from the backend were returned ahead of the objects from the cache. This bug degraded application performance on CPUs with a small L1 cache, which benefit from having the hot objects first in the returned array. (This is probably also the reason why the function returns the objects in reverse order, which it still does.) Now, all code paths first return objects from the cache, subsequently from the backend. The function was not behaving as described (by the function using it) and expected by applications using it. This in itself is also a bug. 3. If the cache could not be backfilled, the function would attempt to get all the requested objects from the backend (instead of only the number of requested objects minus the objects available in the backend), and the function would fail if that failed. Now, the first part of the request is always satisfied from the cache, and if the subsequent backfilling of the cache from the backend fails, only the remaining requested objects are retrieved from the backend. The function would fail despite there are enough objects in the cache plus the common pool. 4. The code flow for satisfying the request from the cache was slightly inefficient: The likely code path where the objects are simply served from the cache was treated as unlikely. Now it is treated as likely. Signed-off-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> --- lib/librte_mempool/rte_mempool.h | 98 +++++++++++++++++++------------- 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 7516d90824..32032c53e1 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -1403,61 +1403,83 @@ rte_mempool_put(struct rte_mempool *mp, void *obj) * A pointer to a mempool cache structure. May be NULL if not needed. * @return * - >=0: Success; number of objects supplied. - * - <0: Error; code of ring dequeue function. + * - <0: Error; code of driver dequeue function. */ static __rte_always_inline int __mempool_generic_get(struct rte_mempool *mp, void **obj_table, unsigned int n, struct rte_mempool_cache *cache) { int ret; + unsigned int remaining = n; uint32_t index, len; void **cache_objs; - /* No cache provided or cannot be satisfied from cache */ - if (unlikely(cache == NULL || n >= cache->size)) - goto ring_dequeue; + /* No cache provided */ + if (unlikely(cache == NULL)) + goto driver_dequeue; - cache_objs = cache->objs; + /* Use the cache as much as we have to return hot objects first */ + len = RTE_MIN(remaining, cache->len); + cache_objs = &cache->objs[cache->len]; + cache->len -= len; + remaining -= len; + for (index = 0; index < len; index++) + *obj_table++ = *--cache_objs; - /* Can this be satisfied from the cache? */ - if (cache->len < n) { - /* No. Backfill the cache first, and then fill from it */ - uint32_t req = n + (cache->size - cache->len); + if (remaining == 0) { + /* The entire request is satisfied from the cache. */ - /* How many do we require i.e. number to fill the cache + the request */ - ret = rte_mempool_ops_dequeue_bulk(mp, - &cache->objs[cache->len], req); - if (unlikely(ret < 0)) { + __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); + __MEMPOOL_STAT_ADD(mp, get_success_objs, n); + + return 0; + } + + /* if dequeue below would overflow mem allocated for cache */ + if (unlikely(remaining > RTE_MEMPOOL_CACHE_MAX_SIZE)) + goto driver_dequeue; + + /* Fill the cache from the backend; fetch size + remaining objects. */ + ret = rte_mempool_ops_dequeue_bulk(mp, cache->objs, + cache->size + remaining); + if (unlikely(ret < 0)) { + /* + * We are buffer constrained, and not able to allocate + * cache + remaining. + * Do not fill the cache, just satisfy the remaining part of + * the request directly from the backend. + */ + goto driver_dequeue; + } + + /* Satisfy the remaining part of the request from the filled cache. */ + cache_objs = &cache->objs[cache->size + remaining]; + for (index = 0; index < remaining; index++) + *obj_table++ = *--cache_objs; + + cache->len = cache->size; + + __MEMPOOL_STAT_ADD(mp, get_success, n); + + return 0; + +driver_dequeue: + + /* Get remaining objects directly from the backend. */ + ret = rte_mempool_ops_dequeue_bulk(mp, obj_table, remaining); + + if (ret < 0) { + if (likely(cache != NULL)) { + cache->len = n - remaining; /* - * In the off chance that we are buffer constrained, - * where we are not able to allocate cache + n, go to - * the ring directly. If that fails, we are truly out of - * buffers. + * No further action is required to roll the first part + * of the request back into the cache, as objects in + * the cache are intact. */ - goto ring_dequeue; } - cache->len += req; - } - - /* Now fill in the response ... */ - for (index = 0, len = cache->len - 1; index < n; ++index, len--, obj_table++) - *obj_table = cache_objs[len]; - - cache->len -= n; - - __MEMPOOL_STAT_ADD(mp, get_success, n); - - return 0; - -ring_dequeue: - - /* get remaining objects from ring */ - ret = rte_mempool_ops_dequeue_bulk(mp, obj_table, n); - - if (ret < 0) __MEMPOOL_STAT_ADD(mp, get_fail, n); - else + } else __MEMPOOL_STAT_ADD(mp, get_success, n); return ret; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.305995971 +0000 +++ 0095-mempool-fix-get-objects-from-mempool-with-cache.patch 2022-11-03 09:27:25.565426157 +0000 @@ -1 +1 @@ -From a2833ecc5ea4adcbc3b77e7aeac2a6fd945da6a0 Mon Sep 17 00:00:00 2001 +From 26cb4c81b552594292f7c744afb904f01700dfe8 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit a2833ecc5ea4adcbc3b77e7aeac2a6fd945da6a0 ] + @@ -71,2 +73,2 @@ - lib/mempool/rte_mempool.h | 88 ++++++++++++++++++++++++--------------- - 1 file changed, 55 insertions(+), 33 deletions(-) + lib/librte_mempool/rte_mempool.h | 98 +++++++++++++++++++------------- + 1 file changed, 60 insertions(+), 38 deletions(-) @@ -74,5 +76,5 @@ -diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h -index 4c4af2a8ed..2401c4ac80 100644 ---- a/lib/mempool/rte_mempool.h -+++ b/lib/mempool/rte_mempool.h -@@ -1435,60 +1435,82 @@ rte_mempool_put(struct rte_mempool *mp, void *obj) +diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h +index 7516d90824..32032c53e1 100644 +--- a/lib/librte_mempool/rte_mempool.h ++++ b/lib/librte_mempool/rte_mempool.h +@@ -1403,61 +1403,83 @@ rte_mempool_put(struct rte_mempool *mp, void *obj) @@ -86,2 +88,2 @@ - rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table, - unsigned int n, struct rte_mempool_cache *cache) + __mempool_generic_get(struct rte_mempool *mp, void **obj_table, + unsigned int n, struct rte_mempool_cache *cache) @@ -97,22 +98,0 @@ -- -- cache_objs = cache->objs; -- -- /* Can this be satisfied from the cache? */ -- if (cache->len < n) { -- /* No. Backfill the cache first, and then fill from it */ -- uint32_t req = n + (cache->size - cache->len); -- -- /* How many do we require i.e. number to fill the cache + the request */ -- ret = rte_mempool_ops_dequeue_bulk(mp, -- &cache->objs[cache->len], req); -- if (unlikely(ret < 0)) { -- /* -- * In the off chance that we are buffer constrained, -- * where we are not able to allocate cache + n, go to -- * the ring directly. If that fails, we are truly out of -- * buffers. -- */ -- goto ring_dequeue; -- } -- -- cache->len += req; @@ -122 +102,2 @@ -+ + +- cache_objs = cache->objs; @@ -130 +111,5 @@ -+ + +- /* Can this be satisfied from the cache? */ +- if (cache->len < n) { +- /* No. Backfill the cache first, and then fill from it */ +- uint32_t req = n + (cache->size - cache->len); @@ -133,3 +118,7 @@ -+ -+ RTE_MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); -+ RTE_MEMPOOL_STAT_ADD(mp, get_success_objs, n); + +- /* How many do we require i.e. number to fill the cache + the request */ +- ret = rte_mempool_ops_dequeue_bulk(mp, +- &cache->objs[cache->len], req); +- if (unlikely(ret < 0)) { ++ __MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); ++ __MEMPOOL_STAT_ADD(mp, get_success_objs, n); @@ -155,5 +144,2 @@ - } - -- /* Now fill in the response ... */ -- for (index = 0, len = cache->len - 1; index < n; ++index, len--, obj_table++) -- *obj_table = cache_objs[len]; ++ } ++ @@ -164,2 +150 @@ - -- cache->len -= n; ++ @@ -167,7 +152,5 @@ - - RTE_MEMPOOL_STAT_ADD(mp, get_success_bulk, 1); - RTE_MEMPOOL_STAT_ADD(mp, get_success_objs, n); - - return 0; - --ring_dequeue: ++ ++ __MEMPOOL_STAT_ADD(mp, get_success, n); ++ ++ return 0; ++ @@ -175,3 +158 @@ - -- /* get remaining objects from ring */ -- ret = rte_mempool_ops_dequeue_bulk(mp, obj_table, n); ++ @@ -180,2 +161,2 @@ - - if (ret < 0) { ++ ++ if (ret < 0) { @@ -184 +165,5 @@ -+ /* + /* +- * In the off chance that we are buffer constrained, +- * where we are not able to allocate cache + n, go to +- * the ring directly. If that fails, we are truly out of +- * buffers. @@ -188,6 +173,29 @@ -+ */ -+ } -+ - RTE_MEMPOOL_STAT_ADD(mp, get_fail_bulk, 1); - RTE_MEMPOOL_STAT_ADD(mp, get_fail_objs, n); - } else { + */ +- goto ring_dequeue; + } + +- cache->len += req; +- } +- +- /* Now fill in the response ... */ +- for (index = 0, len = cache->len - 1; index < n; ++index, len--, obj_table++) +- *obj_table = cache_objs[len]; +- +- cache->len -= n; +- +- __MEMPOOL_STAT_ADD(mp, get_success, n); +- +- return 0; +- +-ring_dequeue: +- +- /* get remaining objects from ring */ +- ret = rte_mempool_ops_dequeue_bulk(mp, obj_table, n); +- +- if (ret < 0) + __MEMPOOL_STAT_ADD(mp, get_fail, n); +- else ++ } else + __MEMPOOL_STAT_ADD(mp, get_success, n); + + return ret; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'gro: trim tail padding bytes' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (93 preceding siblings ...) 2022-11-03 9:27 ` patch 'mempool: fix get objects from mempool with cache' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'net/bonding: fix Tx hash for TCP' " luca.boccassi ` (3 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Jun Qiu; +Cc: Jiayu Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7d752ff94e93f38e780bb53d7e6a44d423aeca6b Thanks. Luca Boccassi --- From 7d752ff94e93f38e780bb53d7e6a44d423aeca6b Mon Sep 17 00:00:00 2001 From: Jun Qiu <jun.qiu@jaguarmicro.com> Date: Wed, 27 Jul 2022 08:00:36 +0000 Subject: [PATCH] gro: trim tail padding bytes [ upstream commit b8a55871d5af6f5b8694b1cb5eacbc629734e403 ] Exclude CRC fields, the minimum Ethernet packet length is 60 bytes. When the actual packet length is less than 60 bytes, padding is added to the tail. When GRO is performed on a packet containing a padding field, mbuf->pkt_len is the one that contains the padding field, which leads to the error of thinking of the padding field as the actual content of the packet. We need to trim away this extra padding field during GRO processing. Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4") Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com> Acked-by: Jiayu Hu <Jiayu.hu@intel.com> --- lib/librte_gro/gro_tcp4.c | 7 ++++++- lib/librte_gro/gro_udp4.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c index 5f3b3a82ce..9bde7162b1 100644 --- a/lib/librte_gro/gro_tcp4.c +++ b/lib/librte_gro/gro_tcp4.c @@ -199,7 +199,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, struct rte_tcp_hdr *tcp_hdr; uint32_t sent_seq; int32_t tcp_dl; - uint16_t ip_id, hdr_len, frag_off; + uint16_t ip_id, hdr_len, frag_off, ip_tlen; uint8_t is_atomic; struct tcp4_flow_key key; @@ -234,6 +234,11 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, if (tcp_dl <= 0) return -1; + /* trim the tail padding bytes */ + ip_tlen = rte_be_to_cpu_16(ipv4_hdr->total_length); + if (pkt->pkt_len > (uint32_t)(ip_tlen + pkt->l2_len)) + rte_pktmbuf_trim(pkt, pkt->pkt_len - ip_tlen - pkt->l2_len); + /* * Save IPv4 ID for the packet whose DF bit is 0. For the packet * whose DF bit is 1, IPv4 ID is ignored. diff --git a/lib/librte_gro/gro_udp4.c b/lib/librte_gro/gro_udp4.c index b8301296df..517e12b12b 100644 --- a/lib/librte_gro/gro_udp4.c +++ b/lib/librte_gro/gro_udp4.c @@ -232,6 +232,10 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, if (ip_dl <= pkt->l3_len) return -1; + /* trim the tail padding bytes */ + if (pkt->pkt_len > (uint32_t)(ip_dl + pkt->l2_len)) + rte_pktmbuf_trim(pkt, pkt->pkt_len - ip_dl - pkt->l2_len); + ip_dl -= pkt->l3_len; ip_id = rte_be_to_cpu_16(ipv4_hdr->packet_id); frag_offset = rte_be_to_cpu_16(ipv4_hdr->fragment_offset); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.362453630 +0000 +++ 0096-gro-trim-tail-padding-bytes.patch 2022-11-03 09:27:25.565426157 +0000 @@ -1 +1 @@ -From b8a55871d5af6f5b8694b1cb5eacbc629734e403 Mon Sep 17 00:00:00 2001 +From 7d752ff94e93f38e780bb53d7e6a44d423aeca6b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b8a55871d5af6f5b8694b1cb5eacbc629734e403 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22,2 +23,2 @@ - lib/gro/gro_tcp4.c | 7 ++++++- - lib/gro/gro_udp4.c | 4 ++++ + lib/librte_gro/gro_tcp4.c | 7 ++++++- + lib/librte_gro/gro_udp4.c | 4 ++++ @@ -26,5 +27,5 @@ -diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c -index 9758e28fd5..8f5e800250 100644 ---- a/lib/gro/gro_tcp4.c -+++ b/lib/gro/gro_tcp4.c -@@ -198,7 +198,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, +diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c +index 5f3b3a82ce..9bde7162b1 100644 +--- a/lib/librte_gro/gro_tcp4.c ++++ b/lib/librte_gro/gro_tcp4.c +@@ -199,7 +199,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, @@ -39 +40 @@ -@@ -233,6 +233,11 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, +@@ -234,6 +234,11 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, @@ -51,5 +52,5 @@ -diff --git a/lib/gro/gro_udp4.c b/lib/gro/gro_udp4.c -index dd71135ada..839f9748b7 100644 ---- a/lib/gro/gro_udp4.c -+++ b/lib/gro/gro_udp4.c -@@ -231,6 +231,10 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, +diff --git a/lib/librte_gro/gro_udp4.c b/lib/librte_gro/gro_udp4.c +index b8301296df..517e12b12b 100644 +--- a/lib/librte_gro/gro_udp4.c ++++ b/lib/librte_gro/gro_udp4.c +@@ -232,6 +232,10 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix Tx hash for TCP' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (94 preceding siblings ...) 2022-11-03 9:27 ` patch 'gro: trim tail padding bytes' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'eal: fix data race in multi-process support' " luca.boccassi ` (2 subsequent siblings) 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Jun Qiu; +Cc: Min Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 Thanks. Luca Boccassi --- From 5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 Mon Sep 17 00:00:00 2001 From: Jun Qiu <jun.qiu@jaguarmicro.com> Date: Tue, 26 Jul 2022 06:19:24 +0000 Subject: [PATCH] net/bonding: fix Tx hash for TCP [ upstream commit 8168328854f1ff6ee319da8a4211584a30868e0e ] In the following two cases, tcp_hdr + sizeof(*tcp_hdr) == pkt_end, and the TCP port is not taken into account in calculating the HASH value of TCP packets. TCP connections with the same source and destination IP addresses will be hashed to the same slave port, which may cause load imbalance. 1. TCP Pure ACK packets with no options, The header length is 20 and there is no data. 2. A TCP packet contains data, but the first seg of the mbuf contains only the header information (ETH, IP, TCP), and the data is in subsequent segs, which is usually the case in the indirect mbuf used for zero-copy. Fixes: 726158060d55 ("net/bonding: fix potential out of bounds read") Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com> Acked-by: Min Hu (Connor) <humin29@huawei.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index f1c9a4299e..a73d5bd497 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -772,7 +772,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, ((char *)ipv4_hdr + ip_hdr_offset); if ((size_t)tcp_hdr + sizeof(*tcp_hdr) - < pkt_end) + <= pkt_end) l4hash = HASH_L4_PORTS(tcp_hdr); } else if (ipv4_hdr->next_proto_id == IPPROTO_UDP) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.413899661 +0000 +++ 0097-net-bonding-fix-Tx-hash-for-TCP.patch 2022-11-03 09:27:25.565426157 +0000 @@ -1 +1 @@ -From 8168328854f1ff6ee319da8a4211584a30868e0e Mon Sep 17 00:00:00 2001 +From 5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8168328854f1ff6ee319da8a4211584a30868e0e ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index fd2d95a751..4081b21338 100644 +index f1c9a4299e..a73d5bd497 100644 @@ -31 +32 @@ -@@ -768,7 +768,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, +@@ -772,7 +772,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eal: fix data race in multi-process support' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (95 preceding siblings ...) 2022-11-03 9:27 ` patch 'net/bonding: fix Tx hash for TCP' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'graph: fix node objects allocation' " luca.boccassi 2022-11-03 9:27 ` patch 'node: check Rx element " luca.boccassi 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Anatoly Burakov, Chengwen Feng, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4226f0bc512acc8f9e718c8f4599e2096febe306 Thanks. Luca Boccassi --- From 4226f0bc512acc8f9e718c8f4599e2096febe306 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Tue, 6 Sep 2022 09:45:22 -0700 Subject: [PATCH] eal: fix data race in multi-process support [ upstream commit 668958f3c1617f18e04ffee099656e7fb2effa94 ] If DPDK is built with thread sanitizer it reports a race in setting of multiprocess file descriptor. The fix is to use atomic operations when updating mp_fd. Build: $ meson -Db_sanitize=address build $ ninja -C build Simple example: $ .build/app/dpdk-testpmd -l 1-3 --no-huge EAL: Detected CPU lcores: 16 EAL: Detected NUMA nodes: 1 EAL: Static memory layout is selected, amount of reserved memory can be adjusted with -m or --socket-mem EAL: Detected static linkage of DPDK EAL: Multi-process socket /run/user/1000/dpdk/rte/mp_socket EAL: Selected IOVA mode 'VA' testpmd: No probed ethernet devices testpmd: create a new mbuf pool <mb_pool_0>: n=163456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc EAL: Error - exiting with code: 1 Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory ================== WARNING: ThreadSanitizer: data race (pid=87245) Write of size 4 at 0x558e04d8ff70 by main thread: #0 rte_mp_channel_cleanup <null> (dpdk-testpmd+0x1e7d30c) #1 rte_eal_cleanup <null> (dpdk-testpmd+0x1e85929) #2 rte_exit <null> (dpdk-testpmd+0x1e5bc0a) #3 mbuf_pool_create.cold <null> (dpdk-testpmd+0x274011) #4 main <null> (dpdk-testpmd+0x5cc15d) Previous read of size 4 at 0x558e04d8ff70 by thread T2: #0 mp_handle <null> (dpdk-testpmd+0x1e7c439) #1 ctrl_thread_init <null> (dpdk-testpmd+0x1e6ee1e) As if synchronized via sleep: #0 nanosleep libsanitizer/tsan/tsan_interceptors_posix.cpp:366 #1 get_tsc_freq <null> (dpdk-testpmd+0x1e92ff9) #2 set_tsc_freq <null> (dpdk-testpmd+0x1e6f2fc) #3 rte_eal_timer_init <null> (dpdk-testpmd+0x1e931a4) #4 rte_eal_init.cold <null> (dpdk-testpmd+0x29e578) #5 main <null> (dpdk-testpmd+0x5cbc45) Location is global 'mp_fd' of size 4 at 0x558e04d8ff70 (dpdk-testpmd+0x000003122f70) Thread T2 'rte_mp_handle' (tid=87248, running) created by main thread at: #0 pthread_create libsanitizer/tsan/tsan_interceptors_posix.cpp:969 #1 rte_ctrl_thread_create <null> (dpdk-testpmd+0x1e6efd0) #2 rte_mp_channel_init.cold <null> (dpdk-testpmd+0x29cb7c) #3 rte_eal_init <null> (dpdk-testpmd+0x1e8662e) #4 main <null> (dpdk-testpmd+0x5cbc45) SUMMARY: ThreadSanitizer: data race (app/dpdk-testpmd+0x1e7d30c) in rte_mp_channel_cleanup ================== ThreadSanitizer: reported 1 warnings Fixes: bacaa2754017 ("eal: add channel for multi-process communication") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com> --- lib/librte_eal/common/eal_common_proc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index b33d58ea0a..50f0668148 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -262,7 +262,7 @@ rte_mp_action_unregister(const char *name) } static int -read_msg(struct mp_msg_internal *m, struct sockaddr_un *s) +read_msg(int fd, struct mp_msg_internal *m, struct sockaddr_un *s) { int msglen; struct iovec iov; @@ -283,7 +283,7 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s) msgh.msg_controllen = sizeof(control); retry: - msglen = recvmsg(mp_fd, &msgh, 0); + msglen = recvmsg(fd, &msgh, 0); /* zero length message means socket was closed */ if (msglen == 0) @@ -392,11 +392,12 @@ mp_handle(void *arg __rte_unused) { struct mp_msg_internal msg; struct sockaddr_un sa; + int fd; - while (mp_fd >= 0) { + while ((fd = __atomic_load_n(&mp_fd, __ATOMIC_RELAXED)) >= 0) { int ret; - ret = read_msg(&msg, &sa); + ret = read_msg(fd, &msg, &sa); if (ret <= 0) break; @@ -640,9 +641,8 @@ rte_mp_channel_init(void) NULL, mp_handle, NULL) < 0) { RTE_LOG(ERR, EAL, "failed to create mp thread: %s\n", strerror(errno)); - close(mp_fd); close(dir_fd); - mp_fd = -1; + close(__atomic_exchange_n(&mp_fd, -1, __ATOMIC_RELAXED)); return -1; } @@ -658,11 +658,10 @@ rte_mp_channel_cleanup(void) { int fd; - if (mp_fd < 0) + fd = __atomic_exchange_n(&mp_fd, -1, __ATOMIC_RELAXED); + if (fd < 0) return; - fd = mp_fd; - mp_fd = -1; pthread_cancel(mp_handle_tid); pthread_join(mp_handle_tid, NULL); close_socket_fd(fd); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.478944906 +0000 +++ 0098-eal-fix-data-race-in-multi-process-support.patch 2022-11-03 09:27:25.569426235 +0000 @@ -1 +1 @@ -From 668958f3c1617f18e04ffee099656e7fb2effa94 Mon Sep 17 00:00:00 2001 +From 4226f0bc512acc8f9e718c8f4599e2096febe306 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 668958f3c1617f18e04ffee099656e7fb2effa94 ] + @@ -62 +63,0 @@ -Cc: stable@dpdk.org @@ -68 +69 @@ - lib/eal/common/eal_common_proc.c | 17 ++++++++--------- + lib/librte_eal/common/eal_common_proc.c | 17 ++++++++--------- @@ -71,5 +72,5 @@ -diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c -index 313060528f..1fc1d6c53b 100644 ---- a/lib/eal/common/eal_common_proc.c -+++ b/lib/eal/common/eal_common_proc.c -@@ -260,7 +260,7 @@ rte_mp_action_unregister(const char *name) +diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c +index b33d58ea0a..50f0668148 100644 +--- a/lib/librte_eal/common/eal_common_proc.c ++++ b/lib/librte_eal/common/eal_common_proc.c +@@ -262,7 +262,7 @@ rte_mp_action_unregister(const char *name) @@ -84 +85 @@ -@@ -281,7 +281,7 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s) +@@ -283,7 +283,7 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s) @@ -93 +94 @@ -@@ -390,11 +390,12 @@ mp_handle(void *arg __rte_unused) +@@ -392,11 +392,12 @@ mp_handle(void *arg __rte_unused) @@ -108 +109 @@ -@@ -638,9 +639,8 @@ rte_mp_channel_init(void) +@@ -640,9 +641,8 @@ rte_mp_channel_init(void) @@ -119 +120 @@ -@@ -656,11 +656,10 @@ rte_mp_channel_cleanup(void) +@@ -658,11 +658,10 @@ rte_mp_channel_cleanup(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'graph: fix node objects allocation' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (96 preceding siblings ...) 2022-11-03 9:27 ` patch 'eal: fix data race in multi-process support' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-03 9:27 ` patch 'node: check Rx element " luca.boccassi 98 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Zhirun Yan; +Cc: Cunming Liang, Jerin Jacob, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a82580c633eb1c63500b2a9a3b1004d8fbca5231 Thanks. Luca Boccassi --- From a82580c633eb1c63500b2a9a3b1004d8fbca5231 Mon Sep 17 00:00:00 2001 From: Zhirun Yan <zhirun.yan@intel.com> Date: Thu, 4 Aug 2022 14:02:41 +0800 Subject: [PATCH] graph: fix node objects allocation [ upstream commit afe67d1414a81004eae5a50561c724a36b025960 ] For __rte_node_enqueue_prologue(), if the number of objs is more than the node->size * 2, the extra objs will write out of bounds memory. It should use __rte_node_stream_alloc_size() to request enough memory. And for rte_node_next_stream_put(), it will re-allocate a small size, when the node free space is small and new objs is less than the current node->size. Some objs pointers behind new size may be lost. And it will cause memory leak. It should request enough size of memory, containing the original objs and new objs at least. Fixes: 40d4f51403ec ("graph: implement fastpath routines") Signed-off-by: Zhirun Yan <zhirun.yan@intel.com> Signed-off-by: Cunming Liang <cunming.liang@intel.com> Acked-by: Jerin Jacob <jerinj@marvell.com> --- lib/librte_graph/rte_graph_worker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_graph/rte_graph_worker.h b/lib/librte_graph/rte_graph_worker.h index 0c0b9c095a..6dc7461659 100644 --- a/lib/librte_graph/rte_graph_worker.h +++ b/lib/librte_graph/rte_graph_worker.h @@ -224,7 +224,7 @@ __rte_node_enqueue_prologue(struct rte_graph *graph, struct rte_node *node, __rte_node_enqueue_tail_update(graph, node); if (unlikely(node->size < (idx + space))) - __rte_node_stream_alloc(graph, node); + __rte_node_stream_alloc_size(graph, node, node->size + space); } /** @@ -432,7 +432,7 @@ rte_node_next_stream_get(struct rte_graph *graph, struct rte_node *node, uint16_t free_space = node->size - idx; if (unlikely(free_space < nb_objs)) - __rte_node_stream_alloc_size(graph, node, nb_objs); + __rte_node_stream_alloc_size(graph, node, node->size + nb_objs); return &node->objs[idx]; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.541879744 +0000 +++ 0099-graph-fix-node-objects-allocation.patch 2022-11-03 09:27:25.569426235 +0000 @@ -1 +1 @@ -From afe67d1414a81004eae5a50561c724a36b025960 Mon Sep 17 00:00:00 2001 +From a82580c633eb1c63500b2a9a3b1004d8fbca5231 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit afe67d1414a81004eae5a50561c724a36b025960 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ - lib/graph/rte_graph_worker.h | 4 ++-- + lib/librte_graph/rte_graph_worker.h | 4 ++-- @@ -26 +27 @@ -diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h +diff --git a/lib/librte_graph/rte_graph_worker.h b/lib/librte_graph/rte_graph_worker.h @@ -28,2 +29,2 @@ ---- a/lib/graph/rte_graph_worker.h -+++ b/lib/graph/rte_graph_worker.h +--- a/lib/librte_graph/rte_graph_worker.h ++++ b/lib/librte_graph/rte_graph_worker.h ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'node: check Rx element allocation' has been queued to stable release 20.11.7 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi ` (97 preceding siblings ...) 2022-11-03 9:27 ` patch 'graph: fix node objects allocation' " luca.boccassi @ 2022-11-03 9:27 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi 98 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-03 9:27 UTC (permalink / raw) To: Shiqi Liu; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cf01654a4a7d376605b282244cdb09753efb5ce9 Thanks. Luca Boccassi --- From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001 From: Shiqi Liu <835703180@qq.com> Date: Thu, 7 Jul 2022 17:23:45 +0800 Subject: [PATCH] node: check Rx element allocation [ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ] As the possible failure of the malloc(), the not_checked and checked could be NULL pointer. Therefore, it should be better to check it in order to avoid the dereference of the NULL pointer. Fixes: fa8054c8c889 ("examples/eventdev: add thread safe Tx worker pipeline") Signed-off-by: Shiqi Liu <835703180@qq.com> --- lib/librte_node/ethdev_ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c index 13b8b705f0..8a7429faa3 100644 --- a/lib/librte_node/ethdev_ctrl.c +++ b/lib/librte_node/ethdev_ctrl.c @@ -77,6 +77,8 @@ rte_node_eth_config(struct rte_node_ethdev_config *conf, uint16_t nb_confs, /* Add it to list of ethdev rx nodes for lookup */ elem = malloc(sizeof(ethdev_rx_node_elem_t)); + if (elem == NULL) + return -ENOMEM; memset(elem, 0, sizeof(ethdev_rx_node_elem_t)); elem->ctx.port_id = port_id; elem->ctx.queue_id = j; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.605765422 +0000 +++ 0100-node-check-Rx-element-allocation.patch 2022-11-03 09:27:25.569426235 +0000 @@ -1 +1 @@ -From d914c01036f7ca9c5e01f899df5961865b604b66 Mon Sep 17 00:00:00 2001 +From cf01654a4a7d376605b282244cdb09753efb5ce9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d914c01036f7ca9c5e01f899df5961865b604b66 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/node/ethdev_ctrl.c | 2 ++ + lib/librte_node/ethdev_ctrl.c | 2 ++ @@ -19,4 +20,4 @@ -diff --git a/lib/node/ethdev_ctrl.c b/lib/node/ethdev_ctrl.c -index 8d2e05a831..37df0431b8 100644 ---- a/lib/node/ethdev_ctrl.c -+++ b/lib/node/ethdev_ctrl.c +diff --git a/lib/librte_node/ethdev_ctrl.c b/lib/librte_node/ethdev_ctrl.c +index 13b8b705f0..8a7429faa3 100644 +--- a/lib/librte_node/ethdev_ctrl.c ++++ b/lib/librte_node/ethdev_ctrl.c ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix mode for new trace point' has been queued to stable release 20.11.7 2022-11-03 9:27 ` patch 'node: check Rx element " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode change' " luca.boccassi ` (45 more replies) 0 siblings, 46 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Jerin Jacob, Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8ca66f87baadda422b67d9265a1cafa1ec7b4da4 Thanks. Luca Boccassi --- From 8ca66f87baadda422b67d9265a1cafa1ec7b4da4 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Thu, 15 Sep 2022 10:13:23 +0200 Subject: [PATCH] trace: fix mode for new trace point [ upstream commit 12b627bf772eb122ae195c297b08adcb92c8ac93 ] If an application registers trace points later than rte_eal_init(), changes in the trace point mode were not applied. Fixes: 84c4fae4628f ("trace: implement operation APIs") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- lib/librte_eal/common/eal_common_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index 24e27387b1..080278333d 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -513,6 +513,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, /* Form the trace handle */ *handle = sz; *handle |= trace.nb_trace_points << __RTE_TRACE_FIELD_ID_SHIFT; + trace_mode_set(handle, trace.mode); trace.nb_trace_points++; tp->handle = handle; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:08.917725984 +0000 +++ 0001-trace-fix-mode-for-new-trace-point.patch 2022-11-05 17:11:08.550939979 +0000 @@ -1 +1 @@ -From 12b627bf772eb122ae195c297b08adcb92c8ac93 Mon Sep 17 00:00:00 2001 +From 8ca66f87baadda422b67d9265a1cafa1ec7b4da4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 12b627bf772eb122ae195c297b08adcb92c8ac93 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/eal/common/eal_common_trace.c | 1 + + lib/librte_eal/common/eal_common_trace.c | 1 + @@ -19,5 +20,5 @@ -diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c -index f9b187d15f..d5dbc7d667 100644 ---- a/lib/eal/common/eal_common_trace.c -+++ b/lib/eal/common/eal_common_trace.c -@@ -512,6 +512,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, +diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c +index 24e27387b1..080278333d 100644 +--- a/lib/librte_eal/common/eal_common_trace.c ++++ b/lib/librte_eal/common/eal_common_trace.c +@@ -513,6 +513,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix mode change' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix leak with regexp' " luca.boccassi ` (44 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7c1e74d8b76d81854c1dde35b809200157f33346 Thanks. Luca Boccassi --- From 7c1e74d8b76d81854c1dde35b809200157f33346 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Thu, 15 Sep 2022 10:20:55 +0200 Subject: [PATCH] trace: fix mode change [ upstream commit 15596638721b3d26bdadb5f757402a2942b735ad ] The API does not state that changing mode should be refused if no trace point is enabled. Remove this limitation. Fixes: 84c4fae4628f ("trace: implement operation APIs") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- app/test/test_trace.c | 3 --- lib/librte_eal/common/eal_common_trace.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index 0f9df83c40..acf32d5082 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -101,9 +101,6 @@ test_trace_mode(void) current = rte_trace_mode_get(); - if (!rte_trace_is_enabled()) - return TEST_SKIPPED; - rte_trace_mode_set(RTE_TRACE_MODE_DISCARD); if (rte_trace_mode_get() != RTE_TRACE_MODE_DISCARD) goto failed; diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index 080278333d..3f4b5c5876 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -127,9 +127,6 @@ rte_trace_mode_set(enum rte_trace_mode mode) { struct trace_point *tp; - if (!rte_trace_is_enabled()) - return; - STAILQ_FOREACH(tp, &tp_list, next) trace_mode_set(tp->handle, mode); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:08.986275734 +0000 +++ 0002-trace-fix-mode-change.patch 2022-11-05 17:11:08.558940152 +0000 @@ -1 +1 @@ -From 15596638721b3d26bdadb5f757402a2942b735ad Mon Sep 17 00:00:00 2001 +From 7c1e74d8b76d81854c1dde35b809200157f33346 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 15596638721b3d26bdadb5f757402a2942b735ad ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15,2 +16,2 @@ - app/test/test_trace.c | 3 --- - lib/eal/common/eal_common_trace.c | 3 --- + app/test/test_trace.c | 3 --- + lib/librte_eal/common/eal_common_trace.c | 3 --- @@ -20 +21 @@ -index 76af79162b..44ac38a4fa 100644 +index 0f9df83c40..acf32d5082 100644 @@ -23 +24 @@ -@@ -126,9 +126,6 @@ test_trace_mode(void) +@@ -101,9 +101,6 @@ test_trace_mode(void) @@ -33,4 +34,4 @@ -diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c -index d5dbc7d667..1b86f5d2d2 100644 ---- a/lib/eal/common/eal_common_trace.c -+++ b/lib/eal/common/eal_common_trace.c +diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c +index 080278333d..3f4b5c5876 100644 +--- a/lib/librte_eal/common/eal_common_trace.c ++++ b/lib/librte_eal/common/eal_common_trace.c ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix leak with regexp' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode change' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix dynamically enabling trace points' " luca.boccassi ` (43 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Jerin Jacob, Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/207496d05733265802965e2f80419d884aa3a905 Thanks. Luca Boccassi --- From 207496d05733265802965e2f80419d884aa3a905 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Wed, 14 Sep 2022 16:36:36 +0200 Subject: [PATCH] trace: fix leak with regexp [ upstream commit b980ced067d226d9f43d0c77bf07b6e6bd78f166 ] The precompiled buffer initialised in regcomp must be freed before leaving rte_trace_regexp. Fixes: 84c4fae4628f ("trace: implement operation APIs") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- lib/librte_eal/common/eal_common_trace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index 3f4b5c5876..22b7fcd33b 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -218,8 +218,10 @@ rte_trace_regexp(const char *regex, bool enable) rc = rte_trace_point_disable(tp->handle); found = 1; } - if (rc < 0) - return rc; + if (rc < 0) { + found = 0; + break; + } } regfree(&r); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.065718137 +0000 +++ 0003-trace-fix-leak-with-regexp.patch 2022-11-05 17:11:08.558940152 +0000 @@ -1 +1 @@ -From b980ced067d226d9f43d0c77bf07b6e6bd78f166 Mon Sep 17 00:00:00 2001 +From 207496d05733265802965e2f80419d884aa3a905 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b980ced067d226d9f43d0c77bf07b6e6bd78f166 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/eal/common/eal_common_trace.c | 6 ++++-- + lib/librte_eal/common/eal_common_trace.c | 6 ++++-- @@ -19,4 +20,4 @@ -diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c -index 1b86f5d2d2..1db11e3e14 100644 ---- a/lib/eal/common/eal_common_trace.c -+++ b/lib/eal/common/eal_common_trace.c +diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c +index 3f4b5c5876..22b7fcd33b 100644 +--- a/lib/librte_eal/common/eal_common_trace.c ++++ b/lib/librte_eal/common/eal_common_trace.c ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix dynamically enabling trace points' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode change' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix leak with regexp' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix race in debug dump' " luca.boccassi ` (42 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f99c93eb1d8344c828278bc8812c019037e45b8c Thanks. Luca Boccassi --- From f99c93eb1d8344c828278bc8812c019037e45b8c Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Wed, 14 Sep 2022 14:05:04 +0200 Subject: [PATCH] trace: fix dynamically enabling trace points [ upstream commit d6fd5a018e237adb04d6a7143a8535cb66ab062e ] Enabling trace points at runtime was not working if no trace point had been enabled first at rte_eal_init() time. The reason was that trace.args reflected the arguments passed to --trace= EAL option. To fix this: - the trace subsystem initialisation is updated: trace directory creation is deferred to when traces are dumped (to avoid creating directories that may not be used), - per lcore memory allocation still relies on rte_trace_is_enabled() but this helper now tracks if any trace point is enabled. The documentation is updated accordingly, - cleanup helpers must always be called in rte_eal_cleanup() since some trace points might have been enabled and disabled in the lifetime of the DPDK application, With this fix, we can update the unit test and check that a trace point callback is invoked when expected. Note: - the 'trace' global variable might be shadowed with the argument passed to the functions dealing with trace point handles. 'tp' has been used for referring to trace_point object. Prefer 't' for referring to handles, Fixes: 84c4fae4628f ("trace: implement operation APIs") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- app/test/test_trace.c | 20 +++++++ app/test/test_trace.h | 2 + doc/guides/prog_guide/trace_lib.rst | 14 +++-- lib/librte_eal/common/eal_common_trace.c | 53 ++++++++----------- .../common/eal_common_trace_utils.c | 11 +++- lib/librte_eal/common/eal_trace.h | 3 +- 6 files changed, 65 insertions(+), 38 deletions(-) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index acf32d5082..f62a385af9 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -9,6 +9,8 @@ #include "test.h" #include "test_trace.h" +int app_dpdk_test_tp_count; + static int32_t test_trace_point_globbing(void) { @@ -70,8 +72,15 @@ failed: static int32_t test_trace_point_disable_enable(void) { + int expected; int rc; + /* At tp registration, the associated counter increases once. */ + expected = 1; + TEST_ASSERT_EQUAL(app_dpdk_test_tp_count, expected, + "Expecting %d, but got %d for app_dpdk_test_tp_count", + expected, app_dpdk_test_tp_count); + rc = rte_trace_point_disable(&__app_dpdk_test_tp); if (rc < 0) goto failed; @@ -79,6 +88,12 @@ test_trace_point_disable_enable(void) if (rte_trace_point_is_enabled(&__app_dpdk_test_tp)) goto failed; + /* No emission expected */ + app_dpdk_test_tp("app.dpdk.test.tp"); + TEST_ASSERT_EQUAL(app_dpdk_test_tp_count, expected, + "Expecting %d, but got %d for app_dpdk_test_tp_count", + expected, app_dpdk_test_tp_count); + rc = rte_trace_point_enable(&__app_dpdk_test_tp); if (rc < 0) goto failed; @@ -88,6 +103,11 @@ test_trace_point_disable_enable(void) /* Emit the trace */ app_dpdk_test_tp("app.dpdk.test.tp"); + expected++; + TEST_ASSERT_EQUAL(app_dpdk_test_tp_count, expected, + "Expecting %d, but got %d for app_dpdk_test_tp_count", + expected, app_dpdk_test_tp_count); + return TEST_SUCCESS; failed: diff --git a/app/test/test_trace.h b/app/test/test_trace.h index 413842f60d..4ad44e2bea 100644 --- a/app/test/test_trace.h +++ b/app/test/test_trace.h @@ -3,10 +3,12 @@ */ #include <rte_trace_point.h> +extern int app_dpdk_test_tp_count; RTE_TRACE_POINT( app_dpdk_test_tp, RTE_TRACE_POINT_ARGS(const char *str), rte_trace_point_emit_string(str); + app_dpdk_test_tp_count++; ) RTE_TRACE_POINT_FP( diff --git a/doc/guides/prog_guide/trace_lib.rst b/doc/guides/prog_guide/trace_lib.rst index fbadf9fde9..9a8f38073d 100644 --- a/doc/guides/prog_guide/trace_lib.rst +++ b/doc/guides/prog_guide/trace_lib.rst @@ -271,10 +271,16 @@ Trace memory The trace memory will be allocated through an internal function ``__rte_trace_mem_per_thread_alloc()``. The trace memory will be allocated per thread to enable lock less trace-emit function. -The memory for the trace memory for DPDK lcores will be allocated on -``rte_eal_init()`` if the trace is enabled through a EAL option. -For non DPDK threads, on the first trace emission, the memory will be -allocated. + +For non lcore threads, the trace memory is allocated on the first trace +emission. + +For lcore threads, if trace points are enabled through a EAL option, the trace +memory is allocated when the threads are known of DPDK +(``rte_eal_init`` for EAL lcores, ``rte_thread_register`` for non-EAL lcores). +Otherwise, when trace points are enabled later in the life of the application, +the behavior is the same as non lcore threads and the trace memory is allocated +on the first trace emission. Trace memory layout ~~~~~~~~~~~~~~~~~~~ diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index 22b7fcd33b..8594893a82 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -48,12 +48,6 @@ eal_trace_init(void) goto fail; } - if (!STAILQ_EMPTY(&trace.args)) - trace.status = true; - - if (!rte_trace_is_enabled()) - return 0; - rte_spinlock_init(&trace.lock); /* Is duplicate trace name registered */ @@ -72,13 +66,9 @@ eal_trace_init(void) if (trace_metadata_create() < 0) goto fail; - /* Create trace directory */ - if (trace_mkdir()) - goto free_meta; - /* Save current epoch timestamp for future use */ if (trace_epoch_time_save() < 0) - goto fail; + goto free_meta; /* Apply global configurations */ STAILQ_FOREACH(arg, &trace.args, next) @@ -98,8 +88,6 @@ fail: void eal_trace_fini(void) { - if (!rte_trace_is_enabled()) - return; trace_mem_free(); trace_metadata_destroy(); eal_trace_args_free(); @@ -108,17 +96,17 @@ eal_trace_fini(void) bool rte_trace_is_enabled(void) { - return trace.status; + return __atomic_load_n(&trace.status, __ATOMIC_ACQUIRE) != 0; } static void -trace_mode_set(rte_trace_point_t *trace, enum rte_trace_mode mode) +trace_mode_set(rte_trace_point_t *t, enum rte_trace_mode mode) { if (mode == RTE_TRACE_MODE_OVERWRITE) - __atomic_and_fetch(trace, ~__RTE_TRACE_FIELD_ENABLE_DISCARD, + __atomic_and_fetch(t, ~__RTE_TRACE_FIELD_ENABLE_DISCARD, __ATOMIC_RELEASE); else - __atomic_or_fetch(trace, __RTE_TRACE_FIELD_ENABLE_DISCARD, + __atomic_or_fetch(t, __RTE_TRACE_FIELD_ENABLE_DISCARD, __ATOMIC_RELEASE); } @@ -146,36 +134,42 @@ trace_point_is_invalid(rte_trace_point_t *t) } bool -rte_trace_point_is_enabled(rte_trace_point_t *trace) +rte_trace_point_is_enabled(rte_trace_point_t *t) { uint64_t val; - if (trace_point_is_invalid(trace)) + if (trace_point_is_invalid(t)) return false; - val = __atomic_load_n(trace, __ATOMIC_ACQUIRE); + val = __atomic_load_n(t, __ATOMIC_ACQUIRE); return (val & __RTE_TRACE_FIELD_ENABLE_MASK) != 0; } int -rte_trace_point_enable(rte_trace_point_t *trace) +rte_trace_point_enable(rte_trace_point_t *t) { - if (trace_point_is_invalid(trace)) + uint64_t prev; + + if (trace_point_is_invalid(t)) return -ERANGE; - __atomic_or_fetch(trace, __RTE_TRACE_FIELD_ENABLE_MASK, - __ATOMIC_RELEASE); + prev = __atomic_fetch_or(t, __RTE_TRACE_FIELD_ENABLE_MASK, __ATOMIC_RELEASE); + if ((prev & __RTE_TRACE_FIELD_ENABLE_MASK) == 0) + __atomic_add_fetch(&trace.status, 1, __ATOMIC_RELEASE); return 0; } int -rte_trace_point_disable(rte_trace_point_t *trace) +rte_trace_point_disable(rte_trace_point_t *t) { - if (trace_point_is_invalid(trace)) + uint64_t prev; + + if (trace_point_is_invalid(t)) return -ERANGE; - __atomic_and_fetch(trace, ~__RTE_TRACE_FIELD_ENABLE_MASK, - __ATOMIC_RELEASE); + prev = __atomic_fetch_and(t, ~__RTE_TRACE_FIELD_ENABLE_MASK, __ATOMIC_RELEASE); + if ((prev & __RTE_TRACE_FIELD_ENABLE_MASK) != 0) + __atomic_sub_fetch(&trace.status, 1, __ATOMIC_RELEASE); return 0; } @@ -413,9 +407,6 @@ trace_mem_free(void) struct trace *trace = trace_obj_get(); uint32_t count; - if (!rte_trace_is_enabled()) - return; - rte_spinlock_lock(&trace->lock); for (count = 0; count < trace->nb_trace_mem_list; count++) { trace_mem_per_thread_free_unlocked(&trace->lcore_meta[count]); diff --git a/lib/librte_eal/common/eal_common_trace_utils.c b/lib/librte_eal/common/eal_common_trace_utils.c index 2b55dbec65..7bf1c05e12 100644 --- a/lib/librte_eal/common/eal_common_trace_utils.c +++ b/lib/librte_eal/common/eal_common_trace_utils.c @@ -314,14 +314,18 @@ trace_dir_default_path_get(char *dir_path) return 0; } -int +static int trace_mkdir(void) { struct trace *trace = trace_obj_get(); char session[TRACE_DIR_STR_LEN]; + static bool already_done; char *dir_path; int rc; + if (already_done) + return 0; + if (!trace->dir_offset) { dir_path = calloc(1, sizeof(trace->dir)); if (dir_path == NULL) { @@ -365,6 +369,7 @@ trace_mkdir(void) } RTE_LOG(INFO, EAL, "Trace dir: %s\n", trace->dir); + already_done = true; return 0; } @@ -434,6 +439,10 @@ rte_trace_save(void) if (trace->nb_trace_mem_list == 0) return rc; + rc = trace_mkdir(); + if (rc < 0) + return rc; + rc = trace_meta_save(trace); if (rc) return rc; diff --git a/lib/librte_eal/common/eal_trace.h b/lib/librte_eal/common/eal_trace.h index 06751eb23a..72a5a461ae 100644 --- a/lib/librte_eal/common/eal_trace.h +++ b/lib/librte_eal/common/eal_trace.h @@ -54,7 +54,7 @@ struct trace { char dir[PATH_MAX]; int dir_offset; int register_errno; - bool status; + uint32_t status; enum rte_trace_mode mode; rte_uuid_t uuid; uint32_t buff_len; @@ -104,7 +104,6 @@ void trace_uuid_generate(void); int trace_metadata_create(void); void trace_metadata_destroy(void); char *trace_metadata_fixup_field(const char *field); -int trace_mkdir(void); int trace_epoch_time_save(void); void trace_mem_free(void); void trace_mem_per_thread_free(void); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.135808070 +0000 +++ 0004-trace-fix-dynamically-enabling-trace-points.patch 2022-11-05 17:11:08.566940324 +0000 @@ -1 +1 @@ -From d6fd5a018e237adb04d6a7143a8535cb66ab062e Mon Sep 17 00:00:00 2001 +From f99c93eb1d8344c828278bc8812c019037e45b8c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d6fd5a018e237adb04d6a7143a8535cb66ab062e ] + @@ -31 +32,0 @@ -Cc: stable@dpdk.org @@ -36,6 +37,6 @@ - app/test/test_trace.c | 20 ++++++++++ - app/test/test_trace.h | 2 + - doc/guides/prog_guide/trace_lib.rst | 14 +++++-- - lib/eal/common/eal_common_trace.c | 53 ++++++++++--------------- - lib/eal/common/eal_common_trace_utils.c | 11 ++++- - lib/eal/common/eal_trace.h | 3 +- + app/test/test_trace.c | 20 +++++++ + app/test/test_trace.h | 2 + + doc/guides/prog_guide/trace_lib.rst | 14 +++-- + lib/librte_eal/common/eal_common_trace.c | 53 ++++++++----------- + .../common/eal_common_trace_utils.c | 11 +++- + lib/librte_eal/common/eal_trace.h | 3 +- @@ -45 +46 @@ -index 44ac38a4fa..2660f52f1d 100644 +index acf32d5082..f62a385af9 100644 @@ -54,4 +55,4 @@ - #ifdef RTE_EXEC_ENV_WINDOWS - - static int -@@ -95,8 +97,15 @@ failed: + static int32_t + test_trace_point_globbing(void) + { +@@ -70,8 +72,15 @@ failed: @@ -73 +74 @@ -@@ -104,6 +113,12 @@ test_trace_point_disable_enable(void) +@@ -79,6 +88,12 @@ test_trace_point_disable_enable(void) @@ -86 +87 @@ -@@ -113,6 +128,11 @@ test_trace_point_disable_enable(void) +@@ -88,6 +103,11 @@ test_trace_point_disable_enable(void) @@ -140,4 +141,4 @@ -diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c -index 6b8660c318..6aa11a3b50 100644 ---- a/lib/eal/common/eal_common_trace.c -+++ b/lib/eal/common/eal_common_trace.c +diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c +index 22b7fcd33b..8594893a82 100644 +--- a/lib/librte_eal/common/eal_common_trace.c ++++ b/lib/librte_eal/common/eal_common_trace.c @@ -257 +258 @@ -@@ -417,9 +411,6 @@ trace_mem_free(void) +@@ -413,9 +407,6 @@ trace_mem_free(void) @@ -267 +268 @@ -diff --git a/lib/eal/common/eal_common_trace_utils.c b/lib/eal/common/eal_common_trace_utils.c +diff --git a/lib/librte_eal/common/eal_common_trace_utils.c b/lib/librte_eal/common/eal_common_trace_utils.c @@ -269,2 +270,2 @@ ---- a/lib/eal/common/eal_common_trace_utils.c -+++ b/lib/eal/common/eal_common_trace_utils.c +--- a/lib/librte_eal/common/eal_common_trace_utils.c ++++ b/lib/librte_eal/common/eal_common_trace_utils.c @@ -310 +311 @@ -diff --git a/lib/eal/common/eal_trace.h b/lib/eal/common/eal_trace.h +diff --git a/lib/librte_eal/common/eal_trace.h b/lib/librte_eal/common/eal_trace.h @@ -312,2 +313,2 @@ ---- a/lib/eal/common/eal_trace.h -+++ b/lib/eal/common/eal_trace.h +--- a/lib/librte_eal/common/eal_trace.h ++++ b/lib/librte_eal/common/eal_trace.h ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix race in debug dump' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (2 preceding siblings ...) 2022-11-05 17:11 ` patch 'trace: fix dynamically enabling trace points' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix metadata " luca.boccassi ` (41 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Jerin Jacob, Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f4cb97882bf55eaa58a1d627bd7fe912cfa0a420 Thanks. Luca Boccassi --- From f4cb97882bf55eaa58a1d627bd7fe912cfa0a420 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Wed, 14 Sep 2022 13:45:42 +0200 Subject: [PATCH] trace: fix race in debug dump [ upstream commit 782dbf1791911eece2557b1a4b6f7c0ea57ea690 ] trace->nb_trace_mem_list access must be under trace->lock to avoid races with threads allocating/freeing their trace buffers. Fixes: f6b2d65dcd5d ("trace: implement debug dump") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- lib/librte_eal/common/eal_common_trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c index 8594893a82..f9b26ab3ca 100644 --- a/lib/librte_eal/common/eal_common_trace.c +++ b/lib/librte_eal/common/eal_common_trace.c @@ -255,10 +255,9 @@ trace_lcore_mem_dump(FILE *f) struct __rte_trace_header *header; uint32_t count; + rte_spinlock_lock(&trace->lock); if (trace->nb_trace_mem_list == 0) - return; - - rte_spinlock_lock(&trace->lock); + goto out; fprintf(f, "nb_trace_mem_list = %d\n", trace->nb_trace_mem_list); fprintf(f, "\nTrace mem info\n--------------\n"); for (count = 0; count < trace->nb_trace_mem_list; count++) { @@ -269,6 +268,7 @@ trace_lcore_mem_dump(FILE *f) header->stream_header.lcore_id, header->stream_header.thread_name); } +out: rte_spinlock_unlock(&trace->lock); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.204111079 +0000 +++ 0005-trace-fix-race-in-debug-dump.patch 2022-11-05 17:11:08.570940409 +0000 @@ -1 +1 @@ -From 782dbf1791911eece2557b1a4b6f7c0ea57ea690 Mon Sep 17 00:00:00 2001 +From f4cb97882bf55eaa58a1d627bd7fe912cfa0a420 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 782dbf1791911eece2557b1a4b6f7c0ea57ea690 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/eal/common/eal_common_trace.c | 6 +++--- + lib/librte_eal/common/eal_common_trace.c | 6 +++--- @@ -19,5 +20,5 @@ -diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c -index 6aa11a3b50..ec168e37b3 100644 ---- a/lib/eal/common/eal_common_trace.c -+++ b/lib/eal/common/eal_common_trace.c -@@ -259,10 +259,9 @@ trace_lcore_mem_dump(FILE *f) +diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c +index 8594893a82..f9b26ab3ca 100644 +--- a/lib/librte_eal/common/eal_common_trace.c ++++ b/lib/librte_eal/common/eal_common_trace.c +@@ -255,10 +255,9 @@ trace_lcore_mem_dump(FILE *f) @@ -36 +37 @@ -@@ -273,6 +272,7 @@ trace_lcore_mem_dump(FILE *f) +@@ -269,6 +268,7 @@ trace_lcore_mem_dump(FILE *f) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'trace: fix metadata dump' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (3 preceding siblings ...) 2022-11-05 17:11 ` patch 'trace: fix race in debug dump' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'pdump: do not allow enable/disable in primary process' " luca.boccassi ` (40 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: David Marchand; +Cc: Sunil Kumar Kori, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/db083f78abf44f454c667fcdb5693d0b8112d02a Thanks. Luca Boccassi --- From db083f78abf44f454c667fcdb5693d0b8112d02a Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Thu, 15 Sep 2022 13:35:46 +0200 Subject: [PATCH] trace: fix metadata dump [ upstream commit d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 ] The API does not describe that metadata dump is conditioned to enabling any trace points. While at it, merge dump unit tests into the generic trace_autotest to enhance coverage. Fixes: f6b2d65dcd5d ("trace: implement debug dump") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> --- app/test/test_trace.c | 36 +++++++++++--------- lib/librte_eal/common/eal_common_trace_ctf.c | 3 -- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index f62a385af9..4dd083fedc 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -189,6 +189,23 @@ test_generic_trace_points(void) return TEST_SUCCESS; } +static int +test_trace_dump(void) +{ + rte_trace_dump(stdout); + return 0; +} + +REGISTER_TEST_COMMAND(trace_dump, test_trace_dump); + +static int +test_trace_metadata_dump(void) +{ + return rte_trace_metadata_dump(stdout); +} + +REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump); + static struct unit_test_suite trace_tests = { .suite_name = "trace autotest", .setup = NULL, @@ -201,6 +218,8 @@ static struct unit_test_suite trace_tests = { TEST_CASE(test_trace_point_globbing), TEST_CASE(test_trace_point_regex), TEST_CASE(test_trace_points_lookup), + TEST_CASE(test_trace_dump), + TEST_CASE(test_trace_metadata_dump), TEST_CASES_END() } }; @@ -212,20 +231,3 @@ test_trace(void) } REGISTER_TEST_COMMAND(trace_autotest, test_trace); - -static int -test_trace_dump(void) -{ - rte_trace_dump(stdout); - return 0; -} - -REGISTER_TEST_COMMAND(trace_dump, test_trace_dump); - -static int -test_trace_metadata_dump(void) -{ - return rte_trace_metadata_dump(stdout); -} - -REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump); diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c index 33e419aac7..94726817b2 100644 --- a/lib/librte_eal/common/eal_common_trace_ctf.c +++ b/lib/librte_eal/common/eal_common_trace_ctf.c @@ -359,9 +359,6 @@ rte_trace_metadata_dump(FILE *f) char *ctf_meta = trace->ctf_meta; int rc; - if (!rte_trace_is_enabled()) - return 0; - if (ctf_meta == NULL) return -EINVAL; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.278007086 +0000 +++ 0006-trace-fix-metadata-dump.patch 2022-11-05 17:11:08.574940495 +0000 @@ -1 +1 @@ -From d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 Mon Sep 17 00:00:00 2001 +From db083f78abf44f454c667fcdb5693d0b8112d02a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d4cbbee345e2ea1126f3f43cbc1fedaf1245feb0 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18,3 +19,3 @@ - app/test/test_trace.c | 44 +++++++++------------------ - lib/eal/common/eal_common_trace_ctf.c | 3 -- - 2 files changed, 15 insertions(+), 32 deletions(-) + app/test/test_trace.c | 36 +++++++++++--------- + lib/librte_eal/common/eal_common_trace_ctf.c | 3 -- + 2 files changed, 19 insertions(+), 20 deletions(-) @@ -23 +24 @@ -index 2660f52f1d..6bedf14024 100644 +index f62a385af9..4dd083fedc 100644 @@ -26,22 +27 @@ -@@ -20,20 +20,6 @@ test_trace(void) - return TEST_SKIPPED; - } - --static int --test_trace_dump(void) --{ -- printf("trace_dump not supported on Windows, skipping test\n"); -- return TEST_SKIPPED; --} -- --static int --test_trace_metadata_dump(void) --{ -- printf("trace_metadata_dump not supported on Windows, skipping test\n"); -- return TEST_SKIPPED; --} -- - #else - - static int32_t -@@ -214,6 +200,19 @@ test_generic_trace_points(void) +@@ -189,6 +189,23 @@ test_generic_trace_points(void) @@ -57,0 +38,2 @@ ++REGISTER_TEST_COMMAND(trace_dump, test_trace_dump); ++ @@ -63,0 +46,2 @@ ++REGISTER_TEST_COMMAND(trace_metadata_dump, test_trace_metadata_dump); ++ @@ -67 +51 @@ -@@ -226,6 +225,8 @@ static struct unit_test_suite trace_tests = { +@@ -201,6 +218,8 @@ static struct unit_test_suite trace_tests = { @@ -76,2 +60 @@ -@@ -236,21 +237,6 @@ test_trace(void) - return unit_test_suite_runner(&trace_tests); +@@ -212,20 +231,3 @@ test_trace(void) @@ -79,0 +63,2 @@ + REGISTER_TEST_COMMAND(trace_autotest, test_trace); +- @@ -86,0 +72,2 @@ +-REGISTER_TEST_COMMAND(trace_dump, test_trace_dump); +- @@ -93,4 +79,0 @@ - #endif /* !RTE_EXEC_ENV_WINDOWS */ - - REGISTER_TEST_COMMAND(trace_autotest, test_trace); --REGISTER_TEST_COMMAND(trace_dump, test_trace_dump); @@ -98,5 +81,5 @@ -diff --git a/lib/eal/common/eal_common_trace_ctf.c b/lib/eal/common/eal_common_trace_ctf.c -index 335932a271..c6775c3b4d 100644 ---- a/lib/eal/common/eal_common_trace_ctf.c -+++ b/lib/eal/common/eal_common_trace_ctf.c -@@ -358,9 +358,6 @@ rte_trace_metadata_dump(FILE *f) +diff --git a/lib/librte_eal/common/eal_common_trace_ctf.c b/lib/librte_eal/common/eal_common_trace_ctf.c +index 33e419aac7..94726817b2 100644 +--- a/lib/librte_eal/common/eal_common_trace_ctf.c ++++ b/lib/librte_eal/common/eal_common_trace_ctf.c +@@ -359,9 +359,6 @@ rte_trace_metadata_dump(FILE *f) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'pdump: do not allow enable/disable in primary process' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (4 preceding siblings ...) 2022-11-05 17:11 ` patch 'trace: fix metadata " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'service: fix early move to inactive status' " luca.boccassi ` (39 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Sylvia Grundwürmer, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 Thanks. Luca Boccassi --- From a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Wed, 19 Oct 2022 09:37:33 -0700 Subject: [PATCH] pdump: do not allow enable/disable in primary process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f ] Attempts to enable or disable pdump in primary process will fail with core dump because it is not valid to call rte_mp_request_sync() unless in a secondary process. Trap the error in the common code used for both enable and disable requests. Fixes: 660098d61f57 ("pdump: use generic multi-process channel") Reported-by: Sylvia Grundwürmer <sylvia.grundwuermer@b-plus.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/librte_pdump/rte_pdump.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index b3c8d5ce43..1ef1525ff1 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -442,6 +442,12 @@ pdump_prepare_client_request(char *device, uint16_t queue, struct pdump_request *req = (struct pdump_request *)mp_req.param; struct pdump_response *resp; + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + PDUMP_LOG(ERR, + "pdump enable/disable not allowed in primary process\n"); + return -EINVAL; + } + req->ver = 1; req->flags = flags; req->op = operation; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.350821369 +0000 +++ 0007-pdump-do-not-allow-enable-disable-in-primary-process.patch 2022-11-05 17:11:08.578940581 +0000 @@ -1 +1 @@ -From 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f Mon Sep 17 00:00:00 2001 +From a141f0ff2a7be3efd8744749100cabe0ba6cc0e6 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 8a0cf0c455dcfff2e7cc6b76d4b3674a9c11521f ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - lib/pdump/rte_pdump.c | 6 ++++++ + lib/librte_pdump/rte_pdump.c | 6 ++++++ @@ -25,5 +26,5 @@ -diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c -index 98dcbc037b..a81544cb57 100644 ---- a/lib/pdump/rte_pdump.c -+++ b/lib/pdump/rte_pdump.c -@@ -537,6 +537,12 @@ pdump_prepare_client_request(const char *device, uint16_t queue, +diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c +index b3c8d5ce43..1ef1525ff1 100644 +--- a/lib/librte_pdump/rte_pdump.c ++++ b/lib/librte_pdump/rte_pdump.c +@@ -442,6 +442,12 @@ pdump_prepare_client_request(char *device, uint16_t queue, @@ -35 +36 @@ -+ "pdump enable/disable not allowed in primary process\n"); ++ "pdump enable/disable not allowed in primary process\n"); @@ -39,3 +40,3 @@ - memset(req, 0, sizeof(*req)); - - req->ver = (flags & RTE_PDUMP_FLAG_PCAPNG) ? V2 : V1; + req->ver = 1; + req->flags = flags; + req->op = operation; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'service: fix early move to inactive status' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (5 preceding siblings ...) 2022-11-05 17:11 ` patch 'pdump: do not allow enable/disable in primary process' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'event/sw: fix flow ID init in self test' " luca.boccassi ` (38 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Erik Gabriel Carrillo; +Cc: Harry van Haaren, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1cd5de2a59f596d88058f2a46792113308e66bde Thanks. Luca Boccassi --- From 1cd5de2a59f596d88058f2a46792113308e66bde Mon Sep 17 00:00:00 2001 From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> Date: Thu, 20 Oct 2022 14:00:41 -0500 Subject: [PATCH] service: fix early move to inactive status [ upstream commit 329280c53e6d09002b67e4d052fe27a952bd19cf ] Assume thread T2 is a service lcore that is in the middle of executing a service function. Also, assume thread T1 concurrently calls rte_service_lcore_stop(), which will set the "service_active_on_lcore" state to false. If thread T1 then calls rte_service_may_be_active(), it can return zero even though T2 is still running the service function. If T1 then proceeds to free data being used by T2, a crash can ensue. Move the logic that clears the "service_active_on_lcore" state from the rte_service_lcore_stop() function to the service_runner_func() to ensure that we: - don't let the "service_active_on_lcore" state linger as 1 - don't clear the state early Fixes: 6550113be62d ("service: fix lingering active status") Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> --- lib/librte_eal/common/rte_service.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index d5e3574ec7..e1ff0d2636 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -501,6 +501,12 @@ service_runner_func(void *arg) cs->loops++; } + /* Switch off this core for all services, to ensure that future + * calls to may_be_active() know this core is switched off. + */ + for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) + cs->service_active_on_lcore[i] = 0; + /* Use SEQ CST memory ordering to avoid any re-ordering around * this store, ensuring that once this store is visible, the service * lcore thread really is done in service cores code. @@ -797,11 +803,6 @@ rte_service_lcore_stop(uint32_t lcore) __atomic_load_n(&rte_services[i].num_mapped_cores, __ATOMIC_RELAXED)); - /* Switch off this core for all services, to ensure that future - * calls to may_be_active() know this core is switched off. - */ - cs->service_active_on_lcore[i] = 0; - /* if the core is mapped, and the service is running, and this * is the only core that is mapped, the service would cease to * run if this core stopped, so fail instead. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.436133306 +0000 +++ 0008-service-fix-early-move-to-inactive-status.patch 2022-11-05 17:11:08.578940581 +0000 @@ -1 +1 @@ -From 329280c53e6d09002b67e4d052fe27a952bd19cf Mon Sep 17 00:00:00 2001 +From 1cd5de2a59f596d88058f2a46792113308e66bde Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 329280c53e6d09002b67e4d052fe27a952bd19cf ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -25,2 +26,2 @@ - lib/eal/common/rte_service.c | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) + lib/librte_eal/common/rte_service.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) @@ -28,22 +29,6 @@ -diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c -index 81c9514149..bcc2e19077 100644 ---- a/lib/eal/common/rte_service.c -+++ b/lib/eal/common/rte_service.c -@@ -479,6 +479,7 @@ static int32_t - service_runner_func(void *arg) - { - RTE_SET_USED(arg); -+ uint8_t i; - const int lcore = rte_lcore_id(); - struct core_state *cs = &lcore_states[lcore]; - -@@ -494,7 +495,6 @@ service_runner_func(void *arg) - const uint64_t service_mask = cs->service_mask; - uint8_t start_id; - uint8_t end_id; -- uint8_t i; - - if (service_mask == 0) - continue; -@@ -510,6 +510,12 @@ service_runner_func(void *arg) - __atomic_store_n(&cs->loops, cs->loops + 1, __ATOMIC_RELAXED); +diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c +index d5e3574ec7..e1ff0d2636 100644 +--- a/lib/librte_eal/common/rte_service.c ++++ b/lib/librte_eal/common/rte_service.c +@@ -501,6 +501,12 @@ service_runner_func(void *arg) + cs->loops++; @@ -61 +46 @@ -@@ -806,11 +812,6 @@ rte_service_lcore_stop(uint32_t lcore) +@@ -797,11 +803,6 @@ rte_service_lcore_stop(uint32_t lcore) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'event/sw: fix flow ID init in self test' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (6 preceding siblings ...) 2022-11-05 17:11 ` patch 'service: fix early move to inactive status' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'event/sw: fix log " luca.boccassi ` (37 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Olivier Matz; +Cc: David Marchand, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/63ec6a27e780e8e8d0397ecaf8e736d2e31219fb Thanks. Luca Boccassi --- From 63ec6a27e780e8e8d0397ecaf8e736d2e31219fb Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Fri, 14 Oct 2022 22:37:09 +0200 Subject: [PATCH] event/sw: fix flow ID init in self test [ upstream commit ab059e82e12f2a9dc7561960004819de68b37110 ] The issue is seen by unit tests: MALLOC_PERTURB_=204 \ DPDK_TEST=eventdev_selftest_sw \ /root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test -c 0xff (...) *** Running XStats ID Reset test... 12: 1761: qid_0_port_2_pinned_flows value , expected 1 got 7 1778: qid_0_port_2_pinned_flows value incorrect, expected 1 got 7 ERROR - XStats ID Reset test FAILED. SW Eventdev Selftest Failed. Test Failed The flow ID is not set in the event, which results in an undefined flow, whose value depends on what was previously in stack. Having different flows for the packets makes the test to fail, since only one flow is expected. This only happens in -O3, where the same stack area is shared by the event object and the address of the mbuf allocated in rte_gen_arp(). Fix this by properly initializing the flow id. Bugzilla ID: 1101 Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: David Marchand <david.marchand@redhat.com> --- drivers/event/sw/sw_evdev_selftest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index 782e76db5b..c2e1b8fd14 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -1488,6 +1488,7 @@ xstats_id_reset_tests(struct test *t) goto fail; } ev.queue_id = t->qid[i]; + ev.flow_id = 0; ev.op = RTE_EVENT_OP_NEW; ev.mbuf = arp; *rte_event_pmd_selftest_seqn(arp) = i; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.505137376 +0000 +++ 0009-event-sw-fix-flow-ID-init-in-self-test.patch 2022-11-05 17:11:08.586940752 +0000 @@ -1 +1 @@ -From ab059e82e12f2a9dc7561960004819de68b37110 Mon Sep 17 00:00:00 2001 +From 63ec6a27e780e8e8d0397ecaf8e736d2e31219fb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ab059e82e12f2a9dc7561960004819de68b37110 ] + @@ -31 +32,0 @@ -Cc: stable@dpdk.org @@ -40 +41 @@ -index 62d66744f2..9f27d8a189 100644 +index 782e76db5b..c2e1b8fd14 100644 @@ -43 +44 @@ -@@ -1483,6 +1483,7 @@ xstats_id_reset_tests(struct test *t) +@@ -1488,6 +1488,7 @@ xstats_id_reset_tests(struct test *t) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'event/sw: fix log in self test' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (7 preceding siblings ...) 2022-11-05 17:11 ` patch 'event/sw: fix flow ID init in self test' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'eventdev/crypto: fix multi-process' " luca.boccassi ` (36 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Olivier Matz; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5f065a858c3bcd309a00927a697dc000ae240131 Thanks. Luca Boccassi --- From 5f065a858c3bcd309a00927a697dc000ae240131 Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Wed, 19 Oct 2022 19:06:46 +0530 Subject: [PATCH] event/sw: fix log in self test [ upstream commit 05d22d4e061a3ac92cb8f076c5ecaed653d4f640 ] The log should display the value, not the ID. Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> --- drivers/event/sw/sw_evdev_selftest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index c2e1b8fd14..8de55016a4 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -1641,8 +1641,8 @@ xstats_id_reset_tests(struct test *t) } if (val != port_expected[i]) { printf("%d: %s value incorrect, expected %"PRIu64 - " got %d\n", __LINE__, port_names[i], - port_expected[i], id); + " got %" PRIu64 "\n", __LINE__, port_names[i], + port_expected[i], val); failed = 1; } /* reset to zero */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.599946144 +0000 +++ 0010-event-sw-fix-log-in-self-test.patch 2022-11-05 17:11:08.594940924 +0000 @@ -1 +1 @@ -From 05d22d4e061a3ac92cb8f076c5ecaed653d4f640 Mon Sep 17 00:00:00 2001 +From 5f065a858c3bcd309a00927a697dc000ae240131 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 05d22d4e061a3ac92cb8f076c5ecaed653d4f640 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -13,2 +14,2 @@ - drivers/event/sw/sw_evdev_selftest.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + drivers/event/sw/sw_evdev_selftest.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) @@ -17 +18 @@ -index 9f27d8a189..3aa8d76ca8 100644 +index c2e1b8fd14..8de55016a4 100644 @@ -20 +21,2 @@ -@@ -1640,7 +1640,7 @@ xstats_id_reset_tests(struct test *t) +@@ -1641,8 +1641,8 @@ xstats_id_reset_tests(struct test *t) + } @@ -22,4 +24,5 @@ - printf("%d: %s value incorrect, expected %" PRIu64 - " got %" PRIu64 "\n", -- __LINE__, port_names[i], port_expected[i], id); -+ __LINE__, port_names[i], port_expected[i], val); + printf("%d: %s value incorrect, expected %"PRIu64 +- " got %d\n", __LINE__, port_names[i], +- port_expected[i], id); ++ " got %" PRIu64 "\n", __LINE__, port_names[i], ++ port_expected[i], val); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eventdev/crypto: fix multi-process' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (8 preceding siblings ...) 2022-11-05 17:11 ` patch 'event/sw: fix log " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'eventdev/eth_tx: fix queue delete' " luca.boccassi ` (35 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Ganapati Kundapura; +Cc: Abhinandan Gujjar, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/e4e6cf9356e5af14fdd0e966ad1513ed609e4273 Thanks. Luca Boccassi --- From e4e6cf9356e5af14fdd0e966ad1513ed609e4273 Mon Sep 17 00:00:00 2001 From: Ganapati Kundapura <ganapati.kundapura@intel.com> Date: Tue, 18 Oct 2022 04:39:26 -0500 Subject: [PATCH] eventdev/crypto: fix multi-process [ upstream commit 8f4ff7de39693dfd26336afea5e12e1a7d8fd9b0 ] Secondary process is not able to call the crypto adapter APIs stats get/reset as crypto adapter memzone memory is not accessible by secondary process. Added memzone lookup so that secondary process can call the crypto adapter APIs(stats_get etc) Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com> --- .../rte_event_crypto_adapter.c | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c index ca58945a84..dc85c9d703 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c @@ -30,6 +30,8 @@ */ #define CRYPTO_ENQ_FLUSH_THRESHOLD 1024 +#define ECA_ADAPTER_ARRAY "crypto_adapter_array" + struct rte_event_crypto_adapter { /* Event device identifier */ uint8_t eventdev_id; @@ -118,7 +120,6 @@ eca_valid_id(uint8_t id) static int eca_init(void) { - const char *name = "crypto_adapter_array"; const struct rte_memzone *mz; unsigned int sz; @@ -126,9 +127,10 @@ eca_init(void) RTE_EVENT_CRYPTO_ADAPTER_MAX_INSTANCE; sz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE); - mz = rte_memzone_lookup(name); + mz = rte_memzone_lookup(ECA_ADAPTER_ARRAY); if (mz == NULL) { - mz = rte_memzone_reserve_aligned(name, sz, rte_socket_id(), 0, + mz = rte_memzone_reserve_aligned(ECA_ADAPTER_ARRAY, sz, + rte_socket_id(), 0, RTE_CACHE_LINE_SIZE); if (mz == NULL) { RTE_EDEV_LOG_ERR("failed to reserve memzone err = %" @@ -141,6 +143,22 @@ eca_init(void) return 0; } +static int +eca_memzone_lookup(void) +{ + const struct rte_memzone *mz; + + if (event_crypto_adapter == NULL) { + mz = rte_memzone_lookup(ECA_ADAPTER_ARRAY); + if (mz == NULL) + return -ENOMEM; + + event_crypto_adapter = mz->addr; + } + + return 0; +} + static inline struct rte_event_crypto_adapter * eca_id_to_adapter(uint8_t id) { @@ -1047,6 +1065,9 @@ rte_event_crypto_adapter_stats_get(uint8_t id, uint32_t i; int ret; + if (eca_memzone_lookup()) + return -ENOMEM; + EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); adapter = eca_id_to_adapter(id); @@ -1088,6 +1109,9 @@ rte_event_crypto_adapter_stats_reset(uint8_t id) struct rte_eventdev *dev; uint32_t i; + if (eca_memzone_lookup()) + return -ENOMEM; + EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); adapter = eca_id_to_adapter(id); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.682033328 +0000 +++ 0011-eventdev-crypto-fix-multi-process.patch 2022-11-05 17:11:08.598941010 +0000 @@ -1 +1 @@ -From 8f4ff7de39693dfd26336afea5e12e1a7d8fd9b0 Mon Sep 17 00:00:00 2001 +From e4e6cf9356e5af14fdd0e966ad1513ed609e4273 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8f4ff7de39693dfd26336afea5e12e1a7d8fd9b0 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ - lib/eventdev/rte_event_crypto_adapter.c | 30 ++++++++++++++++++++++--- + .../rte_event_crypto_adapter.c | 30 +++++++++++++++++-- @@ -22,5 +23,5 @@ -diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c -index 59777726f6..3c585d7b0d 100644 ---- a/lib/eventdev/rte_event_crypto_adapter.c -+++ b/lib/eventdev/rte_event_crypto_adapter.c -@@ -33,6 +33,8 @@ +diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c +index ca58945a84..dc85c9d703 100644 +--- a/lib/librte_eventdev/rte_event_crypto_adapter.c ++++ b/lib/librte_eventdev/rte_event_crypto_adapter.c +@@ -30,6 +30,8 @@ @@ -32,4 +33,4 @@ - struct crypto_ops_circular_buffer { - /* index of head element in circular buffer */ - uint16_t head; -@@ -138,7 +140,6 @@ eca_valid_id(uint8_t id) + struct rte_event_crypto_adapter { + /* Event device identifier */ + uint8_t eventdev_id; +@@ -118,7 +120,6 @@ eca_valid_id(uint8_t id) @@ -43 +44 @@ -@@ -146,9 +147,10 @@ eca_init(void) +@@ -126,9 +127,10 @@ eca_init(void) @@ -56 +57 @@ -@@ -161,6 +163,22 @@ eca_init(void) +@@ -141,6 +143,22 @@ eca_init(void) @@ -76,2 +77,2 @@ - static inline bool - eca_circular_buffer_batch_ready(struct crypto_ops_circular_buffer *bufp) + static inline struct rte_event_crypto_adapter * + eca_id_to_adapter(uint8_t id) @@ -79 +80 @@ -@@ -1238,6 +1256,9 @@ rte_event_crypto_adapter_stats_get(uint8_t id, +@@ -1047,6 +1065,9 @@ rte_event_crypto_adapter_stats_get(uint8_t id, @@ -89 +90 @@ -@@ -1279,6 +1300,9 @@ rte_event_crypto_adapter_stats_reset(uint8_t id) +@@ -1088,6 +1109,9 @@ rte_event_crypto_adapter_stats_reset(uint8_t id) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eventdev/eth_tx: fix queue delete' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (9 preceding siblings ...) 2022-11-05 17:11 ` patch 'eventdev/crypto: fix multi-process' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'gro: check payload length after trim' " luca.boccassi ` (34 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Naga Harish K S V; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b6f4010798c294a8dc92869a994447990550bd25 Thanks. Luca Boccassi --- From b6f4010798c294a8dc92869a994447990550bd25 Mon Sep 17 00:00:00 2001 From: Naga Harish K S V <s.v.naga.harish.k@intel.com> Date: Fri, 21 Oct 2022 01:43:14 -0500 Subject: [PATCH] eventdev/eth_tx: fix queue delete [ upstream commit 75c5bfc320fdc41226cbeeb864161268fb344c49 ] To delete all the queues of an ethdev device associated with adapter instance the queue_id can be passed as -1 to the queue delete API. When a subset of queues of a ethdev device are associated, the queue delete logic is exiting without deleting the queues in some cases (higher numbered associated queues) for above scenario as the queue delete logic is not checking all the queue association status. This patch fixes this issue by checking the queue association status of all the queues of the ethernet device. Fixes: 741b499e6421 ("eventdev/eth_tx: fix queue delete logic") Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index 20470d8a58..8870071a8b 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -821,6 +821,8 @@ txa_service_queue_del(uint8_t id, uint16_t i, q, nb_queues; int ret = 0; + if (txa->txa_ethdev == NULL) + return 0; nb_queues = txa->txa_ethdev[port_id].nb_queues; if (nb_queues == 0) return 0; @@ -833,10 +835,10 @@ txa_service_queue_del(uint8_t id, if (tqi[q].added) { ret = txa_service_queue_del(id, dev, q); + i++; if (ret != 0) break; } - i++; q++; } return ret; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.764224169 +0000 +++ 0012-eventdev-eth_tx-fix-queue-delete.patch 2022-11-05 17:11:08.598941010 +0000 @@ -1 +1 @@ -From 75c5bfc320fdc41226cbeeb864161268fb344c49 Mon Sep 17 00:00:00 2001 +From b6f4010798c294a8dc92869a994447990550bd25 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 75c5bfc320fdc41226cbeeb864161268fb344c49 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 4 +++- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 4 +++- @@ -27,5 +28,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index c2a848103b..88309d2aaa 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -934,6 +934,8 @@ txa_service_queue_del(uint8_t id, +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 20470d8a58..8870071a8b 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -821,6 +821,8 @@ txa_service_queue_del(uint8_t id, @@ -40 +41 @@ -@@ -946,10 +948,10 @@ txa_service_queue_del(uint8_t id, +@@ -833,10 +835,10 @@ txa_service_queue_del(uint8_t id, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'gro: check payload length after trim' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (10 preceding siblings ...) 2022-11-05 17:11 ` patch 'eventdev/eth_tx: fix queue delete' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'license: fix paths' " luca.boccassi ` (33 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Kumara Parameshwaran; +Cc: Jiayu Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/36d426123ce28d87ae6c184a2c87eb2721af8e2c Thanks. Luca Boccassi --- From 36d426123ce28d87ae6c184a2c87eb2721af8e2c Mon Sep 17 00:00:00 2001 From: Kumara Parameshwaran <kumaraparamesh92@gmail.com> Date: Sun, 16 Oct 2022 20:13:05 +0530 Subject: [PATCH] gro: check payload length after trim [ upstream commit 72f51b097a71fb9bdea13bdd254ff620b34c852e ] When packet is padded with extra bytes the the validation of the payload length should be done after the trim operation Fixes: b8a55871d5af ("gro: trim tail padding bytes") Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com> Acked-by: Jiayu Hu <jiayu.hu@intel.com> --- lib/librte_gro/gro_tcp4.c | 15 ++++++++------- lib/librte_gro/gro_udp4.c | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c index 9bde7162b1..15b7ae7d88 100644 --- a/lib/librte_gro/gro_tcp4.c +++ b/lib/librte_gro/gro_tcp4.c @@ -226,19 +226,20 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, */ if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG) return -1; - /* - * Don't process the packet whose payload length is less than or - * equal to 0. - */ - tcp_dl = pkt->pkt_len - hdr_len; - if (tcp_dl <= 0) - return -1; /* trim the tail padding bytes */ ip_tlen = rte_be_to_cpu_16(ipv4_hdr->total_length); if (pkt->pkt_len > (uint32_t)(ip_tlen + pkt->l2_len)) rte_pktmbuf_trim(pkt, pkt->pkt_len - ip_tlen - pkt->l2_len); + /* + * Don't process the packet whose payload length is less than or + * equal to 0. + */ + tcp_dl = pkt->pkt_len - hdr_len; + if (tcp_dl <= 0) + return -1; + /* * Save IPv4 ID for the packet whose DF bit is 0. For the packet * whose DF bit is 1, IPv4 ID is ignored. diff --git a/lib/librte_gro/gro_udp4.c b/lib/librte_gro/gro_udp4.c index 517e12b12b..e632bee085 100644 --- a/lib/librte_gro/gro_udp4.c +++ b/lib/librte_gro/gro_udp4.c @@ -221,21 +221,21 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, if (!is_ipv4_fragment(ipv4_hdr)) return -1; - /* - * Don't process the packet whose payload length is less than or - * equal to 0. - */ - if (pkt->pkt_len <= hdr_len) - return -1; - ip_dl = rte_be_to_cpu_16(ipv4_hdr->total_length); - if (ip_dl <= pkt->l3_len) - return -1; - /* trim the tail padding bytes */ if (pkt->pkt_len > (uint32_t)(ip_dl + pkt->l2_len)) rte_pktmbuf_trim(pkt, pkt->pkt_len - ip_dl - pkt->l2_len); + /* + * Don't process the packet whose payload length is less than or + * equal to 0. + */ + if (pkt->pkt_len <= hdr_len) + return -1; + + if (ip_dl <= pkt->l3_len) + return -1; + ip_dl -= pkt->l3_len; ip_id = rte_be_to_cpu_16(ipv4_hdr->packet_id); frag_offset = rte_be_to_cpu_16(ipv4_hdr->fragment_offset); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.843232779 +0000 +++ 0013-gro-check-payload-length-after-trim.patch 2022-11-05 17:11:08.602941096 +0000 @@ -1 +1 @@ -From 72f51b097a71fb9bdea13bdd254ff620b34c852e Mon Sep 17 00:00:00 2001 +From 36d426123ce28d87ae6c184a2c87eb2721af8e2c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 72f51b097a71fb9bdea13bdd254ff620b34c852e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -16,2 +17,2 @@ - lib/gro/gro_tcp4.c | 15 ++++++++------- - lib/gro/gro_udp4.c | 20 ++++++++++---------- + lib/librte_gro/gro_tcp4.c | 15 ++++++++------- + lib/librte_gro/gro_udp4.c | 20 ++++++++++---------- @@ -20,5 +21,5 @@ -diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c -index 8f5e800250..0014096e63 100644 ---- a/lib/gro/gro_tcp4.c -+++ b/lib/gro/gro_tcp4.c -@@ -225,19 +225,20 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, +diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c +index 9bde7162b1..15b7ae7d88 100644 +--- a/lib/librte_gro/gro_tcp4.c ++++ b/lib/librte_gro/gro_tcp4.c +@@ -226,19 +226,20 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt, @@ -52,5 +53,5 @@ -diff --git a/lib/gro/gro_udp4.c b/lib/gro/gro_udp4.c -index 839f9748b7..42596d33b6 100644 ---- a/lib/gro/gro_udp4.c -+++ b/lib/gro/gro_udp4.c -@@ -220,21 +220,21 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, +diff --git a/lib/librte_gro/gro_udp4.c b/lib/librte_gro/gro_udp4.c +index 517e12b12b..e632bee085 100644 +--- a/lib/librte_gro/gro_udp4.c ++++ b/lib/librte_gro/gro_udp4.c +@@ -221,21 +221,21 @@ gro_udp4_reassemble(struct rte_mbuf *pkt, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'license: fix paths' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (11 preceding siblings ...) 2022-11-05 17:11 ` patch 'gro: check payload length after trim' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix mode 4 with dedicated queues' " luca.boccassi ` (32 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/15a59dd71fef178a74fd59db0674fc53e39b56d0 Thanks. Luca Boccassi --- From 15a59dd71fef178a74fd59db0674fc53e39b56d0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Wed, 19 Oct 2022 11:42:36 -0700 Subject: [PATCH] license: fix paths [ upstream commit dc348f2e81a94dd3b8a32c2f882483227796905d ] The pathnames in the license directory README are incorrect. The current repository puts license text in license/ not licenses/. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com> --- license/README | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/license/README b/license/README index 79dac86440..c78cfd9f65 100644 --- a/license/README +++ b/license/README @@ -58,20 +58,19 @@ DPDK Governing Board. Steps for any exception approval: 3. Technical Board then approach Governing Board for such limited approval for the given contribution only. -Any approvals shall be documented in "Licenses/exceptions.txt" with record -dates. +Any approvals shall be documented in "license/exceptions.txt" with record dates. DPDK project supported licenses are: 1. BSD 3-clause "New" or "Revised" License SPDX-License-Identifier: BSD-3-Clause URL: http://spdx.org/licenses/BSD-3-Clause#licenseText - DPDK License text: licenses/bsd-3-clause.txt + DPDK License text: license/bsd-3-clause.txt 2. GNU General Public License v2.0 only SPDX-License-Identifier: GPL-2.0 URL: http://spdx.org/licenses/GPL-2.0.html#licenseText - DPDK License text: licenses/gpl-2.0.txt + DPDK License text: license/gpl-2.0.txt 3. GNU Lesser General Public License v2.1 SPDX-License-Identifier: LGPL-2.1 URL: http://spdx.org/licenses/LGPL-2.1.html#licenseText - DPDK License text: licenses/lgpl-2.1.txt + DPDK License text: license/lgpl-2.1.txt -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:09.926304870 +0000 +++ 0014-license-fix-paths.patch 2022-11-05 17:11:08.606941182 +0000 @@ -1 +1 @@ -From dc348f2e81a94dd3b8a32c2f882483227796905d Mon Sep 17 00:00:00 2001 +From 15a59dd71fef178a74fd59db0674fc53e39b56d0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,2 @@ + +[ upstream commit dc348f2e81a94dd3b8a32c2f882483227796905d ] ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix mode 4 with dedicated queues' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (12 preceding siblings ...) 2022-11-05 17:11 ` patch 'license: fix paths' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix descriptor limit reporting' " luca.boccassi ` (31 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Usman Tanveer; +Cc: Chas Williams, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cc57fef023f3b14674e735a441967f3ea4211923 Thanks. Luca Boccassi --- From cc57fef023f3b14674e735a441967f3ea4211923 Mon Sep 17 00:00:00 2001 From: Usman Tanveer <usman.tanveer@emumba.com> Date: Thu, 29 Sep 2022 09:05:51 +0500 Subject: [PATCH] net/bonding: fix mode 4 with dedicated queues [ upstream commit f66323717edbfbb037317fc012ea0fe13e48db98 ] When dedicated queues are enable with bonding mode 4 (mlx5), the application sets the flow, which cannot be set if the device is not started. This fixed the issue by starting the device just before setting the flow. Because device should be started to set the flow. Also it does not effect other driver codes (I have tried on ixgbe). Bugzilla ID: 759 Signed-off-by: Usman Tanveer <usman.tanveer@emumba.com> Acked-by: Chas Williams <3chas3@gmail.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index a73d5bd497..8efd3a8a79 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1817,15 +1817,6 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, rte_flow_destroy(slave_eth_dev->data->port_id, internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id], &flow_error); - - errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev, - slave_eth_dev->data->port_id); - if (errval != 0) { - RTE_BOND_LOG(ERR, - "bond_ethdev_8023ad_flow_set: port=%d, err (%d)", - slave_eth_dev->data->port_id, errval); - return errval; - } } /* Start device */ @@ -1836,6 +1827,18 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, return -1; } + if (internals->mode == BONDING_MODE_8023AD && + internals->mode4.dedicated_queues.enabled == 1) { + errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev, + slave_eth_dev->data->port_id); + if (errval != 0) { + RTE_BOND_LOG(ERR, + "bond_ethdev_8023ad_flow_set: port=%d, err (%d)", + slave_eth_dev->data->port_id, errval); + return errval; + } + } + /* If RSS is enabled for bonding, synchronize RETA */ if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) { int i; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.005319538 +0000 +++ 0015-net-bonding-fix-mode-4-with-dedicated-queues.patch 2022-11-05 17:11:08.614941354 +0000 @@ -1 +1 @@ -From f66323717edbfbb037317fc012ea0fe13e48db98 Mon Sep 17 00:00:00 2001 +From cc57fef023f3b14674e735a441967f3ea4211923 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f66323717edbfbb037317fc012ea0fe13e48db98 ] + @@ -21 +23 @@ -index 82db206eb8..aee9e60d40 100644 +index a73d5bd497..8efd3a8a79 100644 @@ -24,4 +26,4 @@ -@@ -1830,15 +1830,6 @@ slave_start(struct rte_eth_dev *bonded_eth_dev, - RTE_BOND_LOG(ERR, "bond_ethdev_8023ad_flow_destroy: port=%d, err (%d)", - slave_eth_dev->data->port_id, errval); - } +@@ -1817,15 +1817,6 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, + rte_flow_destroy(slave_eth_dev->data->port_id, + internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id], + &flow_error); @@ -40 +42 @@ -@@ -1849,6 +1840,18 @@ slave_start(struct rte_eth_dev *bonded_eth_dev, +@@ -1836,6 +1827,18 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, @@ -57 +59 @@ - if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) { + if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix descriptor limit reporting' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (13 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/bonding: fix mode 4 with dedicated queues' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for Rx and Tx' " luca.boccassi ` (30 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Ivan Malov; +Cc: Andrew Rybchenko, Chas Williams, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Thanks. Luca Boccassi --- From 99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Mon Sep 17 00:00:00 2001 From: Ivan Malov <ivan.malov@oktetlabs.ru> Date: Sun, 11 Sep 2022 15:19:01 +0300 Subject: [PATCH] net/bonding: fix descriptor limit reporting [ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] Commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits") breaks reporting of "nb_min" and "nb_align" values obtained from back-end devices' descriptor limits. This means that work done by eth_bond_slave_inherit_desc_lim_first() as well as eth_bond_slave_inherit_desc_lim_next() gets dismissed. Revert the offending commit and use proper workaround for the test case mentioned in the said commit. Meanwhile, the test case itself might be poorly constructed. It tries to run a bond with no back-end devices attached, but, according to [1] ("Requirements / Limitations"), at least one back-end device must be attached. [1] doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst Fixes: 5be3b40fea60 ("net/bonding: fix values of descriptor limits") Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Chas Williams <3chas3@gmail.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 8efd3a8a79..f426c66b69 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2186,8 +2186,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) uint16_t max_nb_rx_queues = UINT16_MAX; uint16_t max_nb_tx_queues = UINT16_MAX; - uint16_t max_rx_desc_lim = UINT16_MAX; - uint16_t max_tx_desc_lim = UINT16_MAX; dev_info->max_mac_addrs = BOND_MAX_MAC_ADDRS; @@ -2221,12 +2219,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) if (slave_info.max_tx_queues < max_nb_tx_queues) max_nb_tx_queues = slave_info.max_tx_queues; - - if (slave_info.rx_desc_lim.nb_max < max_rx_desc_lim) - max_rx_desc_lim = slave_info.rx_desc_lim.nb_max; - - if (slave_info.tx_desc_lim.nb_max < max_tx_desc_lim) - max_tx_desc_lim = slave_info.tx_desc_lim.nb_max; } } @@ -2238,8 +2230,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) memcpy(&dev_info->default_txconf, &internals->default_txconf, sizeof(dev_info->default_txconf)); - dev_info->rx_desc_lim.nb_max = max_rx_desc_lim; - dev_info->tx_desc_lim.nb_max = max_tx_desc_lim; + memcpy(&dev_info->rx_desc_lim, &internals->rx_desc_lim, + sizeof(dev_info->rx_desc_lim)); + memcpy(&dev_info->tx_desc_lim, &internals->tx_desc_lim, + sizeof(dev_info->tx_desc_lim)); /** * If dedicated hw queues enabled for link bonding device in LACP mode @@ -3372,6 +3366,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) memset(&internals->rx_desc_lim, 0, sizeof(internals->rx_desc_lim)); memset(&internals->tx_desc_lim, 0, sizeof(internals->tx_desc_lim)); + /* + * Do not restrict descriptor counts until + * the first back-end device gets attached. + */ + internals->rx_desc_lim.nb_max = UINT16_MAX; + internals->tx_desc_lim.nb_max = UINT16_MAX; + memset(internals->active_slaves, 0, sizeof(internals->active_slaves)); memset(internals->slaves, 0, sizeof(internals->slaves)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.084851799 +0000 +++ 0016-net-bonding-fix-descriptor-limit-reporting.patch 2022-11-05 17:11:08.622941525 +0000 @@ -1 +1 @@ -From d03c0e83cc0042dc35e37f984de15533b09e6ac9 Mon Sep 17 00:00:00 2001 +From 99f65e68d99e51dda5cc36ca10ee3ddd0f510090 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d03c0e83cc0042dc35e37f984de15533b09e6ac9 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index aee9e60d40..27005c747c 100644 +index 8efd3a8a79..f426c66b69 100644 @@ -36 +37 @@ -@@ -2205,8 +2205,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2186,8 +2186,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -45 +46 @@ -@@ -2240,12 +2238,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2221,12 +2219,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -58 +59 @@ -@@ -2257,8 +2249,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2238,8 +2230,10 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -71 +72 @@ -@@ -3393,6 +3387,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3372,6 +3366,13 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ionic: fix endianness for Rx and Tx' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (14 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/bonding: fix descriptor limit reporting' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for RSS' " luca.boccassi ` (29 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Andrew Boyer; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/58351ee33337bfaa6782a86b91c2ba5426c86312 Thanks. Luca Boccassi --- From 58351ee33337bfaa6782a86b91c2ba5426c86312 Mon Sep 17 00:00:00 2001 From: Andrew Boyer <andrew.boyer@amd.com> Date: Tue, 18 Oct 2022 12:40:56 -0700 Subject: [PATCH] net/ionic: fix endianness for Rx and Tx [ upstream commit 4a7355999062ba6096c8b0f48b4df344df9bf60f ] These fields all need to be LE when talking to the FW. Fixes: a27d901331da ("net/ionic: add Rx and Tx handling") Signed-off-by: Andrew Boyer <andrew.boyer@amd.com> --- drivers/net/ionic/ionic_rxtx.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 9466099352..61d909eee2 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -279,18 +279,20 @@ ionic_tx_tso_post(struct ionic_queue *q, struct ionic_txq_desc *desc, uint16_t vlan_tci, bool has_vlan, bool start, bool done) { + uint64_t cmd; uint8_t flags = 0; flags |= has_vlan ? IONIC_TXQ_DESC_FLAG_VLAN : 0; flags |= encap ? IONIC_TXQ_DESC_FLAG_ENCAP : 0; flags |= start ? IONIC_TXQ_DESC_FLAG_TSO_SOT : 0; flags |= done ? IONIC_TXQ_DESC_FLAG_TSO_EOT : 0; - desc->cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO, + cmd = encode_txq_desc_cmd(IONIC_TXQ_DESC_OPCODE_TSO, flags, nsge, addr); - desc->len = len; - desc->vlan_tci = vlan_tci; - desc->hdr_len = hdrlen; - desc->mss = mss; + desc->cmd = rte_cpu_to_le_64(cmd); + desc->len = rte_cpu_to_le_16(len); + desc->vlan_tci = rte_cpu_to_le_16(vlan_tci); + desc->hdr_len = rte_cpu_to_le_16(hdrlen); + desc->mss = rte_cpu_to_le_16(mss); ionic_q_post(q, done, NULL, done ? txm : NULL); } @@ -397,7 +399,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm, len = RTE_MIN(frag_left, left); frag_left -= len; elem->addr = next_addr; - elem->len = len; + elem->len = rte_cpu_to_le_16(len); elem++; desc_nsge++; } else { @@ -445,7 +447,7 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm, bool encap; bool has_vlan; uint64_t ol_flags = txm->ol_flags; - uint64_t addr; + uint64_t addr, cmd; uint8_t opcode = IONIC_TXQ_DESC_OPCODE_CSUM_NONE; uint8_t flags = 0; @@ -477,13 +479,14 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm, addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm)); - desc->cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr); - desc->len = txm->data_len; - desc->vlan_tci = txm->vlan_tci; + cmd = encode_txq_desc_cmd(opcode, flags, txm->nb_segs - 1, addr); + desc->cmd = rte_cpu_to_le_64(cmd); + desc->len = rte_cpu_to_le_16(txm->data_len); + desc->vlan_tci = rte_cpu_to_le_16(txm->vlan_tci); txm_seg = txm->next; while (txm_seg != NULL) { - elem->len = txm_seg->data_len; + elem->len = rte_cpu_to_le_16(txm_seg->data_len); elem->addr = rte_cpu_to_le_64(rte_mbuf_data_iova(txm_seg)); stats->frags++; elem++; @@ -796,7 +799,7 @@ ionic_rx_clean(struct ionic_queue *q, /* Vlan Strip */ if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) { pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; - rxm->vlan_tci = cq_desc->vlan_tci; + rxm->vlan_tci = rte_le_to_cpu_16(cq_desc->vlan_tci); } /* Checksum */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.175253369 +0000 +++ 0017-net-ionic-fix-endianness-for-Rx-and-Tx.patch 2022-11-05 17:11:08.626941612 +0000 @@ -1 +1 @@ -From 4a7355999062ba6096c8b0f48b4df344df9bf60f Mon Sep 17 00:00:00 2001 +From 58351ee33337bfaa6782a86b91c2ba5426c86312 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4a7355999062ba6096c8b0f48b4df344df9bf60f ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index 9f602de6a9..af2d89f9fa 100644 +index 9466099352..61d909eee2 100644 @@ -20 +21,2 @@ -@@ -300,18 +300,20 @@ ionic_tx_tso_post(struct ionic_queue *q, struct ionic_txq_desc *desc, +@@ -279,18 +279,20 @@ ionic_tx_tso_post(struct ionic_queue *q, struct ionic_txq_desc *desc, + uint16_t vlan_tci, bool has_vlan, @@ -23 +24,0 @@ - void **info; @@ -44,3 +45,3 @@ - if (done) { - info = IONIC_INFO_PTR(q, q->head_idx); -@@ -423,7 +425,7 @@ ionic_tx_tso(struct ionic_tx_qcq *txq, struct rte_mbuf *txm) + ionic_q_post(q, done, NULL, done ? txm : NULL); + } +@@ -397,7 +399,7 @@ ionic_tx_tso(struct ionic_queue *q, struct rte_mbuf *txm, @@ -55 +56 @@ -@@ -470,7 +472,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm) +@@ -445,7 +447,7 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm, @@ -64 +65 @@ -@@ -505,9 +507,10 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm) +@@ -477,13 +479,14 @@ ionic_tx(struct ionic_queue *q, struct rte_mbuf *txm, @@ -76,4 +76,0 @@ - info[0] = txm; - -@@ -515,7 +518,7 @@ ionic_tx(struct ionic_tx_qcq *txq, struct rte_mbuf *txm) - @@ -84,0 +82 @@ + stats->frags++; @@ -86,2 +84 @@ - txm_seg = txm_seg->next; -@@ -845,7 +848,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq, +@@ -796,7 +799,7 @@ ionic_rx_clean(struct ionic_queue *q, @@ -90 +87 @@ - pkt_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED; + pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ionic: fix endianness for RSS' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (15 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for Rx and Tx' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix adapter name for logging' " luca.boccassi ` (28 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Andrew Boyer; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/47d52c6c4e848e06b47010f614e6a99da3bc5808 Thanks. Luca Boccassi --- From 47d52c6c4e848e06b47010f614e6a99da3bc5808 Mon Sep 17 00:00:00 2001 From: Andrew Boyer <andrew.boyer@amd.com> Date: Tue, 18 Oct 2022 12:40:57 -0700 Subject: [PATCH] net/ionic: fix endianness for RSS [ upstream commit 7506961a48548d55575ca6cd7c3b4009f0112b03 ] This field needs to be LE when talking to the FW. Fixes: 22e7171bc63b ("net/ionic: support RSS") Signed-off-by: Andrew Boyer <andrew.boyer@amd.com> --- drivers/net/ionic/ionic_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 61d909eee2..97f36c5c2e 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -794,7 +794,7 @@ ionic_rx_clean(struct ionic_queue *q, /* RSS */ pkt_flags |= PKT_RX_RSS_HASH; - rxm->hash.rss = cq_desc->rss_hash; + rxm->hash.rss = rte_le_to_cpu_32(cq_desc->rss_hash); /* Vlan Strip */ if (cq_desc->csum_flags & IONIC_RXQ_COMP_CSUM_F_VLAN) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.261149142 +0000 +++ 0018-net-ionic-fix-endianness-for-RSS.patch 2022-11-05 17:11:08.626941612 +0000 @@ -1 +1 @@ -From 7506961a48548d55575ca6cd7c3b4009f0112b03 Mon Sep 17 00:00:00 2001 +From 47d52c6c4e848e06b47010f614e6a99da3bc5808 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7506961a48548d55575ca6cd7c3b4009f0112b03 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index af2d89f9fa..665d085823 100644 +index 61d909eee2..97f36c5c2e 100644 @@ -20 +21 @@ -@@ -843,7 +843,7 @@ ionic_rx_clean(struct ionic_rx_qcq *rxq, +@@ -794,7 +794,7 @@ ionic_rx_clean(struct ionic_queue *q, @@ -23 +24 @@ - pkt_flags |= RTE_MBUF_F_RX_RSS_HASH; + pkt_flags |= PKT_RX_RSS_HASH; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ionic: fix adapter name for logging' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (16 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for RSS' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix reported error stats' " luca.boccassi ` (27 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Andrew Boyer; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4c63cfccaa7e8105a73f9c4a72f67c9400da2279 Thanks. Luca Boccassi --- From 4c63cfccaa7e8105a73f9c4a72f67c9400da2279 Mon Sep 17 00:00:00 2001 From: Andrew Boyer <andrew.boyer@amd.com> Date: Tue, 18 Oct 2022 12:40:58 -0700 Subject: [PATCH] net/ionic: fix adapter name for logging [ upstream commit d8fad46a3f7e1f96945ea5a509041eef93ada835 ] Otherwise the log messages will be garbled. Fixes: 4ae96cb88fa0 ("net/ionic: do minor logging fixups") Signed-off-by: Andrew Boyer <andrew.boyer@amd.com> --- drivers/net/ionic/ionic_dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c index 632ca10cf2..414d395f5a 100644 --- a/drivers/net/ionic/ionic_dev.c +++ b/drivers/net/ionic/ionic_dev.c @@ -55,7 +55,10 @@ ionic_dev_setup(struct ionic_adapter *adapter) ioread8(&idev->dev_info->fw_version[i]); adapter->fw_version[IONIC_DEVINFO_FWVERS_BUFLEN - 1] = '\0'; - IONIC_PRINT(DEBUG, "Firmware version: %s", adapter->fw_version); + adapter->name = adapter->pci_dev->device.name; + + IONIC_PRINT(DEBUG, "%s firmware version: %s", + adapter->name, adapter->fw_version); /* BAR1: doorbells */ bar++; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.344685572 +0000 +++ 0019-net-ionic-fix-adapter-name-for-logging.patch 2022-11-05 17:11:08.630941697 +0000 @@ -1 +1 @@ -From d8fad46a3f7e1f96945ea5a509041eef93ada835 Mon Sep 17 00:00:00 2001 +From 4c63cfccaa7e8105a73f9c4a72f67c9400da2279 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d8fad46a3f7e1f96945ea5a509041eef93ada835 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index 43e9ca3de3..5439b99b2d 100644 +index 632ca10cf2..414d395f5a 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ionic: fix reported error stats' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (17 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ionic: fix adapter name for logging' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix flow flush order on close' " luca.boccassi ` (26 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Andrew Boyer; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2224ce94db7c23dc084a407c65eb59c5726313e8 Thanks. Luca Boccassi --- From 2224ce94db7c23dc084a407c65eb59c5726313e8 Mon Sep 17 00:00:00 2001 From: Andrew Boyer <andrew.boyer@amd.com> Date: Tue, 18 Oct 2022 12:41:00 -0700 Subject: [PATCH] net/ionic: fix reported error stats [ upstream commit 26cc5dc29a3aa6a05f66ac269b346689028ee462 ] Report descriptor errors in ierrors instead of imissed. Don't report rx_queue_empty or rx_queue_disabled in imissed, since those packet errors are already included in the rx_*_drop_packets counters. This makes the reported stats correct. Fixes: 3cdfd90579e7 ("net/ionic: add stats") Signed-off-by: Andrew Boyer <andrew.boyer@amd.com> --- drivers/net/ionic/ionic_lif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 33a5977ced..4947a047ca 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -114,7 +114,7 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats for (i = 0; i < lif->nrxqcqs; i++) { struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats.rx; - stats->imissed += + stats->ierrors += rx_stats->no_cb_arg + rx_stats->bad_cq_status + rx_stats->no_room + @@ -126,10 +126,8 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats ls->rx_mcast_drop_packets + ls->rx_bcast_drop_packets; - stats->imissed += - ls->rx_queue_empty + + stats->ierrors += ls->rx_dma_error + - ls->rx_queue_disabled + ls->rx_desc_fetch_error + ls->rx_desc_data_error; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.426703337 +0000 +++ 0020-net-ionic-fix-reported-error-stats.patch 2022-11-05 17:11:08.630941697 +0000 @@ -1 +1 @@ -From 26cc5dc29a3aa6a05f66ac269b346689028ee462 Mon Sep 17 00:00:00 2001 +From 2224ce94db7c23dc084a407c65eb59c5726313e8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 26cc5dc29a3aa6a05f66ac269b346689028ee462 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 5e8fdf3893..799530f7f5 100644 +index 33a5977ced..4947a047ca 100644 @@ -24 +25 @@ -@@ -132,7 +132,7 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats +@@ -114,7 +114,7 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats @@ -27 +28 @@ - struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats; + struct ionic_rx_stats *rx_stats = &lif->rxqcqs[i]->stats.rx; @@ -33 +34 @@ -@@ -144,10 +144,8 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats +@@ -126,10 +126,8 @@ ionic_lif_get_abs_stats(const struct ionic_lif *lif, struct rte_eth_stats *stats ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix flow flush order on close' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (18 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ionic: fix reported error stats' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'vhost: add non-blocking API for posting interrupt' " luca.boccassi ` (25 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a6f0c4fd618fa07befd885004f43cfc181ad92c7 Thanks. Luca Boccassi --- From a6f0c4fd618fa07befd885004f43cfc181ad92c7 Mon Sep 17 00:00:00 2001 From: Ivan Malov <ivan.malov@oktetlabs.ru> Date: Wed, 19 Oct 2022 14:18:05 +0300 Subject: [PATCH] net/bonding: fix flow flush order on close [ upstream commit df810d1b6e31a3e25085a6abae3be119af3034c1 ] The current code first removes all back-end devices of the bonded device and then invokes flush operation to remove flows in such back-end devices, which makes no sense. Fix that by re-ordering the steps accordingly. Fixes: 49dad9028e2a ("net/bonding: support flow API") Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index f426c66b69..d5dac1ef3e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2140,6 +2140,10 @@ bond_ethdev_close(struct rte_eth_dev *dev) return 0; RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name); + + /* Flush flows in all back-end devices before removing them */ + bond_flow_ops.flush(dev, &ferror); + while (internals->slave_count != skipped) { uint16_t port_id = internals->slaves[skipped].port_id; @@ -2157,7 +2161,6 @@ bond_ethdev_close(struct rte_eth_dev *dev) skipped++; } } - bond_flow_ops.flush(dev, &ferror); bond_ethdev_free_queues(dev); rte_bitmap_reset(internals->vlan_filter_bmp); rte_bitmap_free(internals->vlan_filter_bmp); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.507316626 +0000 +++ 0021-net-bonding-fix-flow-flush-order-on-close.patch 2022-11-05 17:11:08.638941869 +0000 @@ -1 +1 @@ -From df810d1b6e31a3e25085a6abae3be119af3034c1 Mon Sep 17 00:00:00 2001 +From a6f0c4fd618fa07befd885004f43cfc181ad92c7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit df810d1b6e31a3e25085a6abae3be119af3034c1 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) @@ -21 +22 @@ -index 486b7fc9f7..51d543e5de 100644 +index f426c66b69..d5dac1ef3e 100644 @@ -24,3 +25,2 @@ -@@ -2156,6 +2156,9 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev) - int skipped = 0; - struct rte_flow_error ferror; +@@ -2140,6 +2140,10 @@ bond_ethdev_close(struct rte_eth_dev *dev) + return 0; @@ -27,0 +28,2 @@ + RTE_BOND_LOG(INFO, "Closing bonded device %s", dev->device->name); ++ @@ -34 +36 @@ -@@ -2173,7 +2176,6 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev) +@@ -2157,7 +2161,6 @@ bond_ethdev_close(struct rte_eth_dev *dev) @@ -39,3 +41,3 @@ - } - - int + bond_ethdev_free_queues(dev); + rte_bitmap_reset(internals->vlan_filter_bmp); + rte_bitmap_free(internals->vlan_filter_bmp); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'vhost: add non-blocking API for posting interrupt' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (19 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/bonding: fix flow flush order on close' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/virtio: remove declaration of undefined function' " luca.boccassi ` (24 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Changpeng Liu; +Cc: Chenbo Xia, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/03d4ba0fe38dc41ef55878d34b19fc0c774e3637 Thanks. Luca Boccassi --- From 03d4ba0fe38dc41ef55878d34b19fc0c774e3637 Mon Sep 17 00:00:00 2001 From: Changpeng Liu <changpeng.liu@intel.com> Date: Mon, 17 Oct 2022 15:48:17 +0800 Subject: [PATCH] vhost: add non-blocking API for posting interrupt [ upstream commit 830f7e790732b3a4b8830b181d399e317098d291 ] Vhost-user library locks all VQ's access lock when processing vring based messages, such as SET_VRING_KICK and SET_VRING_CALL, and the data processing thread may already be started, e.g: SPDK vhost-blk and vhost-scsi will start the data processing thread when one vring is ready, then deadlock may happen when SPDK is posting interrupts to VM. Here, we add a new API which allows caller to try again later for this case. Bugzilla ID: 1015 Fixes: c5736998305d ("vhost: fix missing virtqueue lock protection") Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> --- doc/guides/prog_guide/vhost_lib.rst | 6 ++++++ lib/librte_vhost/rte_vhost.h | 15 +++++++++++++++ lib/librte_vhost/version.map | 3 +++ lib/librte_vhost/vhost.c | 30 +++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 8970db8e5c..68fae4dc04 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -271,6 +271,12 @@ The following is an overview of some key Vhost API functions: Poll enqueue completion status from async data path. Completed packets are returned to applications through ``pkts``. +* ``rte_vhost_vring_call_nonblock(int vid, uint16_t vring_idx)`` + + Notify the guest that used descriptors have been added to the vring. This function + will return -EAGAIN when vq's access lock is held by other thread, user should try + again later. + Vhost-user Implementations -------------------------- diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h index 39fe428079..bafb176727 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h @@ -889,6 +889,21 @@ rte_vhost_clr_inflight_desc_packed(int vid, uint16_t vring_idx, */ int rte_vhost_vring_call(int vid, uint16_t vring_idx); +/** + * Notify the guest that used descriptors have been added to the vring. This + * function acts as a memory barrier. This function will return -EAGAIN when + * vq's access lock is held by other thread, user should try again later. + * + * @param vid + * vhost device ID + * @param vring_idx + * vring index + * @return + * 0 on success, -1 on failure, -EAGAIN for another retry + */ +__rte_experimental +int rte_vhost_vring_call_nonblock(int vid, uint16_t vring_idx); + /** * Get vhost RX queue avail count. * diff --git a/lib/librte_vhost/version.map b/lib/librte_vhost/version.map index 9183d6f2fc..6a7254f2c6 100644 --- a/lib/librte_vhost/version.map +++ b/lib/librte_vhost/version.map @@ -76,4 +76,7 @@ EXPERIMENTAL { rte_vhost_async_channel_unregister; rte_vhost_submit_enqueue_burst; rte_vhost_poll_enqueue_completed; + + # added in 22.11 + rte_vhost_vring_call_nonblock; }; diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 11704d4a5f..cc5855ecfd 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -1277,6 +1277,36 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) return 0; } +int +rte_vhost_vring_call_nonblock(int vid, uint16_t vring_idx) +{ + struct virtio_net *dev; + struct vhost_virtqueue *vq; + + dev = get_device(vid); + if (!dev) + return -1; + + if (vring_idx >= VHOST_MAX_VRING) + return -1; + + vq = dev->virtqueue[vring_idx]; + if (!vq) + return -1; + + if (!rte_spinlock_trylock(&vq->access_lock)) + return -EAGAIN; + + if (vq_is_packed(dev)) + vhost_vring_call_packed(dev, vq); + else + vhost_vring_call_split(dev, vq); + + rte_spinlock_unlock(&vq->access_lock); + + return 0; +} + uint16_t rte_vhost_avail_entries(int vid, uint16_t queue_id) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.596242782 +0000 +++ 0022-vhost-add-non-blocking-API-for-posting-interrupt.patch 2022-11-05 17:11:08.642941955 +0000 @@ -1 +1 @@ -From 830f7e790732b3a4b8830b181d399e317098d291 Mon Sep 17 00:00:00 2001 +From 03d4ba0fe38dc41ef55878d34b19fc0c774e3637 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 830f7e790732b3a4b8830b181d399e317098d291 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -21,6 +22,5 @@ - doc/guides/prog_guide/vhost_lib.rst | 6 ++++++ - doc/guides/rel_notes/release_22_11.rst | 6 ++++++ - lib/vhost/rte_vhost.h | 15 +++++++++++++ - lib/vhost/version.map | 1 + - lib/vhost/vhost.c | 30 ++++++++++++++++++++++++++ - 5 files changed, 58 insertions(+) + doc/guides/prog_guide/vhost_lib.rst | 6 ++++++ + lib/librte_vhost/rte_vhost.h | 15 +++++++++++++++ + lib/librte_vhost/version.map | 3 +++ + lib/librte_vhost/vhost.c | 30 +++++++++++++++++++++++++++++ + 4 files changed, 54 insertions(+) @@ -29 +29 @@ -index 0d9eca1f7d..e8bb8c9b7b 100644 +index 8970db8e5c..68fae4dc04 100644 @@ -32,3 +32,3 @@ -@@ -297,6 +297,12 @@ The following is an overview of some key Vhost API functions: - Clear in-flight packets which are submitted to async channel in vhost async data - path. Completed packets are returned to applications through ``pkts``. +@@ -271,6 +271,12 @@ The following is an overview of some key Vhost API functions: + Poll enqueue completion status from async data path. Completed packets + are returned to applications through ``pkts``. @@ -42,18 +42,2 @@ - * ``rte_vhost_vring_stats_get_names(int vid, uint16_t queue_id, struct rte_vhost_stat_name *names, unsigned int size)`` - - This function returns the names of the queue statistics. It requires -diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst -index c62acde891..6722832f3f 100644 ---- a/doc/guides/rel_notes/release_22_11.rst -+++ b/doc/guides/rel_notes/release_22_11.rst -@@ -188,6 +188,12 @@ New Features - Added support to unconfigure DMA vChannel that is no longer used - by the vhost library. - -+* **Added non-blocking notify API to vhost library.** -+ -+ Added ``rte_vhost_vring_call_nonblock`` API to notify the guest that -+ used descriptors have been added to the vring in non-blocking way. -+ User should check the return value of this API and try again if needed. -+ - * **Added support for MACsec in rte_security.** + Vhost-user Implementations + -------------------------- @@ -61,6 +45,5 @@ - Added MACsec transform for rte_security session and added new API -diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h -index bb7d86a432..d22b25cd4e 100644 ---- a/lib/vhost/rte_vhost.h -+++ b/lib/vhost/rte_vhost.h -@@ -909,6 +909,21 @@ rte_vhost_clr_inflight_desc_packed(int vid, uint16_t vring_idx, +diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h +index 39fe428079..bafb176727 100644 +--- a/lib/librte_vhost/rte_vhost.h ++++ b/lib/librte_vhost/rte_vhost.h +@@ -889,6 +889,21 @@ rte_vhost_clr_inflight_desc_packed(int vid, uint16_t vring_idx, @@ -88,8 +71,10 @@ -diff --git a/lib/vhost/version.map b/lib/vhost/version.map -index 0b61870870..d64786fa71 100644 ---- a/lib/vhost/version.map -+++ b/lib/vhost/version.map -@@ -97,6 +97,7 @@ EXPERIMENTAL { - - # added in 22.11 - rte_vhost_async_dma_unconfigure; +diff --git a/lib/librte_vhost/version.map b/lib/librte_vhost/version.map +index 9183d6f2fc..6a7254f2c6 100644 +--- a/lib/librte_vhost/version.map ++++ b/lib/librte_vhost/version.map +@@ -76,4 +76,7 @@ EXPERIMENTAL { + rte_vhost_async_channel_unregister; + rte_vhost_submit_enqueue_burst; + rte_vhost_poll_enqueue_completed; ++ ++ # added in 22.11 @@ -98,7 +83,5 @@ - - INTERNAL { -diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c -index 1bb01c2a2e..19c7b92c32 100644 ---- a/lib/vhost/vhost.c -+++ b/lib/vhost/vhost.c -@@ -1318,6 +1318,36 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) +diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c +index 11704d4a5f..cc5855ecfd 100644 +--- a/lib/librte_vhost/vhost.c ++++ b/lib/librte_vhost/vhost.c +@@ -1277,6 +1277,36 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/virtio: remove declaration of undefined function' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (20 preceding siblings ...) 2022-11-05 17:11 ` patch 'vhost: add non-blocking API for posting interrupt' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix thread workspace memory leak' " luca.boccassi ` (23 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Olivier Matz; +Cc: Maxime Coquelin, Chenbo Xia, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/69dc5e9440bf79abceb4cf09c04fffd4e1c5a12c Thanks. Luca Boccassi --- From 69dc5e9440bf79abceb4cf09c04fffd4e1c5a12c Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:22:18 +0200 Subject: [PATCH] net/virtio: remove declaration of undefined function [ upstream commit d118ff6051e3652d81097c57c3d894194e18b4d8 ] This function is not defined, remove its declaration. Fixes: c1f86306a026 ("virtio: add new driver") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> --- drivers/net/virtio/virtqueue.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 8e6fd22412..70121eb340 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -449,10 +449,6 @@ virtqueue_enable_intr(struct virtqueue *vq) virtqueue_enable_intr_split(vq); } -/** - * Dump virtqueue internal structures, for debug purpose only. - */ -void virtqueue_dump(struct virtqueue *vq); /** * Get all mbufs to be freed. */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.673183891 +0000 +++ 0023-net-virtio-remove-declaration-of-undefined-function.patch 2022-11-05 17:11:08.646942040 +0000 @@ -1 +1 @@ -From d118ff6051e3652d81097c57c3d894194e18b4d8 Mon Sep 17 00:00:00 2001 +From 69dc5e9440bf79abceb4cf09c04fffd4e1c5a12c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d118ff6051e3652d81097c57c3d894194e18b4d8 ] + @@ -18 +20 @@ -index d100ed8762..f5d8b40cad 100644 +index 8e6fd22412..70121eb340 100644 @@ -21 +23 @@ -@@ -474,10 +474,6 @@ virtqueue_enable_intr(struct virtqueue *vq) +@@ -449,10 +449,6 @@ virtqueue_enable_intr(struct virtqueue *vq) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix thread workspace memory leak' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (21 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/virtio: remove declaration of undefined function' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix RSS expansion buffer size' " luca.boccassi ` (22 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Dong Zhou; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/afccd451f65904ae301cd15208e09ad51efad352 Thanks. Luca Boccassi --- From afccd451f65904ae301cd15208e09ad51efad352 Mon Sep 17 00:00:00 2001 From: Dong Zhou <dongzhou@nvidia.com> Date: Thu, 13 Oct 2022 12:34:02 +0300 Subject: [PATCH] net/mlx5: fix thread workspace memory leak [ upstream commit 4df7f801fff5e4065da5c86ad05df0e48d4d3d6e ] The thread workspace push/pop should be paired. In the "flow_list_create" routine, if error happened the workspace pop was missed. This patch shares the workspace pop for all return paths. Fixes: 0064bf431899 ("net/mlx5: fix nested flow creation") Signed-off-by: Dong Zhou <dongzhou@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 7a149ab761..e22e8f6918 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5691,8 +5691,8 @@ error: rte_errno = ret; /* Restore rte_errno. */ ret = rte_errno; rte_errno = ret; - mlx5_flow_pop_thread_workspace(); error_before_hairpin_split: + mlx5_flow_pop_thread_workspace(); rte_free(translated_actions); return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.764987031 +0000 +++ 0024-net-mlx5-fix-thread-workspace-memory-leak.patch 2022-11-05 17:11:08.662942384 +0000 @@ -1 +1 @@ -From 4df7f801fff5e4065da5c86ad05df0e48d4d3d6e Mon Sep 17 00:00:00 2001 +From afccd451f65904ae301cd15208e09ad51efad352 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4df7f801fff5e4065da5c86ad05df0e48d4d3d6e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index e4744b0a67..6fb1d53fc5 100644 +index 7a149ab761..e22e8f6918 100644 @@ -23 +24 @@ -@@ -7028,8 +7028,8 @@ error: +@@ -5691,8 +5691,8 @@ error: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix RSS expansion buffer size' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (22 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/mlx5: fix thread workspace memory leak' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix tunnel header with IPIP offload' " luca.boccassi ` (21 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7056c33e3babd388c6cb4eb8818549c993fbeb61 Thanks. Luca Boccassi --- From 7056c33e3babd388c6cb4eb8818549c993fbeb61 Mon Sep 17 00:00:00 2001 From: Gregory Etelson <getelson@nvidia.com> Date: Thu, 20 Oct 2022 12:59:23 +0300 Subject: [PATCH] net/mlx5: fix RSS expansion buffer size [ upstream commit 31b29e0c7f5acca47ab57a087a70fb8a29f75c35 ] Increase expansion buffer size to accumulate more RSS types. Fixes: 3f02c7ff6815 ("net/mlx5: fix RSS expansion for inner tunnel VLAN") Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Matan Azrad <matan@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 e22e8f6918..9893bac212 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -5478,7 +5478,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list, int shared_actions_n = MLX5_MAX_SHARED_ACTIONS; union { struct mlx5_flow_expand_rss buf; - uint8_t buffer[4096]; + uint8_t buffer[8192]; } expand_buffer; union { struct rte_flow_action actions[MLX5_MAX_SPLIT_ACTIONS]; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.851312416 +0000 +++ 0025-net-mlx5-fix-RSS-expansion-buffer-size.patch 2022-11-05 17:11:08.678942728 +0000 @@ -1 +1 @@ -From 31b29e0c7f5acca47ab57a087a70fb8a29f75c35 Mon Sep 17 00:00:00 2001 +From 7056c33e3babd388c6cb4eb8818549c993fbeb61 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 31b29e0c7f5acca47ab57a087a70fb8a29f75c35 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 4bfe94689f..dcd2ae7a8a 100644 +index e22e8f6918..9893bac212 100644 @@ -21,2 +22,2 @@ -@@ -6889,7 +6889,7 @@ flow_list_create(struct rte_eth_dev *dev, enum mlx5_flow_type type, - int indir_actions_n = MLX5_MAX_INDIRECT_ACTIONS; +@@ -5478,7 +5478,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list, + int shared_actions_n = MLX5_MAX_SHARED_ACTIONS; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix tunnel header with IPIP offload' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (23 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/mlx5: fix RSS expansion buffer size' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'sched: fix subport profile configuration' " luca.boccassi ` (20 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5a8a4d8a8c445336bb67e8c1662a0f8d116b54c2 Thanks. Luca Boccassi --- From 5a8a4d8a8c445336bb67e8c1662a0f8d116b54c2 Mon Sep 17 00:00:00 2001 From: Jiawei Wang <jiaweiw@nvidia.com> Date: Thu, 20 Oct 2022 15:55:34 +0300 Subject: [PATCH] net/mlx5: fix tunnel header with IPIP offload [ upstream commit bfa87e21bdeadb48c0ad9ad6b360393c413be861 ] For the flows with multiple tunnel layers and containing tunnel decap and modify actions, for example: ... / vxlan / eth / ipv4 proto is 4 / end actions raw_decap / modify_field / ... (note: proto 4 means we have the IP-over-IP tunnel in VXLAN payload) We have added the multiple tunnel layers validation rejecting the flows like above mentioned one. The hardware supports the above match combination till the inner IP-over-IP header (not including the last one), both for IP-over-IPv4 and IP-over-IPv6, so we should not blindly reject. Also, for the modify actions following the decap we should set the layer attributes correctly. This patch reverts the below code changes to support the match, and adjusts the layers update in case of decap with outer tunnel header. Fixes: fa06906a48ee ("net/mlx5: fix IPIP multi-tunnel validation") Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_flow.c | 4 ++-- drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 9893bac212..43fa595be1 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2217,7 +2217,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, RTE_FLOW_ERROR_TYPE_ITEM, item, "IPv4 cannot follow L2/VLAN layer " "which ether type is not IPv4"); - if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { + if (item_flags & MLX5_FLOW_LAYER_IPIP) { if (mask && spec) next_proto = mask->hdr.next_proto_id & spec->hdr.next_proto_id; @@ -2325,7 +2325,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, "which ether type is not IPv6"); if (mask && mask->hdr.proto == UINT8_MAX && spec) next_proto = spec->hdr.proto; - if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { + if (item_flags & MLX5_FLOW_LAYER_IPIP) { if (next_proto == IPPROTO_IPIP || next_proto == IPPROTO_IPV6) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 500ffaf013..f25ee9f92f 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -104,6 +104,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, struct mlx5_flow *dev_flow, bool tunnel_decap) { uint64_t layers = dev_flow->handle->layers; + bool tunnel_match = false; /* * If layers is already initialized, it means this dev_flow is the @@ -140,8 +141,10 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, case RTE_FLOW_ITEM_TYPE_GENEVE: case RTE_FLOW_ITEM_TYPE_MPLS: case RTE_FLOW_ITEM_TYPE_GTP: - if (tunnel_decap) + if (tunnel_decap) { attr->attr = 0; + tunnel_match = true; + } break; case RTE_FLOW_ITEM_TYPE_IPV4: if (!attr->ipv6) @@ -155,7 +158,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, ((const struct rte_flow_item_ipv4 *) (item->mask))->hdr.next_proto_id; if ((next_protocol == IPPROTO_IPIP || - next_protocol == IPPROTO_IPV6) && tunnel_decap) + next_protocol == IPPROTO_IPV6) && tunnel_decap && + !tunnel_match) attr->attr = 0; break; case RTE_FLOW_ITEM_TYPE_IPV6: @@ -170,7 +174,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, ((const struct rte_flow_item_ipv6 *) (item->mask))->hdr.proto; if ((next_protocol == IPPROTO_IPIP || - next_protocol == IPPROTO_IPV6) && tunnel_decap) + next_protocol == IPPROTO_IPV6) && tunnel_decap && + !tunnel_match) attr->attr = 0; break; case RTE_FLOW_ITEM_TYPE_UDP: -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:10.962629843 +0000 +++ 0026-net-mlx5-fix-tunnel-header-with-IPIP-offload.patch 2022-11-05 17:11:08.726943758 +0000 @@ -1 +1 @@ -From bfa87e21bdeadb48c0ad9ad6b360393c413be861 Mon Sep 17 00:00:00 2001 +From 5a8a4d8a8c445336bb67e8c1662a0f8d116b54c2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bfa87e21bdeadb48c0ad9ad6b360393c413be861 ] + @@ -25 +26,0 @@ -Cc: stable@dpdk.org @@ -35 +36 @@ -index 3aec121679..8e7d649d15 100644 +index 9893bac212..43fa595be1 100644 @@ -38 +39 @@ -@@ -2664,7 +2664,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, +@@ -2217,7 +2217,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, @@ -47 +48 @@ -@@ -2772,7 +2772,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, +@@ -2325,7 +2325,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, @@ -57 +58 @@ -index 6d8c155e45..1e52278191 100644 +index 500ffaf013..f25ee9f92f 100644 @@ -60 +61 @@ -@@ -128,6 +128,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, +@@ -104,6 +104,7 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, @@ -68 +69 @@ -@@ -164,8 +165,10 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, +@@ -140,8 +141,10 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, @@ -80 +81 @@ -@@ -179,7 +182,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, +@@ -155,7 +158,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, @@ -90 +91 @@ -@@ -194,7 +198,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, +@@ -170,7 +174,8 @@ flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'sched: fix subport profile configuration' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (24 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/mlx5: fix tunnel header with IPIP offload' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'examples/qos_sched: fix number of subport profiles' " luca.boccassi ` (19 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Megha Ajmera; +Cc: Cristian Dumitrescu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/afa3c4b8eef4c493e0fe5ad70cfa2507606682e4 Thanks. Luca Boccassi --- From afa3c4b8eef4c493e0fe5ad70cfa2507606682e4 Mon Sep 17 00:00:00 2001 From: Megha Ajmera <megha.ajmera@intel.com> Date: Fri, 28 Oct 2022 09:55:29 +0000 Subject: [PATCH] sched: fix subport profile configuration [ upstream commit 25eae0f790af150e7e783cc81436920656e9f06a ] In rte_sched_subport_config() API, subport_profile_id is not set correctly. Fixes: ac6fcb841b0f ("sched: update subport rate dynamically") Signed-off-by: Megha Ajmera <megha.ajmera@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> --- lib/librte_sched/rte_sched.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 4ba95bc414..e941a4b5c3 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -1148,8 +1148,6 @@ rte_sched_subport_config(struct rte_sched_port *port, n_subports++; - subport_profile_id = 0; - /* Port */ port->subports[subport_id] = s; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.072647223 +0000 +++ 0027-sched-fix-subport-profile-configuration.patch 2022-11-05 17:11:08.730943843 +0000 @@ -1 +1 @@ -From 25eae0f790af150e7e783cc81436920656e9f06a Mon Sep 17 00:00:00 2001 +From afa3c4b8eef4c493e0fe5ad70cfa2507606682e4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 25eae0f790af150e7e783cc81436920656e9f06a ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - lib/sched/rte_sched.c | 2 -- + lib/librte_sched/rte_sched.c | 2 -- @@ -17,5 +18,5 @@ -diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c -index c5fa9e4582..c91697131d 100644 ---- a/lib/sched/rte_sched.c -+++ b/lib/sched/rte_sched.c -@@ -1257,8 +1257,6 @@ rte_sched_subport_config(struct rte_sched_port *port, +diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c +index 4ba95bc414..e941a4b5c3 100644 +--- a/lib/librte_sched/rte_sched.c ++++ b/lib/librte_sched/rte_sched.c +@@ -1148,8 +1148,6 @@ rte_sched_subport_config(struct rte_sched_port *port, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/qos_sched: fix number of subport profiles' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (25 preceding siblings ...) 2022-11-05 17:11 ` patch 'sched: fix subport profile configuration' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ixgbe: fix broadcast Rx on VF after promisc removal' " luca.boccassi ` (18 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Megha Ajmera; +Cc: Cristian Dumitrescu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/969d23b4a46dd2892ab3c8132f2873cea2f05bf3 Thanks. Luca Boccassi --- From 969d23b4a46dd2892ab3c8132f2873cea2f05bf3 Mon Sep 17 00:00:00 2001 From: Megha Ajmera <megha.ajmera@intel.com> Date: Fri, 28 Oct 2022 09:55:30 +0000 Subject: [PATCH] examples/qos_sched: fix number of subport profiles [ upstream commit 85ea681c821889518e33431dc6eb00c7f54e59f4 ] Removed unused subport field from profile.cfg Correctly using subport profile id in subport config load. Fixes: 802d214dc880 ("examples/qos_sched: update subport rate dynamically") Signed-off-by: Megha Ajmera <megha.ajmera@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> --- examples/qos_sched/cfg_file.c | 2 +- examples/qos_sched/profile.cfg | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index cd167bd8e6..4bf088ef15 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -155,7 +155,7 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg, profiles = rte_cfgfile_num_sections(cfg, "subport profile", sizeof("subport profile") - 1); - subport_params[0].n_pipe_profiles = profiles; + port_params.n_subport_profiles = profiles; for (i = 0; i < profiles; i++) { char sec_name[32]; diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg index 4486d2799e..a308d61f02 100644 --- a/examples/qos_sched/profile.cfg +++ b/examples/qos_sched/profile.cfg @@ -26,8 +26,6 @@ number of subports per port = 1 number of pipes per subport = 4096 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 -subport 0-8 = 0 ; These subports are configured with subport profile 0 - [subport profile 0] tb rate = 1250000000 ; Bytes per second tb size = 1000000 ; Bytes -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.159268050 +0000 +++ 0028-examples-qos_sched-fix-number-of-subport-profiles.patch 2022-11-05 17:11:08.730943843 +0000 @@ -1 +1 @@ -From 85ea681c821889518e33431dc6eb00c7f54e59f4 Mon Sep 17 00:00:00 2001 +From 969d23b4a46dd2892ab3c8132f2873cea2f05bf3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 85ea681c821889518e33431dc6eb00c7f54e59f4 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 3d5d75fcf0..ca871d3287 100644 +index cd167bd8e6..4bf088ef15 100644 @@ -23 +24 @@ -@@ -157,7 +157,7 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg, +@@ -155,7 +155,7 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg, @@ -33 +34 @@ -index c9ec187c93..e8de101b6c 100644 +index 4486d2799e..a308d61f02 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ixgbe: fix broadcast Rx on VF after promisc removal' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (26 preceding siblings ...) 2022-11-05 17:11 ` patch 'examples/qos_sched: fix number of subport profiles' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' " luca.boccassi ` (17 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Olivier Matz; +Cc: Wenjun Wu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c548e48860b1475d19d8b6c8b43ee619a0d9c14b Thanks. Luca Boccassi --- From c548e48860b1475d19d8b6c8b43ee619a0d9c14b Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:09:00 +0200 Subject: [PATCH] net/ixgbe: fix broadcast Rx on VF after promisc removal [ upstream commit 8260929205e5a2666f9db697f749a2d23273bb86 ] After a VF requested to remove the promiscuous flag on an interface, the broadcast packets are not received anymore. This breaks some protocols like ARP. In ixgbe_update_vf_xcast_mode(), we should keep the IXGBE_VMOLR_BAM bit (Broadcast Accept) on promiscuous removal. This flag is already set by default in ixgbe_vf_reset_event() on VF reset. A similar patch was accepted in Linux kernel (see link). Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=803e9895ea2b Fixes: 0355c379b71f ("net/ixgbe: support VF promiscuous by PF driver") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Wenjun Wu <wenjun1.wu@intel.com> --- drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 8ee83c1d71..7e75a114de 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -757,9 +757,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) switch (xcast_mode) { case IXGBEVF_XCAST_MODE_NONE: - disable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE | + disable = IXGBE_VMOLR_ROMPE | IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE; - enable = 0; + enable = IXGBE_VMOLR_BAM; break; case IXGBEVF_XCAST_MODE_MULTI: disable = IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.228705745 +0000 +++ 0029-net-ixgbe-fix-broadcast-Rx-on-VF-after-promisc-remov.patch 2022-11-05 17:11:08.734943930 +0000 @@ -1 +1 @@ -From 8260929205e5a2666f9db697f749a2d23273bb86 Mon Sep 17 00:00:00 2001 +From c548e48860b1475d19d8b6c8b43ee619a0d9c14b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8260929205e5a2666f9db697f749a2d23273bb86 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index c73833b7ae..c5ef940533 100644 +index 8ee83c1d71..7e75a114de 100644 @@ -30 +31 @@ -@@ -747,9 +747,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) +@@ -757,9 +757,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (27 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ixgbe: fix broadcast Rx on VF after promisc removal' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/ice: fix null function pointer call' " luca.boccassi ` (16 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Olivier Matz; +Cc: Wenjun Wu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ca45dbea55e7e3a0d6125960a5c144c2747c1e70 Thanks. Luca Boccassi --- From ca45dbea55e7e3a0d6125960a5c144c2747c1e70 Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:09:01 +0200 Subject: [PATCH] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 15ce76460a681b133709475f0eb5dbe12bb61b32 ] When the promiscuous mode is enabled on a VF, the IXGBE_VMOLR_VPE bit (VLAN Promiscuous Enable) is set. This means that the VF will receive packets whose VLAN is not the same as the VLAN of the VF. For instance, in this situation: ┌────────┐ ┌────────┐ ┌────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ VF0├────┤VF1 VF2├────┤VF3 │ │ │ │ │ │ │ └────────┘ └────────┘ └────────┘ VM1 VM2 VM3 vf 0: vlan 1000 vf 1: vlan 1000 vf 2: vlan 1001 vf 3: vlan 1001 If we tcpdump on VF3, we see all the packets, even those transmitted on vlan 1000. This behavior prevents to bridge VF1 and VF2 in VM2, because it will create a loop: packets transmitted on VF1 will be received by VF2 and vice-versa, and bridged again through the software bridge. This patch remove the activation of VLAN Promiscuous when a VF enables the promiscuous mode. However, the IXGBE_VMOLR_UPE bit (Unicast Promiscuous) is kept, so that a VF receives all packets that has the same VLAN, whatever the destination MAC address. A similar patch was accepted in Linux kernel (see link). Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7bb0fb7c63df Fixes: 0355c379b71f ("net/ixgbe: support VF promiscuous by PF driver") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Wenjun Wu <wenjun1.wu@intel.com> --- drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 7e75a114de..403fcfa100 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -781,9 +781,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) return -1; } - disable = 0; + disable = IXGBE_VMOLR_VPE; enable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE | - IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE; + IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE; break; default: return -1; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.319778896 +0000 +++ 0030-net-ixgbe-fix-unexpected-VLAN-Rx-in-promisc-mode-on-.patch 2022-11-05 17:11:08.738944016 +0000 @@ -1 +1 @@ -From 15ce76460a681b133709475f0eb5dbe12bb61b32 Mon Sep 17 00:00:00 2001 +From ca45dbea55e7e3a0d6125960a5c144c2747c1e70 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 15ce76460a681b133709475f0eb5dbe12bb61b32 ] + @@ -44 +45,0 @@ -Cc: stable@dpdk.org @@ -53 +54 @@ -index c5ef940533..0a0f639e39 100644 +index 7e75a114de..403fcfa100 100644 @@ -56 +57 @@ -@@ -771,9 +771,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) +@@ -781,9 +781,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice: fix null function pointer call' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (28 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/iavf: add thread for event callbacks' " luca.boccassi ` (15 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Tomasz Jonak; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/34380524d2de06ed0a0e7592cd7cd295ab85cc09 Thanks. Luca Boccassi --- From 34380524d2de06ed0a0e7592cd7cd295ab85cc09 Mon Sep 17 00:00:00 2001 From: Tomasz Jonak <tomasz@graphiant.com> Date: Wed, 12 Oct 2022 14:27:57 +0200 Subject: [PATCH] net/ice: fix null function pointer call [ upstream commit a8880adcd5f4ea92d0221ff41902d516e68e89ab ] In case rte_eth_dma_zone_reserve fails in ice_tx_queue_setup ice_tx_queue_release is called on 0 allocated but not initialized txq struct. This may happen on ENOMEM condition, size exhaustion of memconfig->memzones array as well as some others. Fixes: edec6dd83824 ("net/ice: remove redundant functions") Signed-off-by: Tomasz Jonak <tomasz@graphiant.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/ice_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index fe1f3eea2d..9a7f8ecfe4 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1158,7 +1158,8 @@ ice_rx_queue_release(void *rxq) return; } - q->rx_rel_mbufs(q); + if (q->rx_rel_mbufs != NULL) + q->rx_rel_mbufs(q); rte_free(q->sw_ring); rte_memzone_free(q->mz); rte_free(q); @@ -1356,7 +1357,8 @@ ice_tx_queue_release(void *txq) return; } - q->tx_rel_mbufs(q); + if (q->tx_rel_mbufs != NULL) + q->tx_rel_mbufs(q); rte_free(q->sw_ring); rte_memzone_free(q->mz); rte_free(q); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.407065251 +0000 +++ 0031-net-ice-fix-null-function-pointer-call.patch 2022-11-05 17:11:08.746944187 +0000 @@ -1 +1 @@ -From a8880adcd5f4ea92d0221ff41902d516e68e89ab Mon Sep 17 00:00:00 2001 +From 34380524d2de06ed0a0e7592cd7cd295ab85cc09 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a8880adcd5f4ea92d0221ff41902d516e68e89ab ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 697251c603..953ff217df 100644 +index fe1f3eea2d..9a7f8ecfe4 100644 @@ -25 +26 @@ -@@ -1302,7 +1302,8 @@ ice_rx_queue_release(void *rxq) +@@ -1158,7 +1158,8 @@ ice_rx_queue_release(void *rxq) @@ -35 +36 @@ -@@ -1512,7 +1513,8 @@ ice_tx_queue_release(void *txq) +@@ -1356,7 +1357,8 @@ ice_tx_queue_release(void *txq) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: add thread for event callbacks' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (29 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/ice: fix null function pointer call' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'net/iavf: fix queue stop for large VF' " luca.boccassi ` (14 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Yiding Zhou; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6932f663ad5c5d163678aaf98c92cac4af077111 Thanks. Luca Boccassi --- From 6932f663ad5c5d163678aaf98c92cac4af077111 Mon Sep 17 00:00:00 2001 From: Yiding Zhou <yidingx.zhou@intel.com> Date: Thu, 20 Oct 2022 13:00:22 +0800 Subject: [PATCH] net/iavf: add thread for event callbacks [ upstream commit cb5c1b91f76f436724cd09f26c7432b2775b519c ] All callbacks registered for ethdev events are called in eal-intr-thread, and some of them execute virtchnl commands. Because interrupts are disabled in the intr thread, no response will be received for these commands. So all callbacks should be called in a new context. When the device is bonded, the bond pmd registers a callback for the LSC event to execute virtchnl commands to reinitialize the device, and it would also raise the above issue. This commit adds a new thread to call all event callbacks. Fixes: 48de41ca11f0 ("net/avf: enable link status update") Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message") Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_ethdev.c | 5 ++ drivers/net/iavf/iavf_vchnl.c | 147 ++++++++++++++++++++++++++++++++- 3 files changed, 151 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index bc49f1fa17..41d9856358 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -287,6 +287,8 @@ _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops) int iavf_check_api_version(struct iavf_adapter *adapter); int iavf_get_vf_resource(struct iavf_adapter *adapter); +void iavf_dev_event_handler_fini(void); +int iavf_dev_event_handler_init(void); void iavf_handle_virtchnl_msg(struct rte_eth_dev *dev); int iavf_enable_vlan_strip(struct iavf_adapter *adapter); int iavf_disable_vlan_strip(struct iavf_adapter *adapter); diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 060b3e3707..9387f17c81 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2034,6 +2034,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr, ð_dev->data->mac_addrs[0]); + if (iavf_dev_event_handler_init()) + return 0; + /* register callback func to eal lib */ rte_intr_callback_register(&pci_dev->intr_handle, iavf_dev_interrupt_handler, @@ -2121,6 +2124,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev) iavf_dev_close(dev); + iavf_dev_event_handler_fini(); + return 0; } diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index f6da2cf4bd..77f10a90c7 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -2,6 +2,7 @@ * Copyright(c) 2017 Intel Corporation */ +#include <fcntl.h> #include <stdio.h> #include <errno.h> #include <stdint.h> @@ -26,6 +27,146 @@ #define MAX_TRY_TIMES 200 #define ASQ_DELAY_MS 10 +#define MAX_EVENT_PENDING 16 + +struct iavf_event_element { + TAILQ_ENTRY(iavf_event_element) next; + struct rte_eth_dev *dev; + enum rte_eth_event_type event; + void *param; + size_t param_alloc_size; + uint8_t param_alloc_data[0]; +}; + +struct iavf_event_handler { + uint32_t ndev; + pthread_t tid; + int fd[2]; + pthread_mutex_t lock; + TAILQ_HEAD(event_list, iavf_event_element) pending; +}; + +static struct iavf_event_handler event_handler = { + .fd = {-1, -1}, +}; + +#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 + +static void * +iavf_dev_event_handle(void *param __rte_unused) +{ + struct iavf_event_handler *handler = &event_handler; + TAILQ_HEAD(event_list, iavf_event_element) pending; + + while (true) { + char unused[MAX_EVENT_PENDING]; + ssize_t nr = read(handler->fd[0], &unused, sizeof(unused)); + if (nr <= 0) + break; + + TAILQ_INIT(&pending); + pthread_mutex_lock(&handler->lock); + TAILQ_CONCAT(&pending, &handler->pending, next); + pthread_mutex_unlock(&handler->lock); + + struct iavf_event_element *pos, *save_next; + TAILQ_FOREACH_SAFE(pos, &pending, next, save_next) { + TAILQ_REMOVE(&pending, pos, next); + rte_eth_dev_callback_process(pos->dev, pos->event, pos->param); + rte_free(pos); + } + } + + return NULL; +} + +static void +iavf_dev_event_post(struct rte_eth_dev *dev, + enum rte_eth_event_type event, + void *param, size_t param_alloc_size) +{ + struct iavf_event_handler *handler = &event_handler; + char notify_byte; + struct iavf_event_element *elem = rte_malloc(NULL, sizeof(*elem) + param_alloc_size, 0); + if (!elem) + return; + + elem->dev = dev; + elem->event = event; + elem->param = param; + elem->param_alloc_size = param_alloc_size; + if (param && param_alloc_size) { + rte_memcpy(elem->param_alloc_data, param, param_alloc_size); + elem->param = elem->param_alloc_data; + } + + pthread_mutex_lock(&handler->lock); + TAILQ_INSERT_TAIL(&handler->pending, elem, next); + pthread_mutex_unlock(&handler->lock); + + ssize_t nw = write(handler->fd[1], ¬ify_byte, 1); + RTE_SET_USED(nw); +} + +int +iavf_dev_event_handler_init(void) +{ + struct iavf_event_handler *handler = &event_handler; + + if (__atomic_add_fetch(&handler->ndev, 1, __ATOMIC_RELAXED) != 1) + return 0; +#if defined(RTE_EXEC_ENV_IS_WINDOWS) && RTE_EXEC_ENV_IS_WINDOWS != 0 + int err = _pipe(handler->fd, MAX_EVENT_PENDING, O_BINARY); +#else + int err = pipe(handler->fd); +#endif + if (err != 0) { + __atomic_sub_fetch(&handler->ndev, 1, __ATOMIC_RELAXED); + return -1; + } + + TAILQ_INIT(&handler->pending); + pthread_mutex_init(&handler->lock, NULL); + + if (rte_ctrl_thread_create(&handler->tid, "iavf-event-thread", + NULL, iavf_dev_event_handle, NULL)) { + __atomic_sub_fetch(&handler->ndev, 1, __ATOMIC_RELAXED); + return -1; + } + + return 0; +} + +void +iavf_dev_event_handler_fini(void) +{ + struct iavf_event_handler *handler = &event_handler; + + if (__atomic_sub_fetch(&handler->ndev, 1, __ATOMIC_RELAXED) != 0) + return; + + int unused = pthread_cancel(handler->tid); + RTE_SET_USED(unused); + close(handler->fd[0]); + close(handler->fd[1]); + handler->fd[0] = -1; + handler->fd[1] = -1; + + pthread_join(handler->tid, NULL); + pthread_mutex_destroy(&handler->lock); + + struct iavf_event_element *pos, *save_next; + TAILQ_FOREACH_SAFE(pos, &handler->pending, next, save_next) { + TAILQ_REMOVE(&handler->pending, pos, next); + rte_free(pos); + } +} + static uint32_t iavf_convert_link_speed(enum virtchnl_link_speed virt_link_speed) { @@ -262,8 +403,8 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, case VIRTCHNL_EVENT_RESET_IMPENDING: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event"); vf->vf_reset = true; - rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, - NULL); + iavf_dev_event_post(dev, RTE_ETH_EVENT_INTR_RESET, + NULL, 0); break; case VIRTCHNL_EVENT_LINK_CHANGE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event"); @@ -277,7 +418,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed = iavf_convert_link_speed(speed); } iavf_dev_link_update(dev, 0); - rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL); + iavf_dev_event_post(dev, RTE_ETH_EVENT_INTR_LSC, NULL, 0); break; case VIRTCHNL_EVENT_PF_DRIVER_CLOSE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event"); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.499928021 +0000 +++ 0032-net-iavf-add-thread-for-event-callbacks.patch 2022-11-05 17:11:08.750944273 +0000 @@ -1 +1 @@ -From cb5c1b91f76f436724cd09f26c7432b2775b519c Mon Sep 17 00:00:00 2001 +From 6932f663ad5c5d163678aaf98c92cac4af077111 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cb5c1b91f76f436724cd09f26c7432b2775b519c ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -27,2 +28,2 @@ - drivers/net/iavf/iavf_vchnl.c | 153 +++++++++++++++++++++++++++++++-- - 3 files changed, 154 insertions(+), 6 deletions(-) + drivers/net/iavf/iavf_vchnl.c | 147 ++++++++++++++++++++++++++++++++- + 3 files changed, 151 insertions(+), 3 deletions(-) @@ -31 +32 @@ -index 26b858f6f0..1edebab8dc 100644 +index bc49f1fa17..41d9856358 100644 @@ -34,2 +35,2 @@ -@@ -424,6 +424,8 @@ _atomic_set_async_response_cmd(struct iavf_info *vf, enum virtchnl_ops ops) - } +@@ -287,6 +287,8 @@ _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops) + @@ -44 +45 @@ -index b1958e0474..8d9f3a6d3d 100644 +index 060b3e3707..9387f17c81 100644 @@ -47 +48 @@ -@@ -2633,6 +2633,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) +@@ -2034,6 +2034,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) @@ -52 +53 @@ -+ goto init_vf_err; ++ return 0; @@ -54,4 +55,4 @@ - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) { - /* register callback func to eal lib */ - rte_intr_callback_register(pci_dev->intr_handle, -@@ -2787,6 +2790,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev) + /* register callback func to eal lib */ + rte_intr_callback_register(&pci_dev->intr_handle, + iavf_dev_interrupt_handler, +@@ -2121,6 +2124,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev) @@ -67 +68 @@ -index 729400cb91..654bc7edb6 100644 +index f6da2cf4bd..77f10a90c7 100644 @@ -78,11 +79,3 @@ -@@ -11,6 +12,7 @@ - #include <inttypes.h> - #include <rte_byteorder.h> - #include <rte_common.h> -+#include <rte_os_shim.h> - - #include <rte_debug.h> - #include <rte_alarm.h> -@@ -27,6 +29,146 @@ - #define MAX_TRY_TIMES 2000 - #define ASQ_DELAY_MS 1 +@@ -26,6 +27,146 @@ + #define MAX_TRY_TIMES 200 + #define ASQ_DELAY_MS 10 @@ -233 +226 @@ -@@ -278,8 +420,8 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, +@@ -262,8 +403,8 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, @@ -244 +237 @@ -@@ -293,7 +435,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, +@@ -277,7 +418,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, @@ -253,12 +245,0 @@ -@@ -359,9 +501,8 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev) - desc.subtype = - RTE_ETH_EVENT_IPSEC_UNKNOWN; - desc.metadata = ev->ipsec_event_data; -- rte_eth_dev_callback_process(dev, -- RTE_ETH_EVENT_IPSEC, -- &desc); -+ iavf_dev_event_post(dev, RTE_ETH_EVENT_IPSEC, -+ &desc, sizeof(desc)); - return; - } - ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: fix queue stop for large VF' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (30 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/iavf: add thread for event callbacks' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'examples/l2fwd-crypto: fix typo in error message' " luca.boccassi ` (13 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Radu Nicolau; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c57ecf8485a69d1c8be1c46ae874869516304cd1 Thanks. Luca Boccassi --- From c57ecf8485a69d1c8be1c46ae874869516304cd1 Mon Sep 17 00:00:00 2001 From: Radu Nicolau <radu.nicolau@intel.com> Date: Thu, 20 Oct 2022 10:09:58 +0100 Subject: [PATCH] net/iavf: fix queue stop for large VF [ upstream commit 96e66d38bc9218520d0e9e19ea3ae21bd175d0a2 ] Use large VF queue stop request when large VF is enabled Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF") Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf_rxtx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 539048c14e..a885d6955c 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -833,6 +833,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_rx_queue *rxq; int err; @@ -841,7 +842,11 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (rx_queue_id >= dev->data->nb_rx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, rx_queue_id, true, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, rx_queue_id, true, false); + else + err = iavf_switch_queue_lv(adapter, rx_queue_id, true, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", rx_queue_id); @@ -861,6 +866,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_tx_queue *txq; int err; @@ -869,7 +875,11 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) if (tx_queue_id >= dev->data->nb_tx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, tx_queue_id, false, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, tx_queue_id, false, false); + else + err = iavf_switch_queue_lv(adapter, tx_queue_id, false, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch TX queue %u off", tx_queue_id); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.592878017 +0000 +++ 0033-net-iavf-fix-queue-stop-for-large-VF.patch 2022-11-05 17:11:08.758944445 +0000 @@ -1 +1 @@ -From 96e66d38bc9218520d0e9e19ea3ae21bd175d0a2 Mon Sep 17 00:00:00 2001 +From c57ecf8485a69d1c8be1c46ae874869516304cd1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 96e66d38bc9218520d0e9e19ea3ae21bd175d0a2 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 437055f76b..3292541ad9 100644 +index 539048c14e..a885d6955c 100644 @@ -21 +22 @@ -@@ -958,6 +958,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -833,6 +833,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) @@ -29 +30 @@ -@@ -966,7 +967,11 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -841,7 +842,11 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) @@ -42 +43 @@ -@@ -986,6 +991,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) +@@ -861,6 +866,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) @@ -50 +51 @@ -@@ -994,7 +1000,11 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) +@@ -869,7 +875,11 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/l2fwd-crypto: fix typo in error message' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (31 preceding siblings ...) 2022-11-05 17:11 ` patch 'net/iavf: fix queue stop for large VF' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'test/crypto: fix wireless auth digest segment' " luca.boccassi ` (12 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Ali Alnubani; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/bf5c9fe05129cea104aabefef8cf8a530c44a74e Thanks. Luca Boccassi --- From bf5c9fe05129cea104aabefef8cf8a530c44a74e Mon Sep 17 00:00:00 2001 From: Ali Alnubani <alialnu@nvidia.com> Date: Sun, 9 Oct 2022 20:58:49 +0300 Subject: [PATCH] examples/l2fwd-crypto: fix typo in error message [ upstream commit 26fbb735e3e6e1bb2e5e6b403dd179640c739467 ] Fixes spelling in one of the app's exit messages. Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application") Signed-off-by: Ali Alnubani <alialnu@nvidia.com> --- examples/l2fwd-crypto/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 755a28f341..53126cedbb 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2724,7 +2724,7 @@ main(int argc, char **argv) /* Enable Ethernet ports */ enabled_portcount = initialize_ports(&options); if (enabled_portcount < 1) - rte_exit(EXIT_FAILURE, "Failed to initial Ethernet ports\n"); + rte_exit(EXIT_FAILURE, "Failed to initialize Ethernet ports\n"); /* Initialize the port/queue configuration of each logical core */ RTE_ETH_FOREACH_DEV(portid) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.683841441 +0000 +++ 0034-examples-l2fwd-crypto-fix-typo-in-error-message.patch 2022-11-05 17:11:08.762944531 +0000 @@ -1 +1 @@ -From 26fbb735e3e6e1bb2e5e6b403dd179640c739467 Mon Sep 17 00:00:00 2001 +From bf5c9fe05129cea104aabefef8cf8a530c44a74e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 26fbb735e3e6e1bb2e5e6b403dd179640c739467 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index 708b3f48b0..b13e5c526e 100644 +index 755a28f341..53126cedbb 100644 @@ -20 +21 @@ -@@ -2781,7 +2781,7 @@ main(int argc, char **argv) +@@ -2724,7 +2724,7 @@ main(int argc, char **argv) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/crypto: fix wireless auth digest segment' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (32 preceding siblings ...) 2022-11-05 17:11 ` patch 'examples/l2fwd-crypto: fix typo in error message' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix memory leak' " luca.boccassi ` (11 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Ciara Power; +Cc: Fan Zhang, Pablo de Lara, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Thanks. Luca Boccassi --- From ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Mon Sep 17 00:00:00 2001 From: Ciara Power <ciara.power@intel.com> Date: Fri, 7 Oct 2022 13:46:50 +0000 Subject: [PATCH] test/crypto: fix wireless auth digest segment [ upstream commit dc3f6c5347b2b64899694c2f94a6af53c95d2b4d ] The segment size for some tests was too small to hold the auth digest. This caused issues when using op->sym->auth.digest.data for comparisons in AESNI_MB PMD after a subsequent patch enables SGL. For example, if segment size is 2, and digest size is 4, then 4 bytes are read from op->sym->auth.digest.data, which overflows into the memory after the segment, rather than using the second segment that contains the remaining half of the digest. Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP") Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> --- app/test/test_cryptodev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9dfea535a0..bba040078b 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2636,6 +2636,16 @@ create_wireless_algo_auth_cipher_operation( remaining_off -= rte_pktmbuf_data_len(sgl_buf); sgl_buf = sgl_buf->next; } + + /* The last segment should be large enough to hold full digest */ + if (sgl_buf->data_len < auth_tag_len) { + rte_pktmbuf_free(sgl_buf->next); + sgl_buf->next = NULL; + TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(sgl_buf, + auth_tag_len - sgl_buf->data_len), + "No room to append auth tag"); + } + sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(sgl_buf, uint8_t *, remaining_off); sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(sgl_buf, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.774426054 +0000 +++ 0035-test-crypto-fix-wireless-auth-digest-segment.patch 2022-11-05 17:11:08.782944960 +0000 @@ -1 +1 @@ -From dc3f6c5347b2b64899694c2f94a6af53c95d2b4d Mon Sep 17 00:00:00 2001 +From ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit dc3f6c5347b2b64899694c2f94a6af53c95d2b4d ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index c6d47a035e..203b8b61fa 100644 +index 9dfea535a0..bba040078b 100644 @@ -29 +30 @@ -@@ -2990,6 +2990,16 @@ create_wireless_algo_auth_cipher_operation( +@@ -2636,6 +2636,16 @@ create_wireless_algo_auth_cipher_operation( ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix memory leak' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (33 preceding siblings ...) 2022-11-05 17:11 ` patch 'test/crypto: fix wireless auth digest segment' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: add LDPC encoder padding function' " luca.boccassi ` (10 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/77b4e2c0daa47da438ebc2ca5ad83c5ef62f964f Thanks. Luca Boccassi --- From 77b4e2c0daa47da438ebc2ca5ad83c5ef62f964f Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:36 -0700 Subject: [PATCH] baseband/acc100: fix memory leak [ upstream commit 36341139e48bdefbafcd6e550b9342af096f8be4 ] Moved check for undefined device before allocating queue data structure. Coverity issue: 375803, 375813, 375819, 375827, 375831 Fixes: 060e7672930 ("baseband/acc100: add queue configuration") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 453343cfb6..5dca9e01d8 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -824,6 +824,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, struct acc100_queue *q; int16_t q_idx; + if (d == NULL) { + rte_bbdev_log(ERR, "Undefined device"); + return -ENODEV; + } /* Allocate the queue data structure. */ q = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q), RTE_CACHE_LINE_SIZE, conf->socket); @@ -831,10 +835,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, rte_bbdev_log(ERR, "Failed to allocate queue memory"); return -ENOMEM; } - if (d == NULL) { - rte_bbdev_log(ERR, "Undefined device"); - return -ENODEV; - } q->d = d; q->ring_addr = RTE_PTR_ADD(d->sw_rings, (d->sw_ring_size * queue_id)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.874722062 +0000 +++ 0036-baseband-acc100-fix-memory-leak.patch 2022-11-05 17:11:08.790945132 +0000 @@ -1 +1 @@ -From 36341139e48bdefbafcd6e550b9342af096f8be4 Mon Sep 17 00:00:00 2001 +From 77b4e2c0daa47da438ebc2ca5ad83c5ef62f964f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 36341139e48bdefbafcd6e550b9342af096f8be4 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 8 ++++---- + drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++---- @@ -18,6 +19,6 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 7fec2283eb..7500ef6eb5 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -663,6 +663,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, - struct acc_queue *q; +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 453343cfb6..5dca9e01d8 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -824,6 +824,10 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, + struct acc100_queue *q; @@ -33 +34 @@ -@@ -670,10 +674,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, +@@ -831,10 +835,6 @@ acc100_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: add LDPC encoder padding function' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (34 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix memory leak' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: check turbo dec/enc input' " luca.boccassi ` (9 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a68bdd7eda31aee34ea52b45a94fd32d4699bdb9 Thanks. Luca Boccassi --- From a68bdd7eda31aee34ea52b45a94fd32d4699bdb9 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:37 -0700 Subject: [PATCH] baseband/acc100: add LDPC encoder padding function [ upstream commit 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 ] LDPC Encoder input may need to be padded to avoid small beat for ACC100. Padding 5GDL input buffer length (BLEN) to avoid case (BLEN % 64) <= 8. Adding protection for corner case to avoid for 5GDL occurrence of last beat within the ACC100 fabric with <= 8B which might trigger a fabric corner case hang issue. Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 5dca9e01d8..f9e45a61e7 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1618,12 +1618,25 @@ acc100_dma_desc_te_fill(struct rte_bbdev_enc_op *op, return 0; } +/* May need to pad LDPC Encoder input to avoid small beat for ACC100. */ +static inline uint16_t +pad_le_in(uint16_t blen, struct acc100_queue *q __rte_unused) +{ + uint16_t last_beat; + + last_beat = blen % 64; + if ((last_beat > 0) && (last_beat <= 8)) + blen += 8; + + return blen; +} + static inline int acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, struct acc100_dma_req_desc *desc, struct rte_mbuf **input, struct rte_mbuf *output, uint32_t *in_offset, uint32_t *out_offset, uint32_t *out_length, - uint32_t *mbuf_total_left, uint32_t *seg_total_left) + uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc100_queue *q) { int next_triplet = 1; /* FCW already done */ uint16_t K, in_length_in_bits, in_length_in_bytes; @@ -1647,8 +1660,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, } next_triplet = acc100_dma_fill_blk_type_in(desc, input, in_offset, - in_length_in_bytes, - seg_total_left, next_triplet); + pad_le_in(in_length_in_bytes, q), seg_total_left, next_triplet); if (unlikely(next_triplet < 0)) { rte_bbdev_log(ERR, "Mismatch between data to process and mbuf data length in bbdev_op: %p", @@ -2363,7 +2375,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops, acc100_header_init(&desc->req); desc->req.numCBs = num; - in_length_in_bytes = ops[0]->ldpc_enc.input.data->data_len; + in_length_in_bytes = pad_le_in(ops[0]->ldpc_enc.input.data->data_len, q); out_length = (enc->cb_params.e + 7) >> 3; desc->req.m2dlen = 1 + num; desc->req.d2mlen = num; @@ -2432,7 +2444,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op, ret = acc100_dma_desc_le_fill(op, &desc->req, &input, output, &in_offset, &out_offset, &out_length, &mbuf_total_left, - &seg_total_left); + &seg_total_left, q); if (unlikely(ret < 0)) return ret; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.953066330 +0000 +++ 0037-baseband-acc100-add-LDPC-encoder-padding-function.patch 2022-11-05 17:11:08.798945303 +0000 @@ -1 +1 @@ -From 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 Mon Sep 17 00:00:00 2001 +From a68bdd7eda31aee34ea52b45a94fd32d4699bdb9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6f3325bbfa556e8fe39df15f32424f40b2eb1d05 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18,2 +19,2 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 28 ++++++++++++++++++++------- - 1 file changed, 21 insertions(+), 7 deletions(-) + drivers/baseband/acc100/rte_acc100_pmd.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) @@ -21,22 +22,6 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 7500ef6eb5..577c107e9a 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -1017,14 +1017,13 @@ acc100_fcw_td_fill(const struct rte_bbdev_dec_op *op, struct acc_fcw_td *fcw) - RTE_BBDEV_TURBO_HALF_ITERATION_EVEN); - } - --#ifdef RTE_LIBRTE_BBDEV_DEBUG -- - static inline bool - is_acc100(struct acc_queue *q) - { - return (q->d->device_variant == ACC100_VARIANT); - } - -+#ifdef RTE_LIBRTE_BBDEV_DEBUG - static inline bool - validate_op_required(struct acc_queue *q) - { -@@ -1355,12 +1354,28 @@ acc100_dma_fill_blk_type_in(struct acc_dma_req_desc *desc, - return next_triplet; +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 5dca9e01d8..f9e45a61e7 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -1618,12 +1618,25 @@ acc100_dma_desc_te_fill(struct rte_bbdev_enc_op *op, + return 0; @@ -47 +32 @@ -+pad_le_in(uint16_t blen, struct acc_queue *q) ++pad_le_in(uint16_t blen, struct acc100_queue *q __rte_unused) @@ -51,3 +35,0 @@ -+ if (!is_acc100(q)) -+ return blen; -+ @@ -63 +45 @@ - struct acc_dma_req_desc *desc, struct rte_mbuf **input, + struct acc100_dma_req_desc *desc, struct rte_mbuf **input, @@ -67 +49 @@ -+ uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc_queue *q) ++ uint32_t *mbuf_total_left, uint32_t *seg_total_left, struct acc100_queue *q) @@ -71 +53 @@ -@@ -1384,8 +1399,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, +@@ -1647,8 +1660,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, @@ -81,2 +63,2 @@ -@@ -2035,7 +2049,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ops, - acc_header_init(&desc->req); +@@ -2363,7 +2375,7 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops, + acc100_header_init(&desc->req); @@ -90 +72 @@ -@@ -2102,7 +2116,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op *op, +@@ -2432,7 +2444,7 @@ enqueue_ldpc_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: check turbo dec/enc input' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (35 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: add LDPC encoder padding function' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: add null checks' " luca.boccassi ` (8 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/78a4ffd8a3b8ee5428f22febcd0c465705b3d267 Thanks. Luca Boccassi --- From 78a4ffd8a3b8ee5428f22febcd0c465705b3d267 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:38 -0700 Subject: [PATCH] baseband/acc100: check turbo dec/enc input [ upstream commit 1d43b46139bb7a2f17ed3a17d4f6708d062253d0 ] Add NULL check for the turbo decoder and encoder input length. Fixes: 3bfc5f60403 ("baseband/acc100: add debug function to validate input") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index f9e45a61e7..8c06f0bfc5 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -2092,6 +2092,11 @@ validate_enc_op(struct rte_bbdev_enc_op *op) return -1; } + if (unlikely(turbo_enc->input.length == 0)) { + rte_bbdev_log(ERR, "input length null"); + return -1; + } + if (turbo_enc->code_block_mode == 0) { tb = &turbo_enc->tb_params; if ((tb->k_neg < RTE_BBDEV_TURBO_MIN_CB_SIZE @@ -2111,11 +2116,12 @@ validate_enc_op(struct rte_bbdev_enc_op *op) RTE_BBDEV_TURBO_MAX_CB_SIZE); return -1; } - if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS - 1)) + if (unlikely(tb->c_neg > 0)) { rte_bbdev_log(ERR, - "c_neg (%u) is out of range 0 <= value <= %u", - tb->c_neg, - RTE_BBDEV_TURBO_MAX_CODE_BLOCKS - 1); + "c_neg (%u) expected to be null", + tb->c_neg); + return -1; + } if (tb->c < 1 || tb->c > RTE_BBDEV_TURBO_MAX_CODE_BLOCKS) { rte_bbdev_log(ERR, "c (%u) is out of range 1 <= value <= %u", @@ -2607,6 +2613,11 @@ validate_dec_op(struct rte_bbdev_dec_op *op) return -1; } + if (unlikely(turbo_dec->input.length == 0)) { + rte_bbdev_log(ERR, "input length null"); + return -1; + } + if (turbo_dec->code_block_mode == 0) { tb = &turbo_dec->tb_params; if ((tb->k_neg < RTE_BBDEV_TURBO_MIN_CB_SIZE @@ -2627,11 +2638,13 @@ validate_dec_op(struct rte_bbdev_dec_op *op) RTE_BBDEV_TURBO_MAX_CB_SIZE); return -1; } - if (tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS - 1)) + if (unlikely(tb->c_neg > (RTE_BBDEV_TURBO_MAX_CODE_BLOCKS - 1))) { rte_bbdev_log(ERR, "c_neg (%u) is out of range 0 <= value <= %u", tb->c_neg, RTE_BBDEV_TURBO_MAX_CODE_BLOCKS - 1); + return -1; + } if (tb->c < 1 || tb->c > RTE_BBDEV_TURBO_MAX_CODE_BLOCKS) { rte_bbdev_log(ERR, "c (%u) is out of range 1 <= value <= %u", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.040225135 +0000 +++ 0038-baseband-acc100-check-turbo-dec-enc-input.patch 2022-11-05 17:11:08.802945390 +0000 @@ -1 +1 @@ -From 1d43b46139bb7a2f17ed3a17d4f6708d062253d0 Mon Sep 17 00:00:00 2001 +From 78a4ffd8a3b8ee5428f22febcd0c465705b3d267 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1d43b46139bb7a2f17ed3a17d4f6708d062253d0 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 23 ++++++++++++++++++----- + drivers/baseband/acc100/rte_acc100_pmd.c | 23 ++++++++++++++++++----- @@ -17,5 +18,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 577c107e9a..eba70654e8 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -1764,6 +1764,11 @@ validate_enc_op(struct rte_bbdev_enc_op *op, struct acc_queue *q) +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index f9e45a61e7..8c06f0bfc5 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -2092,6 +2092,11 @@ validate_enc_op(struct rte_bbdev_enc_op *op) @@ -30 +31 @@ - if (turbo_enc->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) { + if (turbo_enc->code_block_mode == 0) { @@ -33 +34 @@ -@@ -1783,11 +1788,12 @@ validate_enc_op(struct rte_bbdev_enc_op *op, struct acc_queue *q) +@@ -2111,11 +2116,12 @@ validate_enc_op(struct rte_bbdev_enc_op *op) @@ -50 +51 @@ -@@ -2281,6 +2287,11 @@ validate_dec_op(struct rte_bbdev_dec_op *op, struct acc_queue *q) +@@ -2607,6 +2613,11 @@ validate_dec_op(struct rte_bbdev_dec_op *op) @@ -59 +60 @@ - if (turbo_dec->code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) { + if (turbo_dec->code_block_mode == 0) { @@ -62 +63 @@ -@@ -2301,11 +2312,13 @@ validate_dec_op(struct rte_bbdev_dec_op *op, struct acc_queue *q) +@@ -2627,11 +2638,13 @@ validate_dec_op(struct rte_bbdev_dec_op *op) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: add null checks' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (36 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: check turbo dec/enc input' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix ring/queue allocation' " luca.boccassi ` (7 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8f8c2aac1e75a7b6b995b19c875c5f0e242554bc Thanks. Luca Boccassi --- From 8f8c2aac1e75a7b6b995b19c875c5f0e242554bc Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:39 -0700 Subject: [PATCH] baseband/acc100: add null checks [ upstream commit 4a2f231ee139717f61d36a3df8aaab74644ca2b5 ] Add unlikely checks for NULL operation values. Fixes: f404dfe35cc ("baseband/acc100: support 4G processing") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 8c06f0bfc5..9bdf726f75 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -2508,6 +2508,10 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op, r = op->turbo_enc.tb_params.r; while (mbuf_total_left > 0 && r < c) { + if (unlikely(input == NULL)) { + rte_bbdev_log(ERR, "Not enough input segment"); + return -EINVAL; + } seg_total_left = rte_pktmbuf_data_len(input) - in_offset; /* Set up DMA descriptor */ desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs) @@ -3539,6 +3543,8 @@ acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data, break; enqueued_cbs += ret; } + if (unlikely(enqueued_cbs == 0)) + return 0; /* Nothing to enqueue */ acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats); @@ -4081,6 +4087,8 @@ acc100_dequeue_dec(struct rte_bbdev_queue_data *q_data, for (i = 0; i < dequeue_num; ++i) { op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask))->req.op_addr; + if (unlikely(op == NULL)) + break; if (op->turbo_dec.code_block_mode == 0) ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs, &aq_dequeued); @@ -4126,6 +4134,8 @@ acc100_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data, for (i = 0; i < dequeue_num; ++i) { op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) & q->sw_ring_wrap_mask))->req.op_addr; + if (unlikely(op == NULL)) + break; if (op->ldpc_dec.code_block_mode == 0) ret = dequeue_dec_one_op_tb(q, &ops[i], dequeued_cbs, &aq_dequeued); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.114178634 +0000 +++ 0039-baseband-acc100-add-null-checks.patch 2022-11-05 17:11:08.810945561 +0000 @@ -1 +1 @@ -From 4a2f231ee139717f61d36a3df8aaab74644ca2b5 Mon Sep 17 00:00:00 2001 +From 8f8c2aac1e75a7b6b995b19c875c5f0e242554bc Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4a2f231ee139717f61d36a3df8aaab74644ca2b5 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 10 ++++++++++ + drivers/baseband/acc100/rte_acc100_pmd.c | 10 ++++++++++ @@ -17,5 +18,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index eba70654e8..e8ec70d954 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -2180,6 +2180,10 @@ enqueue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op, +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 8c06f0bfc5..9bdf726f75 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -2508,6 +2508,10 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op, @@ -31,2 +32,2 @@ - desc = acc_desc(q, total_enqueued_cbs); -@@ -3097,6 +3101,8 @@ acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data, + desc = q->ring_addr + ((q->sw_ring_head + total_enqueued_cbs) +@@ -3539,6 +3543,8 @@ acc100_enqueue_ldpc_dec_tb(struct rte_bbdev_queue_data *q_data, @@ -39,3 +40 @@ - acc_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats); - -@@ -3625,6 +3631,8 @@ acc100_dequeue_dec(struct rte_bbdev_queue_data *q_data, + acc100_dma_enqueue(q, enqueued_cbs, &q_data->queue_stats); @@ -42,0 +42 @@ +@@ -4081,6 +4087,8 @@ acc100_dequeue_dec(struct rte_bbdev_queue_data *q_data, @@ -44 +44,2 @@ - op = acc_op_tail(q, dequeued_cbs); + op = (q->ring_addr + ((q->sw_ring_tail + dequeued_cbs) + & q->sw_ring_wrap_mask))->req.op_addr; @@ -47 +48 @@ - if (op->turbo_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) + if (op->turbo_dec.code_block_mode == 0) @@ -50 +51 @@ -@@ -3670,6 +3678,8 @@ acc100_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data, +@@ -4126,6 +4134,8 @@ acc100_dequeue_ldpc_dec(struct rte_bbdev_queue_data *q_data, @@ -56 +57 @@ - if (op->ldpc_dec.code_block_mode == RTE_BBDEV_TRANSPORT_BLOCK) + if (op->ldpc_dec.code_block_mode == 0) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix ring/queue allocation' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (37 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: add null checks' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix input length for CRC24B' " luca.boccassi ` (6 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5503b5fe28410161287736714ebb3c38320dbc29 Thanks. Luca Boccassi --- From 5503b5fe28410161287736714ebb3c38320dbc29 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:41 -0700 Subject: [PATCH] baseband/acc100: fix ring/queue allocation [ upstream commit e23491fc2e0028535891af85fcbfedc9b23b1149 ] Allocate info ring, tail pointers and HARQ layout memory for a device only if it hasn't already been allocated. Fixes: 06531464151 ("baseband/acc100: support interrupt") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 9bdf726f75..881ce71d66 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -569,9 +569,9 @@ allocate_info_ring(struct rte_bbdev *dev) reg_addr = &vf_reg_addr; /* Allocate InfoRing */ d->info_ring = rte_zmalloc_socket("Info Ring", - ACC100_INFO_RING_NUM_ENTRIES * - sizeof(*d->info_ring), RTE_CACHE_LINE_SIZE, - dev->data->socket_id); + ACC100_INFO_RING_NUM_ENTRIES * + sizeof(*d->info_ring), RTE_CACHE_LINE_SIZE, + dev->data->socket_id); if (d->info_ring == NULL) { rte_bbdev_log(ERR, "Failed to allocate Info Ring for %s:%u", @@ -660,7 +660,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) acc100_reg_write(d, reg_addr->ring_size, value); /* Configure tail pointer for use when SDONE enabled */ - d->tail_ptrs = rte_zmalloc_socket( + if (d->tail_ptrs == NULL) + d->tail_ptrs = rte_zmalloc_socket( dev->device->driver->name, ACC100_NUM_QGRPS * ACC100_NUM_AQS * sizeof(uint32_t), RTE_CACHE_LINE_SIZE, socket_id); @@ -668,8 +669,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) rte_bbdev_log(ERR, "Failed to allocate tail ptr for %s:%u", dev->device->driver->name, dev->data->dev_id); - rte_free(d->sw_rings); - return -ENOMEM; + ret = -ENOMEM; + goto free_sw_rings; } d->tail_ptr_iova = rte_malloc_virt2iova(d->tail_ptrs); @@ -692,15 +693,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) /* Continue */ } - d->harq_layout = rte_zmalloc_socket("HARQ Layout", + if (d->harq_layout == NULL) + d->harq_layout = rte_zmalloc_socket("HARQ Layout", ACC100_HARQ_LAYOUT * sizeof(*d->harq_layout), RTE_CACHE_LINE_SIZE, dev->data->socket_id); if (d->harq_layout == NULL) { rte_bbdev_log(ERR, "Failed to allocate harq_layout for %s:%u", dev->device->driver->name, dev->data->dev_id); - rte_free(d->sw_rings); - return -ENOMEM; + ret = -ENOMEM; + goto free_tail_ptrs; } /* Mark as configured properly */ @@ -709,8 +711,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) rte_bbdev_log_debug( "ACC100 (%s) configured sw_rings = %p, sw_rings_iova = %#" PRIx64, dev->data->name, d->sw_rings, d->sw_rings_iova); - return 0; + +free_tail_ptrs: + rte_free(d->tail_ptrs); + d->tail_ptrs = NULL; +free_sw_rings: + rte_free(d->sw_rings_base); + d->sw_rings = NULL; + + return ret; } static int -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.210879247 +0000 +++ 0040-baseband-acc100-fix-ring-queue-allocation.patch 2022-11-05 17:11:08.818945733 +0000 @@ -1 +1 @@ -From e23491fc2e0028535891af85fcbfedc9b23b1149 Mon Sep 17 00:00:00 2001 +From 5503b5fe28410161287736714ebb3c38320dbc29 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e23491fc2e0028535891af85fcbfedc9b23b1149 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 30 ++++++++++++++++++--------- + drivers/baseband/acc100/rte_acc100_pmd.c | 30 ++++++++++++++++-------- @@ -18,5 +19,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 13a762cb80..b737374d71 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -408,9 +408,9 @@ allocate_info_ring(struct rte_bbdev *dev) +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 9bdf726f75..881ce71d66 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -569,9 +569,9 @@ allocate_info_ring(struct rte_bbdev *dev) @@ -26 +27 @@ -- ACC_INFO_RING_NUM_ENTRIES * +- ACC100_INFO_RING_NUM_ENTRIES * @@ -29 +30 @@ -+ ACC_INFO_RING_NUM_ENTRIES * ++ ACC100_INFO_RING_NUM_ENTRIES * @@ -35,2 +36,2 @@ -@@ -499,7 +499,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) - acc_reg_write(d, reg_addr->ring_size, value); +@@ -660,7 +660,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) + acc100_reg_write(d, reg_addr->ring_size, value); @@ -45 +46 @@ -@@ -507,8 +508,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) +@@ -668,8 +669,8 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) @@ -56 +57 @@ -@@ -531,15 +532,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) +@@ -692,15 +693,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) @@ -63 +64 @@ - ACC_HARQ_LAYOUT * sizeof(*d->harq_layout), + ACC100_HARQ_LAYOUT * sizeof(*d->harq_layout), @@ -76 +77 @@ -@@ -548,8 +550,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) +@@ -709,8 +711,16 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix input length for CRC24B' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (38 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix ring/queue allocation' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix clearing PF IR outside handler' " luca.boccassi ` (5 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cb1f1a84e37cf8b9fd1d48ddc48a7bd75f05ad08 Thanks. Luca Boccassi --- From cb1f1a84e37cf8b9fd1d48ddc48a7bd75f05ad08 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:42 -0700 Subject: [PATCH] baseband/acc100: fix input length for CRC24B [ upstream commit ec1424fffaffbde1d5932745f5cd8afec51cb5ea ] Input length should be reduced only for CRC24B. Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 881ce71d66..a5bfb417de 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1656,8 +1656,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, K = (enc->basegraph == 1 ? 22 : 10) * enc->z_c; in_length_in_bits = K - enc->n_filler; - if ((enc->op_flags & RTE_BBDEV_LDPC_CRC_24A_ATTACH) || - (enc->op_flags & RTE_BBDEV_LDPC_CRC_24B_ATTACH)) + if (enc->op_flags & RTE_BBDEV_LDPC_CRC_24B_ATTACH) in_length_in_bits -= 24; in_length_in_bytes = in_length_in_bits >> 3; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.305027824 +0000 +++ 0041-baseband-acc100-fix-input-length-for-CRC24B.patch 2022-11-05 17:11:08.826945905 +0000 @@ -1 +1 @@ -From ec1424fffaffbde1d5932745f5cd8afec51cb5ea Mon Sep 17 00:00:00 2001 +From cb1f1a84e37cf8b9fd1d48ddc48a7bd75f05ad08 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ec1424fffaffbde1d5932745f5cd8afec51cb5ea ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 3 +-- + drivers/baseband/acc100/rte_acc100_pmd.c | 3 +-- @@ -17,5 +18,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index b737374d71..7ec63dc470 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -1444,8 +1444,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 881ce71d66..a5bfb417de 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -1656,8 +1656,7 @@ acc100_dma_desc_le_fill(struct rte_bbdev_enc_op *op, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix clearing PF IR outside handler' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (39 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix input length for CRC24B' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix device minimum alignment' " luca.boccassi ` (4 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cbcb14c99c4a4774ccd98bcd2c1072ddc99b15dd Thanks. Luca Boccassi --- From cbcb14c99c4a4774ccd98bcd2c1072ddc99b15dd Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:43 -0700 Subject: [PATCH] baseband/acc100: fix clearing PF IR outside handler [ upstream commit 935745f56b9bf37ebece351170b47d3e6c215bc9 ] Clearing of PF info ring outside of handler may cause interrupt to be missed. A condition in the ACC100 PMD implementation may cause an interrupt functional handler call to be missed due to related bit being cleared when checking PF info ring status. Fixes: 06531464151 ("baseband/acc100: support interrupt") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index a5bfb417de..c0c75bdc25 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -423,11 +423,12 @@ acc100_check_ir(struct acc100_device *acc100_dev) while (ring_data->valid) { if ((ring_data->int_nb < ACC100_PF_INT_DMA_DL_DESC_IRQ) || ( ring_data->int_nb > - ACC100_PF_INT_DMA_DL5G_DESC_IRQ)) + ACC100_PF_INT_DMA_DL5G_DESC_IRQ)) { rte_bbdev_log(WARNING, "InfoRing: ITR:%d Info:0x%x", ring_data->int_nb, ring_data->detailed_info); - /* Initialize Info Ring entry and move forward */ - ring_data->val = 0; + /* Initialize Info Ring entry and move forward */ + ring_data->val = 0; + } info_ring_head++; ring_data = acc100_dev->info_ring + (info_ring_head & ACC100_INFO_RING_MASK); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.397892286 +0000 +++ 0042-baseband-acc100-fix-clearing-PF-IR-outside-handler.patch 2022-11-05 17:11:08.830945991 +0000 @@ -1 +1 @@ -From 935745f56b9bf37ebece351170b47d3e6c215bc9 Mon Sep 17 00:00:00 2001 +From cbcb14c99c4a4774ccd98bcd2c1072ddc99b15dd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 935745f56b9bf37ebece351170b47d3e6c215bc9 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 7 ++++--- + drivers/baseband/acc100/rte_acc100_pmd.c | 7 ++++--- @@ -21,5 +22,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 7ec63dc470..3bb93a1e07 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -262,11 +262,12 @@ acc100_check_ir(struct acc_device *acc100_dev) +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index a5bfb417de..c0c75bdc25 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -423,11 +423,12 @@ acc100_check_ir(struct acc100_device *acc100_dev) @@ -40 +41 @@ - (info_ring_head & ACC_INFO_RING_MASK); + (info_ring_head & ACC100_INFO_RING_MASK); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix device minimum alignment' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (40 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix clearing PF IR outside handler' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix close cleanup' " luca.boccassi ` (3 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2c3b7610a3ee7e6bf8bbb06a847f681f10799732 Thanks. Luca Boccassi --- From 2c3b7610a3ee7e6bf8bbb06a847f681f10799732 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:44 -0700 Subject: [PATCH] baseband/acc100: fix device minimum alignment [ upstream commit badb3b79b970831ddc5c78997fb801bcaa08fe1b ] Historical mistakes, there should be no 64B alignment requirement for the buffer being processed. Any 1B alignment is sufficient. Fixes: 9200ffa5cd5 ("baseband/acc100: add info get function") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index c0c75bdc25..d4bf1a4e92 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1092,7 +1092,7 @@ acc100_dev_info_get(struct rte_bbdev *dev, d->acc100_conf.q_ul_4g.num_qgroups - 1; dev_info->default_queue_conf = default_queue_conf; dev_info->cpu_flag_reqs = NULL; - dev_info->min_alignment = 64; + dev_info->min_alignment = 1; dev_info->capabilities = bbdev_capabilities; #ifdef ACC100_EXT_MEM dev_info->harq_buffer_size = d->ddr_size; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.490826587 +0000 +++ 0043-baseband-acc100-fix-device-minimum-alignment.patch 2022-11-05 17:11:08.838946162 +0000 @@ -1 +1 @@ -From badb3b79b970831ddc5c78997fb801bcaa08fe1b Mon Sep 17 00:00:00 2001 +From 2c3b7610a3ee7e6bf8bbb06a847f681f10799732 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit badb3b79b970831ddc5c78997fb801bcaa08fe1b ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 2 +- + drivers/baseband/acc100/rte_acc100_pmd.c | 2 +- @@ -18,6 +19,6 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 3bb93a1e07..600a10b9fb 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -938,7 +938,7 @@ acc100_dev_info_get(struct rte_bbdev *dev, - d->acc_conf.q_ul_4g.num_qgroups - 1; +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index c0c75bdc25..d4bf1a4e92 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -1092,7 +1092,7 @@ acc100_dev_info_get(struct rte_bbdev *dev, + d->acc100_conf.q_ul_4g.num_qgroups - 1; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix close cleanup' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (41 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix device minimum alignment' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'test/crypto: fix PDCP vectors' " luca.boccassi ` (2 subsequent siblings) 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/e9703e47a796aa10a239d4555c56d27f8db9bb09 Thanks. Luca Boccassi --- From e9703e47a796aa10a239d4555c56d27f8db9bb09 Mon Sep 17 00:00:00 2001 From: Hernan Vargas <hernan.vargas@intel.com> Date: Thu, 20 Oct 2022 22:20:46 -0700 Subject: [PATCH] baseband/acc100: fix close cleanup [ upstream commit ba2262fe16cade81a18b353d580ec4229e1020a6 ] Set local pointer to NULL after rte_free. This needs to be set explicitly since logic may check for null pointers. Fixes: 060e7672930 ("baseband/acc100: add queue configuration") Signed-off-by: Hernan Vargas <hernan.vargas@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index d4bf1a4e92..6d02fd12a8 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -779,6 +779,9 @@ acc100_dev_close(struct rte_bbdev *dev) rte_free(d->info_ring); rte_free(d->sw_rings_base); d->sw_rings_base = NULL; + d->tail_ptrs = NULL; + d->info_ring = NULL; + d->harq_layout = NULL; } /* Ensure all in flight HW transactions are completed */ usleep(ACC100_LONG_WAIT); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.583209468 +0000 +++ 0044-baseband-acc100-fix-close-cleanup.patch 2022-11-05 17:11:08.842946248 +0000 @@ -1 +1 @@ -From ba2262fe16cade81a18b353d580ec4229e1020a6 Mon Sep 17 00:00:00 2001 +From e9703e47a796aa10a239d4555c56d27f8db9bb09 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ba2262fe16cade81a18b353d580ec4229e1020a6 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 3 +++ + drivers/baseband/acc100/rte_acc100_pmd.c | 3 +++ @@ -18,5 +19,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index a711862892..ad815ed76a 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -618,6 +618,9 @@ acc100_dev_close(struct rte_bbdev *dev) +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index d4bf1a4e92..6d02fd12a8 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -779,6 +779,9 @@ acc100_dev_close(struct rte_bbdev *dev) @@ -31 +32 @@ - usleep(ACC_LONG_WAIT); + usleep(ACC100_LONG_WAIT); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/crypto: fix PDCP vectors' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (42 preceding siblings ...) 2022-11-05 17:11 ` patch 'baseband/acc100: fix close cleanup' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'examples/ipsec-secgw: fix Tx checksum offload flag' " luca.boccassi 2022-11-05 17:11 ` patch 'crypto/qat: fix null hash algorithm digest size' " luca.boccassi 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Anoob Joseph; +Cc: Akhil Goyal, Gagandeep Singh, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2807c9f4f9ce7d010a66e9ee5495a465d66a91df Thanks. Luca Boccassi --- From 2807c9f4f9ce7d010a66e9ee5495a465d66a91df Mon Sep 17 00:00:00 2001 From: Anoob Joseph <anoobj@marvell.com> Date: Thu, 13 Oct 2022 09:29:36 +0530 Subject: [PATCH] test/crypto: fix PDCP vectors [ upstream commit 8cbe74f19166a110fda59b8d48c85e7b33ab0a4f ] The existing PDCP vectors have a deviation from the PDCP header specification. The reserved fields are set to 0 in the PDCP headers and D/C bits are updated as per the use case. The MAC-I for the corresponding vectors are also updated. Fixes: d883e6e7131b ("test/crypto: add PDCP C-Plane encap cases") Fixes: cca7d1f78524 ("test/crypto: add PDCP U-Plane encap with integrity cases") Signed-off-by: Anoob Joseph <anoobj@marvell.com> Acked-by: Akhil Goyal <gakhil@marvell.com> Tested-by: Gagandeep Singh <g.singh@nxp.com> --- ...est_cryptodev_security_pdcp_test_vectors.h | 280 +++++++++--------- 1 file changed, 140 insertions(+), 140 deletions(-) diff --git a/app/test/test_cryptodev_security_pdcp_test_vectors.h b/app/test/test_cryptodev_security_pdcp_test_vectors.h index 703076479d..3e8a8a243e 100644 --- a/app/test/test_cryptodev_security_pdcp_test_vectors.h +++ b/app/test/test_cryptodev_security_pdcp_test_vectors.h @@ -4145,7 +4145,7 @@ static uint8_t *pdcp_test_data_in[] = { /*************** 12-bit C-plane ****************/ /* Control Plane w/NULL enc. + NULL int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4159,7 +4159,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/NULL enc. + SNOW f9 int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4173,7 +4173,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/NULL enc. + AES CMAC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4187,7 +4187,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/NULL enc. + ZUC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4202,7 +4202,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/SNOW f8 enc. + NULL int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4216,7 +4216,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/SNOW f8 enc. + SNOW f9 int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4230,7 +4230,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/SNOW f8 enc. + AES CMAC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4244,7 +4244,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/SNOW f8 enc. + ZUC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4259,7 +4259,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/AES CTR enc. + NULL int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4273,7 +4273,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/AES CTR enc. + SNOW f9 int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4287,7 +4287,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/AES CTR enc. + AES CMAC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4301,7 +4301,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/AES CTR enc. + ZUC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4316,7 +4316,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/ZUC enc. + NULL int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4330,7 +4330,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/ZUC enc. + SNOW f9 int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4344,7 +4344,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/ZUC enc. + AES CMAC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4358,7 +4358,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/ZUC enc. + ZUC int. UL */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4391,7 +4391,7 @@ static uint8_t *pdcp_test_data_in[] = { (uint8_t[]){0x8b, 0x26, 0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4, 0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8}, /* User Plane w/NULL enc. UL for 18-bit SN*/ - (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, + (uint8_t[]){0x80, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, @@ -4425,7 +4425,7 @@ static uint8_t *pdcp_test_data_in[] = { (uint8_t[]){0x8b, 0x26, 0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4, 0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8}, /* User Plane w/SNOW enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4459,7 +4459,7 @@ static uint8_t *pdcp_test_data_in[] = { (uint8_t[]){0x8b, 0x26, 0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4, 0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8}, /* User Plane w/AES enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4493,7 +4493,7 @@ static uint8_t *pdcp_test_data_in[] = { (uint8_t[]){0x8b, 0x26, 0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4, 0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8}, /* User Plane w/ZUC enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4511,7 +4511,7 @@ static uint8_t *pdcp_test_data_in[] = { /*************** u-plane with integrity for 12-bit SN *****/ /* User Plane w/NULL enc. + NULL int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4525,7 +4525,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/NULL enc. + SNOW f9 int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4539,7 +4539,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/NULL enc. + AES CMAC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4553,7 +4553,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/NULL enc. + ZUC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4568,7 +4568,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/SNOW f8 enc. + NULL int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4582,7 +4582,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4596,7 +4596,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/SNOW f8 enc. + AES CMAC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4610,7 +4610,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/SNOW f8 enc. + ZUC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4625,7 +4625,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/AES CTR enc. + NULL int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4639,7 +4639,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/AES CTR enc. + SNOW f9 int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4653,7 +4653,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/AES CTR enc. + AES CMAC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4667,7 +4667,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/AES CTR enc. + ZUC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4682,7 +4682,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/ZUC enc. + NULL int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4696,7 +4696,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/ZUC enc. + SNOW f9 int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4710,7 +4710,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/ZUC enc. + AES CMAC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4724,7 +4724,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/ZUC enc. + ZUC int. UL for 12-bit SN*/ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, @@ -4740,7 +4740,7 @@ static uint8_t *pdcp_test_data_in[] = { /*************** u-plane with integrity for 18-bit SN *****/ /* User Plane w/NULL enc. + NULL int. UL for 18-bit SN*/ - (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, + (uint8_t[]){0x80, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, @@ -4756,7 +4756,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/NULL enc. + SNOW f9 int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4772,7 +4772,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/NULL enc. + AES CMAC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4788,7 +4788,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/NULL enc. + ZUC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4804,7 +4804,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/SNOW f8 enc. + NULL int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4820,7 +4820,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4836,7 +4836,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/SNOW f8 enc. + AES CMAC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4852,7 +4852,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/SNOW f8 enc. + ZUC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4868,7 +4868,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/AES CTR enc. + NULL int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4884,7 +4884,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/AES CTR enc. + SNOW f9 int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4900,7 +4900,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/AES CTR enc. + AES CMAC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4916,7 +4916,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/AES CTR enc. + ZUC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4932,7 +4932,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/ZUC enc. + NULL int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4948,7 +4948,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/ZUC enc. + SNOW f9 int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4964,7 +4964,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/ZUC enc. + AES CMAC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -4980,7 +4980,7 @@ static uint8_t *pdcp_test_data_in[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69}, /* User Plane w/ZUC enc. + ZUC int. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, @@ -5435,7 +5435,7 @@ static uint8_t *pdcp_test_data_out[] = { /************ C-plane 12-bit ****************************/ /* Control Plane w/NULL enc. + NULL int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, @@ -5451,13 +5451,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* Control Plane w/NULL enc. + SNOW f9 int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x74, 0xB8, 0x27, 0x96}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x33, 0x22, 0x02, 0x10}, /* Control Plane w/NULL enc. + SNOW f9 int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5467,13 +5467,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x97, 0x50, 0x3F, 0xF7}, /* Control Plane w/NULL enc. + AES CMAC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x3F, 0x71, 0x26, 0x2E}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x1B, 0xB0, 0x4A, 0xBF}, /* Control Plane w/NULL enc. + AES CMAC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5483,13 +5483,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xE8, 0xBB, 0xE9, 0x36}, /* Control Plane w/NULL enc. + ZUC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x00, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x54, 0xEF, 0x25, 0xC3}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x28, 0x41, 0xAB, 0x16}, /* Control Plane w/NULL enc. + ZUC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5500,7 +5500,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x76, 0xD0, 0x5B, 0x2C}, /* Control Plane w/SNOW f8 enc. + NULL int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x00, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, @@ -5516,13 +5516,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0xDC, 0x32, 0x96, 0x65}, /* Control Plane w/SNOW f8 enc. + SNOW f9 int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x00, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x66, 0xBF, 0x8B, 0x05}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x21, 0x25, 0xAE, 0x83}, /* Control Plane w/SNOW f8 enc. + SNOW f9 int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5532,13 +5532,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0x4B, 0x62, 0xA9, 0x92}, /* Control Plane w/SNOW f8 enc. + AES CMAC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x00, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x2D, 0x76, 0x8A, 0xBD}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x09, 0xB7, 0xE6, 0x2C}, /* Control Plane w/SNOW f8 enc. + AES CMAC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5548,13 +5548,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0x34, 0x89, 0x7F, 0x53}, /* Control Plane w/SNOW f8 enc. + ZUC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x00, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x46, 0xE8, 0x89, 0x50}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x3A, 0x46, 0x07, 0x85}, /* Control Plane w/SNOW f8 enc. + ZUC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5565,7 +5565,7 @@ static uint8_t *pdcp_test_data_out[] = { 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0xAA, 0xE2, 0xCD, 0x49}, /* Control Plane w/AES CTR enc. + NULL int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x00, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, @@ -5582,13 +5582,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x87, 0x7A, 0x32, 0x1B}, /* Control Plane w/AES CTR enc. + SNOW f9 int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x00, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xF2, 0x8B, 0x18, 0xAA}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xB5, 0x11, 0x3D, 0x2C}, /* Control Plane w/AES CTR enc. + SNOW f9 int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, @@ -5599,13 +5599,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x10, 0x2A, 0x0D, 0xEC}, /* Control Plane w/AES CTR enc. + AES CMAC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x00, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xB9, 0x42, 0x19, 0x12}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0x9D, 0x83, 0x75, 0x83}, /* Control Plane w/AES CTR enc. + AES CMAC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, 0x8D, 0x78, 0xB5, 0x1F, 0x51, 0x70, 0x18, 0x61, 0x92, 0x10, @@ -5615,13 +5615,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x6F, 0xC1, 0xDB, 0x2D}, /* Control Plane w/AES CTR enc. + ZUC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x00, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xD2, 0xDC, 0x1A, 0xFF}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xAE, 0x72, 0x94, 0x2A}, /* Control Plane w/AES CTR enc. + ZUC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, 0x8D, 0x78, 0xB5, 0x1F, 0x51, 0x70, 0x18, 0x61, 0x92, 0x10, @@ -5631,7 +5631,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0xF1, 0xAA, 0x69, 0x37}, /* Control Plane w/ZUC enc. + NULL int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x00, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, @@ -5647,13 +5647,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x90, 0xF5, 0xBD, 0x56}, /* Control Plane w/ZUC enc. + SNOW f9 int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x00, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x69, 0x75, 0x1D, 0x76}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x2E, 0xEF, 0x38, 0xF0}, /* Control Plane w/ZUC enc. + SNOW f9 int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -5663,13 +5663,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x07, 0xA5, 0x82, 0xA1}, /* Control Plane w/ZUC enc. + AES CMAC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x00, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x22, 0xBC, 0x1C, 0xCE}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x06, 0x7D, 0x70, 0x5F}, /* Control Plane w/ZUC enc. + AES CMAC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -5679,13 +5679,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x78, 0x4E, 0x54, 0x60}, /* Control Plane w/ZUC enc. + ZUC int. UL LONG SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x00, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x49, 0x22, 0x1F, 0x23}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x35, 0x8C, 0x91, 0xF6}, /* Control Plane w/ZUC enc. + ZUC int. DL LONG SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -5714,7 +5714,7 @@ static uint8_t *pdcp_test_data_out[] = { (uint8_t[]){0x8b, 0x26, 0xad, 0x9c, 0x44, 0x1f, 0x89, 0x0b, 0x38, 0xc4, 0x57, 0xa4, 0x9d, 0x42, 0x14, 0x07, 0xe8}, /* User Plane w/NULL enc. UL for 18-bit SN*/ - (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, + (uint8_t[]){0x80, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, @@ -5748,7 +5748,7 @@ static uint8_t *pdcp_test_data_out[] = { (uint8_t[]){0x8b, 0x26, 0x0b, 0x50, 0xf3, 0xff, 0x37, 0xe3, 0x6b, 0xaf, 0x08, 0xd8, 0xf6, 0x1f, 0xca, 0x6f, 0xbc}, /* User Plane w/SNOW enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, + (uint8_t[]){0x80, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, 0xCF, 0xBB, 0x8A, 0x2C, 0xB7, 0x57, 0xB6, 0x27, 0x89, 0x0D, 0x91, 0x03, 0x2C, 0x2B, 0x8D, 0x29, 0x4A, 0xBD, 0x8D, 0x48, 0xD2, 0x69, 0x37, 0xB1, 0xA1, 0x97, 0x12, 0xBD, 0x0A, 0x91, 0x4D, 0xEB, 0x76, @@ -5781,7 +5781,7 @@ static uint8_t *pdcp_test_data_out[] = { (uint8_t[]){0x8b, 0x26, 0xc7, 0xf2, 0x23, 0xb3, 0xbe, 0xc0, 0xdf, 0xc5, 0xed, 0x37, 0x35, 0x7c, 0x66, 0xa3, 0xf9}, /* User Plane w/AES enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, + (uint8_t[]){0x80, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, 0xF1, 0x90, 0xC2, 0x22, 0xD0, 0xD2, 0x3D, 0x44, 0x75, 0x7F, 0xC5, 0x0F, 0xAC, 0x7C, 0x18, 0x46, 0xA5, 0x3E, 0x2F, 0x0F, 0x26, 0x9E, 0x5A, 0x49, 0xF7, 0xCB, 0x70, 0x17, 0xBC, 0x01, 0x1D, 0xA3, 0x65, 0x0E, 0x4B, 0x53, @@ -5813,7 +5813,7 @@ static uint8_t *pdcp_test_data_out[] = { (uint8_t[]){0x8b, 0x26, 0xa3, 0x1a, 0x1e, 0x22, 0xf7, 0x17, 0x8a, 0xb5, 0x59, 0xd8, 0x2b, 0x13, 0xdd, 0x12, 0x4e}, /* User Plane w/ZUC enc. UL for 18-bit SN*/ - (uint8_t[]){0x0C, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, + (uint8_t[]){0x80, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, 0x74, 0xC2, 0xD7, 0xFF, 0x74, 0x59, 0x3A, 0x69, 0xD1, 0x8B, 0x65, 0x98, 0xB9, 0x3C, 0xFB, 0x63, 0xB1, 0x9E, 0xB7, 0xCA, 0x04, 0x68, 0xB9, 0xAB, 0xA2, 0x5A, 0xAF, 0x15, 0x8E, 0x71, 0xED, 0xE4, 0xFA, 0x99, 0x79, 0xF9, @@ -5829,7 +5829,7 @@ static uint8_t *pdcp_test_data_out[] = { /************************* 12-bit u-plane with int ************/ /* User Plane w/NULL enc. + NULL int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, @@ -5845,13 +5845,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD}, /* User Plane w/NULL enc. + SNOW f9 int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x74, 0xB8, 0x27, 0x96}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x6A, 0x4D, 0xA1, 0xE0}, /* User Plane w/NULL enc. + SNOW f9 int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5861,13 +5861,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x97, 0x50, 0x3F, 0xF7}, /* User Plane w/NULL enc. + AES CMAC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x3F, 0x71, 0x26, 0x2E}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xB4, 0x36, 0x24, 0x75}, /* User Plane w/NULL enc. + AES CMAC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5877,13 +5877,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xE8, 0xBB, 0xE9, 0x36}, /* User Plane w/NULL enc. + ZUC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, + (uint8_t[]){0x80, 0x01, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, 0x47, 0x0E, 0x8F, 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, - 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x54, 0xEF, 0x25, 0xC3}, + 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x5B, 0x05, 0x40, 0x0B}, /* User Plane w/NULL enc. + ZUC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x86, 0xB8, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, @@ -5894,7 +5894,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0x76, 0xD0, 0x5B, 0x2C}, /* User Plane w/SNOW f8 enc. + NULL int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x80, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, @@ -5910,13 +5910,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0xDC, 0x32, 0x96, 0x65}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x80, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x66, 0xBF, 0x8B, 0x05}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x78, 0x4A, 0x0D, 0x73}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5926,13 +5926,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0x4B, 0x62, 0xA9, 0x92}, /* User Plane w/SNOW f8 enc. + AES CMAC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x80, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x2D, 0x76, 0x8A, 0xBD}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0xA6, 0x31, 0x88, 0xE6}, /* User Plane w/SNOW f8 enc. + AES CMAC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5942,13 +5942,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0x34, 0x89, 0x7F, 0x53}, /* User Plane w/SNOW f8 enc. + ZUC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, + (uint8_t[]){0x80, 0x01, 0xD6, 0xCC, 0xB5, 0xCE, 0x7C, 0xF8, 0xBE, 0x68, 0x2B, 0xAB, 0xC7, 0x32, 0xDA, 0x49, 0xD0, 0xC7, 0x54, 0xCA, 0x18, 0xBB, 0x05, 0x6D, 0xC5, 0x5F, 0xD3, 0xA7, 0xE6, 0xD8, 0xE1, 0xDF, 0x7C, 0x4F, 0x3C, 0x8B, 0x86, 0xC6, 0x8E, 0x24, 0xF7, 0xBC, 0x45, 0x2A, 0x2E, 0xB4, 0xF5, 0xD0, 0x39, 0x5B, 0x70, 0xB4, 0x53, 0x90, 0x98, 0x8A, 0x7C, 0x87, 0x21, 0xED, - 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x46, 0xE8, 0x89, 0x50}, + 0x76, 0x83, 0x63, 0x39, 0x2C, 0xDB, 0x49, 0x02, 0xEC, 0x98}, /* User Plane w/SNOW f8 enc. + ZUC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0xC1, 0x3A, 0x28, 0xBC, 0xEB, 0xAC, 0x49, 0xB9, 0xA1, 0xFC, 0xD6, 0x83, 0xEC, 0xA2, 0x89, 0xE6, 0x8F, 0xCA, @@ -5958,7 +5958,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x0F, 0xD8, 0x38, 0xE6, 0x3F, 0xD4, 0x59, 0x7A, 0x9A, 0xB7, 0xF4, 0x52, 0xC6, 0x66, 0xC2, 0x73, 0xAA, 0xE2, 0xCD, 0x49}, /* User Plane w/AES CTR enc. + NULL int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x80, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, @@ -5975,13 +5975,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x87, 0x7A, 0x32, 0x1B}, /* User Plane w/AES CTR enc. + SNOW f9 int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x80, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xF2, 0x8B, 0x18, 0xAA}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xEC, 0x7E, 0x9E, 0xDC}, /* User Plane w/AES CTR enc. + SNOW f9 int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, @@ -5992,13 +5992,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x10, 0x2A, 0x0D, 0xEC}, /* User Plane w/AES CTR enc. + AES CMAC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x80, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xB9, 0x42, 0x19, 0x12}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0x32, 0x05, 0x1B, 0x49}, /* User Plane w/AES CTR enc. + AES CMAC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, 0x8D, 0x78, 0xB5, 0x1F, 0x51, 0x70, 0x18, 0x61, 0x92, 0x10, @@ -6008,13 +6008,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x7E, 0xF5, 0xBD, 0x60, 0xEB, 0x9E, 0xC2, 0xC9, 0x54, 0x65, 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0x6F, 0xC1, 0xDB, 0x2D}, /* User Plane w/AES CTR enc. + ZUC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, + (uint8_t[]){0x80, 0x01, 0x57, 0xB2, 0x7E, 0x21, 0xE7, 0xDD, 0x56, 0xCF, 0xE9, 0x97, 0x27, 0xE8, 0xA3, 0xDE, 0x4C, 0xF6, 0xD1, 0x10, 0x4A, 0x7D, 0xC0, 0xD0, 0xF7, 0x1B, 0x3E, 0x16, 0xF0, 0xA8, 0x4F, 0xBC, 0x17, 0x73, 0x9A, 0x69, 0x73, 0x6C, 0x83, 0xE5, 0x9D, 0x56, 0xBA, 0xF7, 0x08, 0x6D, 0xC5, 0x89, 0xFB, 0xAB, 0x99, 0xD1, 0x37, 0x42, 0x89, 0x8F, 0xE1, 0xAE, 0xA3, 0x22, - 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xD2, 0xDC, 0x1A, 0xFF}, + 0x60, 0x98, 0xFD, 0x79, 0x32, 0xDB, 0xDD, 0x36, 0x7F, 0x37}, /* User Plane w/AES CTR enc. + ZUC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x84, 0x3D, 0x5A, 0x2C, 0xBA, 0x02, 0xC1, 0x6C, 0x8D, 0x78, 0xB5, 0x1F, 0x51, 0x70, 0x18, 0x61, 0x92, 0x10, @@ -6025,7 +6025,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x7D, 0xAC, 0xB6, 0x47, 0xFF, 0x1C, 0xF1, 0xAA, 0x69, 0x37}, /* User Plane w/ZUC enc. + NULL int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x80, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, @@ -6041,13 +6041,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x90, 0xF5, 0xBD, 0x56}, /* User Plane w/ZUC enc. + SNOW f9 int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x80, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x69, 0x75, 0x1D, 0x76}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x77, 0x80, 0x9B, 0x00}, /* User Plane w/ZUC enc. + SNOW f9 int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -6057,13 +6057,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x07, 0xA5, 0x82, 0xA1}, /* User Plane w/ZUC enc. + AES CMAC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x80, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x22, 0xBC, 0x1C, 0xCE}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0xA9, 0xFB, 0x1E, 0x95}, /* User Plane w/ZUC enc. + AES CMAC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -6073,13 +6073,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x85, 0xAF, 0x0A, 0xFF, 0xAC, 0x6A, 0x00, 0x19, 0xC1, 0x51, 0x53, 0xDE, 0x78, 0x07, 0x6D, 0x10, 0x78, 0x4E, 0x54, 0x60}, /* User Plane w/ZUC enc. + ZUC int. UL for 12-bit SN */ - (uint8_t[]){0x50, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, + (uint8_t[]){0x80, 0x01, 0x47, 0x9B, 0x21, 0xD1, 0xB2, 0x99, 0x23, 0x56, 0xC5, 0xFF, 0xC2, 0xB7, 0x7D, 0x30, 0xBA, 0xFB, 0x43, 0xED, 0x79, 0xC9, 0x9D, 0x9D, 0x38, 0x35, 0xC6, 0x7B, 0xD0, 0xAA, 0x33, 0x08, 0x88, 0x72, 0x16, 0x1D, 0xF7, 0xA0, 0xD9, 0xEC, 0x73, 0x45, 0x51, 0x87, 0xFF, 0x64, 0xFB, 0x3C, 0xA6, 0xB5, 0xD0, 0x1C, 0xD6, 0x90, 0x3D, 0x40, 0x54, 0x22, 0x2F, 0x6C, - 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x49, 0x22, 0x1F, 0x23}, + 0xE4, 0xB1, 0x71, 0x15, 0x78, 0x54, 0x46, 0xC8, 0x7A, 0xEB}, /* User Plane w/ZUC enc. + ZUC int. DL for 12-bit SN */ (uint8_t[]){0xA0, 0x00, 0x3F, 0x01, 0xCE, 0xBD, 0x8A, 0x98, 0x7B, 0x26, 0xF1, 0x28, 0x74, 0xDC, 0x26, 0x2B, 0x02, 0xE8, 0x9C, 0xBC, @@ -6091,7 +6091,7 @@ static uint8_t *pdcp_test_data_out[] = { /************************* 18-bit u-plane with int ************/ /* User Plane w/NULL enc. + NULL int. UL for 18-bit SN */ - (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, + (uint8_t[]){0x80, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, 0x64, 0xD3, 0x5E, 0xAF, 0x3F, 0x57, 0xC2, 0xE2, 0x91, 0x91, 0xA3, 0x9C, 0xE6, 0x30, 0x69, 0x70, 0x33, 0x8A, 0x15, 0xD0, 0x36, @@ -6107,13 +6107,13 @@ static uint8_t *pdcp_test_data_out[] = { 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69, 0x00, 0x00, 0x00, 0x00}, /* User Plane w/NULL enc. + SNOW f9 int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, 0x31, 0xA2, 0x76, 0xBA, 0xFC, 0x5A, 0xDB, 0xAA, 0xA3, 0x0B, 0x6A, 0xD2, 0xEE, 0xD6, 0x93, 0xE4, 0x1B, 0x11, 0x4F, 0xC4, 0xD7, 0xDA, - 0x91, 0x7F, 0x71, 0x17, 0x69}, + 0x91, 0x7F, 0x58, 0x24, 0x17}, /* User Plane w/NULL enc. + SNOW f9 int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, @@ -6122,12 +6122,12 @@ static uint8_t *pdcp_test_data_out[] = { 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69, 0x84, 0x45, 0xA8, 0x88}, /* User Plane w/NULL enc. + AES CMAC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, 0x31, 0xA2, 0x76, 0xBA, 0xFC, 0x5A, 0xDB, 0xAA, 0xA3, 0x0B, 0x6A, 0xD2, 0xEE, 0xD6, 0x93, - 0xE4, 0x1B, 0x11, 0x4F, 0xC4, 0xD7, 0xDA, 0x91, 0x33, 0x9B, 0x38, 0xF7}, + 0xE4, 0x1B, 0x11, 0x4F, 0xC4, 0xD7, 0xDA, 0x91, 0x83, 0xB7, 0xF2, 0x0B}, /* User Plane w/NULL enc. + AES CMAC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, @@ -6136,12 +6136,12 @@ static uint8_t *pdcp_test_data_out[] = { 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69, 0xD9, 0x0B, 0x89, 0x7F}, /* User Plane w/NULL enc. + ZUC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, + (uint8_t[]){0x80, 0x00, 0x01, 0xB8, 0x33, 0x4F, 0x85, 0x8C, 0x2C, 0x65, 0x7D, 0x8F, 0x5D, 0x40, 0x57, 0x60, 0x52, 0x4F, 0xB9, 0xF1, 0x69, 0xE9, 0x68, 0x04, 0xFC, 0x7A, 0xBE, 0xD2, 0x5B, 0x4A, 0x21, 0x7F, 0x13, 0x52, 0x08, 0xBA, 0xBD, 0x69, 0x51, 0xC9, 0x63, 0xCF, 0x06, 0x62, 0x31, 0xA2, 0x76, 0xBA, 0xFC, 0x5A, 0xDB, 0xAA, 0xA3, 0x0B, 0x6A, 0xD2, 0xEE, 0xD6, 0x93, - 0xE4, 0x1B, 0x11, 0x4F, 0xC4, 0xD7, 0xDA, 0x91, 0xB5, 0xD9, 0x5D, 0xE0}, + 0xE4, 0x1B, 0x11, 0x4F, 0xC4, 0xD7, 0xDA, 0x91, 0xAB, 0x98, 0xC0, 0x1A}, /* User Plane w/NULL enc. + ZUC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0xF8, 0xDB, 0x2D, 0x3F, 0x23, 0x82, 0x53, 0xFD, 0x37, 0xDE, 0x88, 0x63, 0x08, 0x4F, 0xD3, 0x71, 0xFB, 0xEB, 0x35, 0xF3, @@ -6150,7 +6150,7 @@ static uint8_t *pdcp_test_data_out[] = { 0xEE, 0x2C, 0x96, 0x0C, 0xD7, 0x7D, 0x70, 0x1B, 0x01, 0x7F, 0x96, 0x46, 0x53, 0xB0, 0xA4, 0x7A, 0xF9, 0xDD, 0xCC, 0x69, 0xDA, 0xE9, 0x17, 0x96}, /* User Plane w/SNOW f8 enc. + NULL int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, + (uint8_t[]){0x80, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, 0xCF, 0xBB, 0x8A, 0x2C, 0xB7, 0x57, 0xB6, 0x27, 0x89, 0x0D, 0x91, 0x03, 0x2C, 0x2B, 0x8D, 0x29, 0x4A, 0xBD, 0x8D, 0x48, 0xD2, 0x69, 0x37, 0xB1, 0xA1, 0x97, 0x12, 0xBD, 0x0A, 0x91, 0x4D, 0xEB, 0x76, @@ -6165,12 +6165,12 @@ static uint8_t *pdcp_test_data_out[] = { 0xC4, 0xB0, 0xB8, 0x31, 0x50, 0x9E, 0x37, 0x15, 0x0E, 0x0D, 0x29, 0x9D, 0xB3, 0x78, 0xFB, 0x9D, 0x5C, 0x90, 0xF8, 0x80, 0x53, 0x93, 0xEF, 0x7C}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, + (uint8_t[]){0x80, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, 0xCF, 0xBB, 0x8A, 0x2C, 0xB7, 0x57, 0xB6, 0x27, 0x89, 0x0D, 0x91, 0x03, 0x2C, 0x2B, 0x8D, 0x29, 0x4A, 0xBD, 0x8D, 0x48, 0xD2, 0x69, 0x37, 0xB1, 0xA1, 0x97, 0x12, 0xBD, 0x0A, 0x91, 0x4D, 0xEB, 0x76, 0xC8, 0x96, 0x7A, 0x0A, 0x25, 0x08, 0xEB, 0x41, 0x30, 0x00, 0x33, 0xC7, 0xFF, 0x33, 0x4E, - 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0x2A, 0xAB, 0x0F, 0x24}, + 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0x2A, 0x82, 0x3C, 0x5A}, /* User Plane w/SNOW f8 enc. + SNOW f9 int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x22, 0x2D, 0x15, 0xBA, 0x95, 0xAC, 0x47, 0x5A, 0xE3, 0x90, 0x82, 0xEA, 0xC2, 0x93, 0x80, 0x23, 0xE9, 0xAC, 0xEA, 0x5D, @@ -6179,12 +6179,12 @@ static uint8_t *pdcp_test_data_out[] = { 0xC4, 0xB0, 0xB8, 0x31, 0x50, 0x9E, 0x37, 0x15, 0x0E, 0x0D, 0x29, 0x9D, 0xB3, 0x78, 0xFB, 0x9D, 0x5C, 0x90, 0xF8, 0x80, 0xD7, 0xD6, 0x47, 0xF4}, /* User Plane w/SNOW f8 enc. + AES CMAC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, + (uint8_t[]){0x80, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, 0xCF, 0xBB, 0x8A, 0x2C, 0xB7, 0x57, 0xB6, 0x27, 0x89, 0x0D, 0x91, 0x03, 0x2C, 0x2B, 0x8D, 0x29, 0x4A, 0xBD, 0x8D, 0x48, 0xD2, 0x69, 0x37, 0xB1, 0xA1, 0x97, 0x12, 0xBD, 0x0A, 0x91, 0x4D, 0xEB, 0x76, 0xC8, 0x96, 0x7A, 0x0A, 0x25, 0x08, 0xEB, 0x41, 0x30, 0x00, 0x33, 0xC7, 0xFF, 0x33, 0x4E, - 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0x66, 0x41, 0x20, 0xBA}, + 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0xD6, 0x6D, 0xEA, 0x46}, /* User Plane w/SNOW f8 enc. + AES CMAC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x22, 0x2D, 0x15, 0xBA, 0x95, 0xAC, 0x47, 0x5A, 0xE3, 0x90, 0x82, 0xEA, 0xC2, 0x93, 0x80, 0x23, 0xE9, 0xAC, 0xEA, 0x5D, @@ -6193,12 +6193,12 @@ static uint8_t *pdcp_test_data_out[] = { 0xC4, 0xB0, 0xB8, 0x31, 0x50, 0x9E, 0x37, 0x15, 0x0E, 0x0D, 0x29, 0x9D, 0xB3, 0x78, 0xFB, 0x9D, 0x5C, 0x90, 0xF8, 0x80, 0x8A, 0x98, 0x66, 0x03}, /* User Plane w/SNOW f8 enc. + ZUC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, + (uint8_t[]){0x80, 0x00, 0x01, 0x9A, 0xAF, 0x1D, 0x21, 0x2F, 0x48, 0xB2, 0x30, 0xCF, 0xBB, 0x8A, 0x2C, 0xB7, 0x57, 0xB6, 0x27, 0x89, 0x0D, 0x91, 0x03, 0x2C, 0x2B, 0x8D, 0x29, 0x4A, 0xBD, 0x8D, 0x48, 0xD2, 0x69, 0x37, 0xB1, 0xA1, 0x97, 0x12, 0xBD, 0x0A, 0x91, 0x4D, 0xEB, 0x76, 0xC8, 0x96, 0x7A, 0x0A, 0x25, 0x08, 0xEB, 0x41, 0x30, 0x00, 0x33, 0xC7, 0xFF, 0x33, 0x4E, - 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0xE0, 0x03, 0x45, 0xAD}, + 0xC1, 0xFE, 0x5C, 0x0F, 0x15, 0xE7, 0x9F, 0x31, 0xFE, 0x42, 0xD8, 0x57}, /* User Plane w/SNOW f8 enc. + ZUC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x22, 0x2D, 0x15, 0xBA, 0x95, 0xAC, 0x47, 0x5A, 0xE3, 0x90, 0x82, 0xEA, 0xC2, 0x93, 0x80, 0x23, 0xE9, 0xAC, 0xEA, 0x5D, @@ -6207,7 +6207,7 @@ static uint8_t *pdcp_test_data_out[] = { 0xC4, 0xB0, 0xB8, 0x31, 0x50, 0x9E, 0x37, 0x15, 0x0E, 0x0D, 0x29, 0x9D, 0xB3, 0x78, 0xFB, 0x9D, 0x5C, 0x90, 0xF8, 0x80, 0x89, 0x7A, 0xF8, 0xEA}, /* User Plane w/AES CTR enc. + NULL int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, + (uint8_t[]){0x80, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, 0xF1, 0x90, 0xC2, 0x22, 0xD0, 0xD2, 0x3D, 0x44, 0x75, 0x7F, 0xC5, 0x0F, 0xAC, 0x7C, 0x18, 0x46, 0xA5, 0x3E, 0x2F, 0x0F, 0x26, 0x9E, 0x5A, 0x49, 0xF7, 0xCB, 0x70, 0x17, 0xBC, 0x01, 0x1D, 0xA3, 0x65, 0x0E, 0x4B, 0x53, @@ -6221,12 +6221,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x39, 0x22, 0xB2, 0xF6, 0x5F, 0xBD, 0x58, 0xE3, 0xE0, 0xDB, 0xD5, 0x7F, 0xFB, 0x78, 0x95, 0xE1, 0x5E, 0x36, 0xF8, 0x52, 0x98, 0x15, 0x68, 0x35}, /* User Plane w/AES CTR enc. + SNOW f9 int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, + (uint8_t[]){0x80, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, 0xF1, 0x90, 0xC2, 0x22, 0xD0, 0xD2, 0x3D, 0x44, 0x75, 0x7F, 0xC5, 0x0F, 0xAC, 0x7C, 0x18, 0x46, 0xA5, 0x3E, 0x2F, 0x0F, 0x26, 0x9E, 0x5A, 0x49, 0xF7, 0xCB, 0x70, 0x17, 0xBC, 0x01, 0x1D, 0xA3, 0x65, 0x0E, 0x4B, 0x53, 0x14, 0x73, 0x76, 0xDE, 0x54, 0xA0, 0xF9, 0x4C, 0xC2, 0x8F, 0x02, 0x88, - 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0xBE, 0x17, 0x81, 0xA1}, + 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0xBE, 0x3E, 0xB2, 0xDF}, /* User Plane w/AES CTR enc. + SNOW f9 int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x01, 0x0D, 0x4B, 0x5E, 0xD3, 0xCE, 0x96, 0xE1, 0x9A, 0x9D, 0xB3, 0x01, 0xD6, 0x40, 0x50, 0x00, 0x6C, 0x63, 0xFD, 0x37, @@ -6235,12 +6235,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x39, 0x22, 0xB2, 0xF6, 0x5F, 0xBD, 0x58, 0xE3, 0xE0, 0xDB, 0xD5, 0x7F, 0xFB, 0x78, 0x95, 0xE1, 0x5E, 0x36, 0xF8, 0x52, 0x1C, 0x50, 0xC0, 0xBD}, /* User Plane w/AES CTR enc. + AES CMAC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, + (uint8_t[]){0x80, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, 0xF1, 0x90, 0xC2, 0x22, 0xD0, 0xD2, 0x3D, 0x44, 0x75, 0x7F, 0xC5, 0x0F, 0xAC, 0x7C, 0x18, 0x46, 0xA5, 0x3E, 0x2F, 0x0F, 0x26, 0x9E, 0x5A, 0x49, 0xF7, 0xCB, 0x70, 0x17, 0xBC, 0x01, 0x1D, 0xA3, 0x65, 0x0E, 0x4B, 0x53, 0x14, 0x73, 0x76, 0xDE, 0x54, 0xA0, 0xF9, 0x4C, 0xC2, 0x8F, 0x02, 0x88, - 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0xF2, 0xFD, 0xAE, 0x3F}, + 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0x42, 0xD1, 0x64, 0xC3}, /* User Plane w/AES CTR enc. + AES CMAC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x01, 0x0D, 0x4B, 0x5E, 0xD3, 0xCE, 0x96, 0xE1, 0x9A, 0x9D, 0xB3, 0x01, 0xD6, 0x40, 0x50, 0x00, 0x6C, 0x63, 0xFD, 0x37, @@ -6249,12 +6249,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x39, 0x22, 0xB2, 0xF6, 0x5F, 0xBD, 0x58, 0xE3, 0xE0, 0xDB, 0xD5, 0x7F, 0xFB, 0x78, 0x95, 0xE1, 0x5E, 0x36, 0xF8, 0x52, 0x41, 0x1E, 0xE1, 0x4A}, /* User Plane w/AES CTR enc. + ZUC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, + (uint8_t[]){0x80, 0x00, 0x01, 0xBF, 0x31, 0x94, 0xCF, 0x6E, 0x99, 0x84, 0x08, 0xF1, 0x90, 0xC2, 0x22, 0xD0, 0xD2, 0x3D, 0x44, 0x75, 0x7F, 0xC5, 0x0F, 0xAC, 0x7C, 0x18, 0x46, 0xA5, 0x3E, 0x2F, 0x0F, 0x26, 0x9E, 0x5A, 0x49, 0xF7, 0xCB, 0x70, 0x17, 0xBC, 0x01, 0x1D, 0xA3, 0x65, 0x0E, 0x4B, 0x53, 0x14, 0x73, 0x76, 0xDE, 0x54, 0xA0, 0xF9, 0x4C, 0xC2, 0x8F, 0x02, 0x88, - 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0x74, 0xBF, 0xCB, 0x28}, + 0x36, 0xC7, 0xC4, 0x5A, 0x57, 0x7D, 0xA1, 0x0D, 0x6A, 0xFE, 0x56, 0xD2}, /* User Plane w/AES CTR enc. + ZUC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x01, 0x0D, 0x4B, 0x5E, 0xD3, 0xCE, 0x96, 0xE1, 0x9A, 0x9D, 0xB3, 0x01, 0xD6, 0x40, 0x50, 0x00, 0x6C, 0x63, 0xFD, 0x37, @@ -6263,7 +6263,7 @@ static uint8_t *pdcp_test_data_out[] = { 0x39, 0x22, 0xB2, 0xF6, 0x5F, 0xBD, 0x58, 0xE3, 0xE0, 0xDB, 0xD5, 0x7F, 0xFB, 0x78, 0x95, 0xE1, 0x5E, 0x36, 0xF8, 0x52, 0x42, 0xFC, 0x7F, 0xA3}, /* User Plane w/ZUC enc. + NULL int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, + (uint8_t[]){0x80, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, 0x74, 0xC2, 0xD7, 0xFF, 0x74, 0x59, 0x3A, 0x69, 0xD1, 0x8B, 0x65, 0x98, 0xB9, 0x3C, 0xFB, 0x63, 0xB1, 0x9E, 0xB7, 0xCA, 0x04, 0x68, 0xB9, 0xAB, 0xA2, 0x5A, 0xAF, 0x15, 0x8E, 0x71, 0xED, 0xE4, 0xFA, 0x99, 0x79, 0xF9, @@ -6277,12 +6277,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x7D, 0x2D, 0xE0, 0x3C, 0xE3, 0x81, 0xAA, 0xEA, 0xCC, 0xD7, 0xFC, 0x46, 0x07, 0x7C, 0x8E, 0x8E, 0x0E, 0x99, 0xB8, 0x31, 0x65, 0x17, 0xF6, 0xE3}, /* User Plane w/ZUC enc. + SNOW f9 int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, + (uint8_t[]){0x80, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, 0x74, 0xC2, 0xD7, 0xFF, 0x74, 0x59, 0x3A, 0x69, 0xD1, 0x8B, 0x65, 0x98, 0xB9, 0x3C, 0xFB, 0x63, 0xB1, 0x9E, 0xB7, 0xCA, 0x04, 0x68, 0xB9, 0xAB, 0xA2, 0x5A, 0xAF, 0x15, 0x8E, 0x71, 0xED, 0xE4, 0xFA, 0x99, 0x79, 0xF9, 0x51, 0x54, 0x82, 0x69, 0x4C, 0x45, 0x0B, 0xFA, 0x87, 0x4D, 0x97, 0x6E, - 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0x3C, 0x13, 0x64, 0xB1}, + 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0x3C, 0x3A, 0x57, 0xCF}, /* User Plane w/ZUC enc. + SNOW f9 int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x30, 0x62, 0x48, 0xC0, 0xB1, 0xED, 0x1F, 0x13, 0x8A, 0x7A, 0x62, 0x40, 0x12, 0x35, 0x54, 0x03, 0x93, 0xBD, 0xE5, 0x88, @@ -6291,12 +6291,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x7D, 0x2D, 0xE0, 0x3C, 0xE3, 0x81, 0xAA, 0xEA, 0xCC, 0xD7, 0xFC, 0x46, 0x07, 0x7C, 0x8E, 0x8E, 0x0E, 0x99, 0xB8, 0x31, 0xE1, 0x52, 0x5E, 0x6B}, /* User Plane w/ZUC enc. + AES CMAC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, + (uint8_t[]){0x80, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, 0x74, 0xC2, 0xD7, 0xFF, 0x74, 0x59, 0x3A, 0x69, 0xD1, 0x8B, 0x65, 0x98, 0xB9, 0x3C, 0xFB, 0x63, 0xB1, 0x9E, 0xB7, 0xCA, 0x04, 0x68, 0xB9, 0xAB, 0xA2, 0x5A, 0xAF, 0x15, 0x8E, 0x71, 0xED, 0xE4, 0xFA, 0x99, 0x79, 0xF9, 0x51, 0x54, 0x82, 0x69, 0x4C, 0x45, 0x0B, 0xFA, 0x87, 0x4D, 0x97, 0x6E, - 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0x70, 0xF9, 0x4B, 0x2F}, + 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0xC0, 0xD5, 0x81, 0xD3}, /* User Plane w/ZUC enc. + AES CMAC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x30, 0x62, 0x48, 0xC0, 0xB1, 0xED, 0x1F, 0x13, 0x8A, 0x7A, 0x62, 0x40, 0x12, 0x35, 0x54, 0x03, 0x93, 0xBD, 0xE5, 0x88, @@ -6305,12 +6305,12 @@ static uint8_t *pdcp_test_data_out[] = { 0x7D, 0x2D, 0xE0, 0x3C, 0xE3, 0x81, 0xAA, 0xEA, 0xCC, 0xD7, 0xFC, 0x46, 0x07, 0x7C, 0x8E, 0x8E, 0x0E, 0x99, 0xB8, 0x31, 0xBC, 0x1C, 0x7F, 0x9C}, /* User Plane w/ZUC enc. + ZUC int. UL for 18-bit SN */ - (uint8_t[]){0x0C, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, + (uint8_t[]){0x80, 0x00, 0x01, 0x32, 0xF9, 0x21, 0x1D, 0xBB, 0xF8, 0xE5, 0x7C, 0x74, 0xC2, 0xD7, 0xFF, 0x74, 0x59, 0x3A, 0x69, 0xD1, 0x8B, 0x65, 0x98, 0xB9, 0x3C, 0xFB, 0x63, 0xB1, 0x9E, 0xB7, 0xCA, 0x04, 0x68, 0xB9, 0xAB, 0xA2, 0x5A, 0xAF, 0x15, 0x8E, 0x71, 0xED, 0xE4, 0xFA, 0x99, 0x79, 0xF9, 0x51, 0x54, 0x82, 0x69, 0x4C, 0x45, 0x0B, 0xFA, 0x87, 0x4D, 0x97, 0x6E, - 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0xF6, 0xBB, 0x2E, 0x38}, + 0xB0, 0xC9, 0x06, 0x08, 0x6B, 0xFC, 0x4A, 0x85, 0xE8, 0xFA, 0xB3, 0xC2}, /* User Plane w/ZUC enc. + ZUC int. DL for 18-bit SN */ (uint8_t[]){0xF8, 0x00, 0x00, 0x30, 0x62, 0x48, 0xC0, 0xB1, 0xED, 0x1F, 0x13, 0x8A, 0x7A, 0x62, 0x40, 0x12, 0x35, 0x54, 0x03, 0x93, 0xBD, 0xE5, 0x88, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.672000592 +0000 +++ 0045-test-crypto-fix-PDCP-vectors.patch 2022-11-05 17:11:08.854946506 +0000 @@ -1 +1 @@ -From 8cbe74f19166a110fda59b8d48c85e7b33ab0a4f Mon Sep 17 00:00:00 2001 +From 2807c9f4f9ce7d010a66e9ee5495a465d66a91df Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8cbe74f19166a110fda59b8d48c85e7b33ab0a4f ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 585c10b423..6fdc4cd9e3 100644 +index 703076479d..3e8a8a243e 100644 @@ -26 +27 @@ -@@ -4264,7 +4264,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4145,7 +4145,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -35 +36 @@ -@@ -4278,7 +4278,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4159,7 +4159,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -44 +45 @@ -@@ -4292,7 +4292,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4173,7 +4173,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -53 +54 @@ -@@ -4306,7 +4306,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4187,7 +4187,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -62 +63 @@ -@@ -4321,7 +4321,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4202,7 +4202,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -71 +72 @@ -@@ -4335,7 +4335,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4216,7 +4216,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -80 +81 @@ -@@ -4349,7 +4349,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4230,7 +4230,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -89 +90 @@ -@@ -4363,7 +4363,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4244,7 +4244,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -98 +99 @@ -@@ -4378,7 +4378,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4259,7 +4259,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -107 +108 @@ -@@ -4392,7 +4392,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4273,7 +4273,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -116 +117 @@ -@@ -4406,7 +4406,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4287,7 +4287,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -125 +126 @@ -@@ -4420,7 +4420,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4301,7 +4301,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -134 +135 @@ -@@ -4435,7 +4435,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4316,7 +4316,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -143 +144 @@ -@@ -4449,7 +4449,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4330,7 +4330,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -152 +153 @@ -@@ -4463,7 +4463,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4344,7 +4344,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -161 +162 @@ -@@ -4477,7 +4477,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4358,7 +4358,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -170 +171 @@ -@@ -4510,7 +4510,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4391,7 +4391,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -179 +180 @@ -@@ -4544,7 +4544,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4425,7 +4425,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -188 +189 @@ -@@ -4578,7 +4578,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4459,7 +4459,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -197 +198 @@ -@@ -4612,7 +4612,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4493,7 +4493,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -206 +207 @@ -@@ -4630,7 +4630,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4511,7 +4511,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -215 +216 @@ -@@ -4644,7 +4644,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4525,7 +4525,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -224 +225 @@ -@@ -4658,7 +4658,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4539,7 +4539,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -233 +234 @@ -@@ -4672,7 +4672,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4553,7 +4553,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -242 +243 @@ -@@ -4687,7 +4687,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4568,7 +4568,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -251 +252 @@ -@@ -4701,7 +4701,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4582,7 +4582,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -260 +261 @@ -@@ -4715,7 +4715,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4596,7 +4596,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -269 +270 @@ -@@ -4729,7 +4729,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4610,7 +4610,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -278 +279 @@ -@@ -4744,7 +4744,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4625,7 +4625,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -287 +288 @@ -@@ -4758,7 +4758,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4639,7 +4639,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -296 +297 @@ -@@ -4772,7 +4772,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4653,7 +4653,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -305 +306 @@ -@@ -4786,7 +4786,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4667,7 +4667,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -314 +315 @@ -@@ -4801,7 +4801,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4682,7 +4682,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -323 +324 @@ -@@ -4815,7 +4815,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4696,7 +4696,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -332 +333 @@ -@@ -4829,7 +4829,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4710,7 +4710,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -341 +342 @@ -@@ -4843,7 +4843,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4724,7 +4724,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -350 +351 @@ -@@ -4859,7 +4859,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4740,7 +4740,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -359 +360 @@ -@@ -4875,7 +4875,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4756,7 +4756,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -368 +369 @@ -@@ -4891,7 +4891,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4772,7 +4772,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -377 +378 @@ -@@ -4907,7 +4907,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4788,7 +4788,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -386 +387 @@ -@@ -4923,7 +4923,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4804,7 +4804,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -395 +396 @@ -@@ -4939,7 +4939,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4820,7 +4820,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -404 +405 @@ -@@ -4955,7 +4955,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4836,7 +4836,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -413 +414 @@ -@@ -4971,7 +4971,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4852,7 +4852,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -422 +423 @@ -@@ -4987,7 +4987,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4868,7 +4868,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -431 +432 @@ -@@ -5003,7 +5003,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4884,7 +4884,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -440 +441 @@ -@@ -5019,7 +5019,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4900,7 +4900,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -449 +450 @@ -@@ -5035,7 +5035,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4916,7 +4916,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -458 +459 @@ -@@ -5051,7 +5051,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4932,7 +4932,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -467 +468 @@ -@@ -5067,7 +5067,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4948,7 +4948,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -476 +477 @@ -@@ -5083,7 +5083,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4964,7 +4964,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -485 +486 @@ -@@ -5099,7 +5099,7 @@ static uint8_t *pdcp_test_data_in[] = { +@@ -4980,7 +4980,7 @@ static uint8_t *pdcp_test_data_in[] = { @@ -494 +495 @@ -@@ -5554,7 +5554,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5435,7 +5435,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -503 +504 @@ -@@ -5570,13 +5570,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5451,13 +5451,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -519 +520 @@ -@@ -5586,13 +5586,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5467,13 +5467,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -535 +536 @@ -@@ -5602,13 +5602,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5483,13 +5483,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -551 +552 @@ -@@ -5619,7 +5619,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5500,7 +5500,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -560 +561 @@ -@@ -5635,13 +5635,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5516,13 +5516,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -576 +577 @@ -@@ -5651,13 +5651,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5532,13 +5532,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -592 +593 @@ -@@ -5667,13 +5667,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5548,13 +5548,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -608 +609 @@ -@@ -5684,7 +5684,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5565,7 +5565,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -617 +618 @@ -@@ -5701,13 +5701,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5582,13 +5582,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -633 +634 @@ -@@ -5718,13 +5718,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5599,13 +5599,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -649 +650 @@ -@@ -5734,13 +5734,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5615,13 +5615,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -665 +666 @@ -@@ -5750,7 +5750,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5631,7 +5631,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -674 +675 @@ -@@ -5766,13 +5766,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5647,13 +5647,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -690 +691 @@ -@@ -5782,13 +5782,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5663,13 +5663,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -706 +707 @@ -@@ -5798,13 +5798,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5679,13 +5679,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -722 +723 @@ -@@ -5833,7 +5833,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5714,7 +5714,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -731 +732 @@ -@@ -5867,7 +5867,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5748,7 +5748,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -740 +741 @@ -@@ -5900,7 +5900,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5781,7 +5781,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -749 +750 @@ -@@ -5932,7 +5932,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5813,7 +5813,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -758 +759 @@ -@@ -5948,7 +5948,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5829,7 +5829,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -767 +768 @@ -@@ -5964,13 +5964,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5845,13 +5845,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -783 +784 @@ -@@ -5980,13 +5980,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5861,13 +5861,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -799 +800 @@ -@@ -5996,13 +5996,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5877,13 +5877,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -815 +816 @@ -@@ -6013,7 +6013,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5894,7 +5894,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -824 +825 @@ -@@ -6029,13 +6029,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5910,13 +5910,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -840 +841 @@ -@@ -6045,13 +6045,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5926,13 +5926,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -856 +857 @@ -@@ -6061,13 +6061,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5942,13 +5942,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -872 +873 @@ -@@ -6077,7 +6077,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5958,7 +5958,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -881 +882 @@ -@@ -6094,13 +6094,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5975,13 +5975,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -897 +898 @@ -@@ -6111,13 +6111,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -5992,13 +5992,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -913 +914 @@ -@@ -6127,13 +6127,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6008,13 +6008,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -929 +930 @@ -@@ -6144,7 +6144,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6025,7 +6025,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -938 +939 @@ -@@ -6160,13 +6160,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6041,13 +6041,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -954 +955 @@ -@@ -6176,13 +6176,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6057,13 +6057,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -970 +971 @@ -@@ -6192,13 +6192,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6073,13 +6073,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -986 +987 @@ -@@ -6210,7 +6210,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6091,7 +6091,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -995 +996 @@ -@@ -6226,13 +6226,13 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6107,13 +6107,13 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1011 +1012 @@ -@@ -6241,12 +6241,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6122,12 +6122,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1026 +1027 @@ -@@ -6255,12 +6255,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6136,12 +6136,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1041 +1042 @@ -@@ -6269,7 +6269,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6150,7 +6150,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1050 +1051 @@ -@@ -6284,12 +6284,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6165,12 +6165,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1065 +1066 @@ -@@ -6298,12 +6298,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6179,12 +6179,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1080 +1081 @@ -@@ -6312,12 +6312,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6193,12 +6193,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1095 +1096 @@ -@@ -6326,7 +6326,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6207,7 +6207,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1104 +1105 @@ -@@ -6340,12 +6340,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6221,12 +6221,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1119 +1120 @@ -@@ -6354,12 +6354,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6235,12 +6235,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1134 +1135 @@ -@@ -6368,12 +6368,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6249,12 +6249,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1149 +1150 @@ -@@ -6382,7 +6382,7 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6263,7 +6263,7 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1158 +1159 @@ -@@ -6396,12 +6396,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6277,12 +6277,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1173 +1174 @@ -@@ -6410,12 +6410,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6291,12 +6291,12 @@ static uint8_t *pdcp_test_data_out[] = { @@ -1188 +1189 @@ -@@ -6424,12 +6424,12 @@ static uint8_t *pdcp_test_data_out[] = { +@@ -6305,12 +6305,12 @@ static uint8_t *pdcp_test_data_out[] = { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/ipsec-secgw: fix Tx checksum offload flag' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (43 preceding siblings ...) 2022-11-05 17:11 ` patch 'test/crypto: fix PDCP vectors' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-05 17:11 ` patch 'crypto/qat: fix null hash algorithm digest size' " luca.boccassi 45 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Radu Nicolau; +Cc: Vladimir Medvedkin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a7e43cfe91ded4449218ef274f04d4d77e9d5a00 Thanks. Luca Boccassi --- From a7e43cfe91ded4449218ef274f04d4d77e9d5a00 Mon Sep 17 00:00:00 2001 From: Radu Nicolau <radu.nicolau@intel.com> Date: Fri, 30 Sep 2022 13:40:55 +0100 Subject: [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag [ upstream commit c05f2e968867b9a86eaba528946bf421073f41a3 ] Fix a typo in computing port mask for Tx checksum offload capability. Fixes: 4edcee19fc20 ("examples/ipsec-secgw: use Tx checksum offload conditionally") Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> --- examples/ipsec-secgw/ipsec-secgw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index c2fb95f890..09fabbd6a3 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -2908,7 +2908,7 @@ main(int32_t argc, char **argv) port_init(portid, req_rx_offloads[portid], req_tx_offloads[portid]); if ((req_tx_offloads[portid] & DEV_TX_OFFLOAD_IPV4_CKSUM)) - ipv4_cksum_port_mask = 1U << portid; + ipv4_cksum_port_mask |= 1U << portid; } for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.772760379 +0000 +++ 0046-examples-ipsec-secgw-fix-Tx-checksum-offload-flag.patch 2022-11-05 17:11:08.858946591 +0000 @@ -1 +1 @@ -From c05f2e968867b9a86eaba528946bf421073f41a3 Mon Sep 17 00:00:00 2001 +From a7e43cfe91ded4449218ef274f04d4d77e9d5a00 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c05f2e968867b9a86eaba528946bf421073f41a3 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index e20bf50752..1d9982a786 100644 +index c2fb95f890..09fabbd6a3 100644 @@ -21 +22 @@ -@@ -2998,7 +2998,7 @@ main(int32_t argc, char **argv) +@@ -2908,7 +2908,7 @@ main(int32_t argc, char **argv) @@ -24 +25 @@ - if ((req_tx_offloads[portid] & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)) + if ((req_tx_offloads[portid] & DEV_TX_OFFLOAD_IPV4_CKSUM)) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'crypto/qat: fix null hash algorithm digest size' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi ` (44 preceding siblings ...) 2022-11-05 17:11 ` patch 'examples/ipsec-secgw: fix Tx checksum offload flag' " luca.boccassi @ 2022-11-05 17:11 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi 45 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-05 17:11 UTC (permalink / raw) To: Brian Dooley; +Cc: Ciara Power, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/15c061fa8a0637c00e6516762849b8bde4046358 Thanks. Luca Boccassi --- From 15c061fa8a0637c00e6516762849b8bde4046358 Mon Sep 17 00:00:00 2001 From: Brian Dooley <brian.dooley@intel.com> Date: Thu, 27 Oct 2022 10:50:14 +0000 Subject: [PATCH] crypto/qat: fix null hash algorithm digest size [ upstream commit 7283c59e37b114e692a379234a9d34f0d2c538e7 ] Add check for null hash algorithm digest size. Digest size should be 4B or request will be rejected. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Brian Dooley <brian.dooley@intel.com> Acked-by: Ciara Power <ciara.power@intel.com> --- drivers/crypto/qat/qat_sym_session.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 155d59d226..10db656316 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1740,7 +1740,12 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, hash_offset = cdesc->cd_cur_ptr-((uint8_t *)&cdesc->cd); hash = (struct icp_qat_hw_auth_setup *)cdesc->cd_cur_ptr; hash->auth_config.reserved = 0; - hash->auth_config.config = + if (cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) + hash->auth_config.config = + ICP_QAT_HW_AUTH_CONFIG_BUILD(cdesc->auth_mode, + cdesc->qat_hash_alg, 4); + else + hash->auth_config.config = ICP_QAT_HW_AUTH_CONFIG_BUILD(cdesc->auth_mode, cdesc->qat_hash_alg, digestsize); @@ -2004,10 +2009,16 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, /* Auth CD config setup */ hash_cd_ctrl->hash_cfg_offset = hash_offset >> 3; hash_cd_ctrl->hash_flags = ICP_QAT_FW_AUTH_HDR_FLAG_NO_NESTED; - hash_cd_ctrl->inner_res_sz = digestsize; - hash_cd_ctrl->final_sz = digestsize; hash_cd_ctrl->inner_state1_sz = state1_size; - auth_param->auth_res_sz = digestsize; + if (cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) { + hash_cd_ctrl->inner_res_sz = 4; + hash_cd_ctrl->final_sz = 4; + auth_param->auth_res_sz = 4; + } else { + hash_cd_ctrl->inner_res_sz = digestsize; + hash_cd_ctrl->final_sz = digestsize; + auth_param->auth_res_sz = digestsize; + } hash_cd_ctrl->inner_state2_sz = state2_size; hash_cd_ctrl->inner_state2_offset = hash_cd_ctrl->hash_cfg_offset + -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:12.860388736 +0000 +++ 0047-crypto-qat-fix-null-hash-algorithm-digest-size.patch 2022-11-05 17:11:08.862946678 +0000 @@ -1 +1 @@ -From 7283c59e37b114e692a379234a9d34f0d2c538e7 Mon Sep 17 00:00:00 2001 +From 15c061fa8a0637c00e6516762849b8bde4046358 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7283c59e37b114e692a379234a9d34f0d2c538e7 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 13a8d36e95..71fa595031 100644 +index 155d59d226..10db656316 100644 @@ -22 +23 @@ -@@ -2052,7 +2052,12 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, +@@ -1740,7 +1740,12 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, @@ -36 +37 @@ -@@ -2420,10 +2425,16 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc, +@@ -2004,10 +2009,16 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: set initial value of descriptor count alignment' has been queued to stable release 20.11.7 2022-11-05 17:11 ` patch 'crypto/qat: fix null hash algorithm digest size' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix slave device Rx/Tx offload configuration' " luca.boccassi ` (32 more replies) 0 siblings, 33 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Ivan Malov; +Cc: Andrew Rybchenko, Min Hu, Weiyuan Li, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/03170e37415b218d6c4e3d92d7d4bb84edb63b49 Thanks. Luca Boccassi --- From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001 From: Ivan Malov <ivan.malov@oktetlabs.ru> Date: Mon, 31 Oct 2022 16:17:44 +0300 Subject: [PATCH] net/bonding: set initial value of descriptor count alignment [ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ] The driver had once been broken by patch [1] looking to have a non-zero "nb_max" value in a use case not involving adding any back-end ports. That was addressed afterwards ([2]). But, as per report [3], similar test cases exist which attempt to setup Rx queues on a void bond before attaching any back-end ports. Rx queue setup, in turn, involves device info get API invocation, and one of the checks on received data causes an exception (division by zero). The "nb_align" value is indeed zero at that time, but, as explained in [2], such test cases are totally incorrect since a bond device must have at least one back-end port plugged before any ethdev APIs can be used. Once again, to avoid any problems with fixing the test cases, this patch adjusts the bond PMD itself to workaround the bug. [1] commit 5be3b40fea60 ("net/bonding: fix values of descriptor limits") [2] commit d03c0e83cc00 ("net/bonding: fix descriptor limit reporting") [3] https://bugs.dpdk.org/show_bug.cgi?id=1118 Bugzilla ID: 1118 Fixes: d03c0e83cc00 ("net/bonding: fix descriptor limit reporting") Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Min Hu (Connor) <humin29@huawei.com> Tested-by: Weiyuan Li <weiyuanx.li@intel.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d5dac1ef3e..d8172be041 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) */ internals->rx_desc_lim.nb_max = UINT16_MAX; internals->tx_desc_lim.nb_max = UINT16_MAX; + internals->rx_desc_lim.nb_align = 1; + internals->tx_desc_lim.nb_align = 1; memset(internals->active_slaves, 0, sizeof(internals->active_slaves)); memset(internals->slaves, 0, sizeof(internals->slaves)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.588100067 +0000 +++ 0001-net-bonding-set-initial-value-of-descriptor-count-al.patch 2022-11-17 23:07:55.400328295 +0000 @@ -1 +1 @@ -From 550e8d6d340f93882e4a1183314fd5f4a408595f Mon Sep 17 00:00:00 2001 +From 03170e37415b218d6c4e3d92d7d4bb84edb63b49 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 550e8d6d340f93882e4a1183314fd5f4a408595f ] + @@ -27 +28,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index bd25040851..e0da1fa7c9 100644 +index d5dac1ef3e..d8172be041 100644 @@ -41 +42 @@ -@@ -3431,6 +3431,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) +@@ -3375,6 +3375,8 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix slave device Rx/Tx offload configuration' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'app/testpmd: fix MAC header in checksum forward engine' " luca.boccassi ` (31 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Huisong Li; +Cc: Min Hu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a69e929afedd08cfbe7e579730f01b15aba246e7 Thanks. Luca Boccassi --- From a69e929afedd08cfbe7e579730f01b15aba246e7 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Fri, 28 Oct 2022 10:36:46 +0800 Subject: [PATCH] net/bonding: fix slave device Rx/Tx offload configuration [ upstream commit b5145667785e8954077c593480ddfb2bdd708eac ] Normally, the Rx/Tx offload capability of bonding interface is the intersection of the capability of all slave devices. And Rx/Tx offloads configuration of slave device comes from bonding interface. But now there is a risk that slave device retains its previous offload configurations which is not within the offload configurations of bond interface. Fixes: 57b156540f51 ("net/bonding: fix offloading configuration") Signed-off-by: Huisong Li <lihuisong@huawei.com> Acked-by: Min Hu (Connor) <humin29@huawei.com> --- drivers/net/bonding/rte_eth_bond_pmd.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d8172be041..4549fbf6ff 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1723,20 +1723,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, bonded_eth_dev->data->dev_conf.rxmode.mq_mode; } - slave_eth_dev->data->dev_conf.txmode.offloads |= - bonded_eth_dev->data->dev_conf.txmode.offloads; - - slave_eth_dev->data->dev_conf.txmode.offloads &= - (bonded_eth_dev->data->dev_conf.txmode.offloads | - ~internals->tx_offload_capa); - - slave_eth_dev->data->dev_conf.rxmode.offloads |= - bonded_eth_dev->data->dev_conf.rxmode.offloads; - - slave_eth_dev->data->dev_conf.rxmode.offloads &= - (bonded_eth_dev->data->dev_conf.rxmode.offloads | - ~internals->rx_offload_capa); + slave_eth_dev->data->dev_conf.txmode.offloads = + bonded_eth_dev->data->dev_conf.txmode.offloads; + slave_eth_dev->data->dev_conf.rxmode.offloads = + bonded_eth_dev->data->dev_conf.rxmode.offloads; nb_rx_queues = bonded_eth_dev->data->nb_rx_queues; nb_tx_queues = bonded_eth_dev->data->nb_tx_queues; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.621357669 +0000 +++ 0002-net-bonding-fix-slave-device-Rx-Tx-offload-configura.patch 2022-11-17 23:07:55.404328385 +0000 @@ -1 +1 @@ -From b5145667785e8954077c593480ddfb2bdd708eac Mon Sep 17 00:00:00 2001 +From a69e929afedd08cfbe7e579730f01b15aba246e7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b5145667785e8954077c593480ddfb2bdd708eac ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index e0da1fa7c9..006e13838a 100644 +index d8172be041..4549fbf6ff 100644 @@ -26,3 +27,3 @@ -@@ -1741,20 +1741,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, - slave_eth_dev->data->dev_conf.link_speeds = - bonded_eth_dev->data->dev_conf.link_speeds; +@@ -1723,20 +1723,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, + bonded_eth_dev->data->dev_conf.rxmode.mq_mode; + } ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'app/testpmd: fix MAC header in checksum forward engine' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix slave device Rx/Tx offload configuration' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix dropping valid MAC packets' " luca.boccassi ` (30 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Gregory Etelson; +Cc: Huisong Li, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/827c2ba4facb66c180365f123e76a4ff3f400b13 Thanks. Luca Boccassi --- From 827c2ba4facb66c180365f123e76a4ff3f400b13 Mon Sep 17 00:00:00 2001 From: Gregory Etelson <getelson@nvidia.com> Date: Wed, 26 Oct 2022 14:07:20 +0300 Subject: [PATCH] app/testpmd: fix MAC header in checksum forward engine [ upstream commit 236bc417e2dad4034e4b9b7ea4fc10e71a07c1f8 ] MLX5 SR-IOV Tx engine will not transmit Ethernet frame if destination MAC address matched local port address. The frame ether looped-back to Rx or dropped, depending on the port configuration. Application running over MLX5 SR-IOV port cannot transmit packet polled from Rx queue as is. The packet Ethernet destination address must be changed. Add new run-time configuration parameter to the `csum` forwarding engine to control MAC addresses configuration: testpmd> csum mac-swap on|off <port_id> `mac-swap on` replace MAC addresses. `mac-swap off` keep Ethernet header unchanged. Fixes: 9b4ea7ae77fa ("app/testpmd: revert MAC update in checksum forwarding") Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Huisong Li <lihuisong@huawei.com> --- app/test-pmd/cmdline.c | 50 +++++++++++++++++++++++++++++++++++++++++ app/test-pmd/csumonly.c | 6 +++++ app/test-pmd/testpmd.c | 4 +++- app/test-pmd/testpmd.h | 3 ++- 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 83bb041484..9f46570cc4 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -4778,6 +4778,55 @@ cmdline_parse_inst_t cmd_csum_tunnel = { }, }; +struct cmd_csum_mac_swap_result { + cmdline_fixed_string_t csum; + cmdline_fixed_string_t parse; + cmdline_fixed_string_t onoff; + portid_t port_id; +}; + +static void +cmd_csum_mac_swap_parsed(void *parsed_result, + __rte_unused struct cmdline *cl, + __rte_unused void *data) +{ + struct cmd_csum_mac_swap_result *res = parsed_result; + + if (port_id_is_invalid(res->port_id, ENABLED_WARN)) + return; + if (strcmp(res->onoff, "on") == 0) + ports[res->port_id].fwd_mac_swap = 1; + else + ports[res->port_id].fwd_mac_swap = 0; +} + +static cmdline_parse_token_string_t cmd_csum_mac_swap_csum = + TOKEN_STRING_INITIALIZER(struct cmd_csum_mac_swap_result, + csum, "csum"); +static cmdline_parse_token_string_t cmd_csum_mac_swap_parse = + TOKEN_STRING_INITIALIZER(struct cmd_csum_mac_swap_result, + parse, "mac-swap"); +static cmdline_parse_token_string_t cmd_csum_mac_swap_onoff = + TOKEN_STRING_INITIALIZER(struct cmd_csum_mac_swap_result, + onoff, "on#off"); +static cmdline_parse_token_num_t cmd_csum_mac_swap_portid = + TOKEN_NUM_INITIALIZER(struct cmd_csum_mac_swap_result, + port_id, RTE_UINT16); + +static cmdline_parse_inst_t cmd_csum_mac_swap = { + .f = cmd_csum_mac_swap_parsed, + .data = NULL, + .help_str = "csum mac-swap on|off <port_id>: " + "Enable/Disable forward mac address swap", + .tokens = { + (void *)&cmd_csum_mac_swap_csum, + (void *)&cmd_csum_mac_swap_parse, + (void *)&cmd_csum_mac_swap_onoff, + (void *)&cmd_csum_mac_swap_portid, + NULL, + }, +}; + /* *** ENABLE HARDWARE SEGMENTATION IN TX NON-TUNNELED PACKETS *** */ struct cmd_tso_set_result { cmdline_fixed_string_t tso; @@ -16913,6 +16962,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_csum_set, (cmdline_parse_inst_t *)&cmd_csum_show, (cmdline_parse_inst_t *)&cmd_csum_tunnel, + (cmdline_parse_inst_t *)&cmd_csum_mac_swap, (cmdline_parse_inst_t *)&cmd_tso_set, (cmdline_parse_inst_t *)&cmd_tso_show, (cmdline_parse_inst_t *)&cmd_tunnel_tso_set, diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index ffec25f308..aa1c60e7b3 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -888,6 +888,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) * and inner headers */ eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); + if (ports[fs->tx_port].fwd_mac_swap) { + rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr], + ð_hdr->d_addr); + rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, + ð_hdr->s_addr); + } parse_ethernet(eth_hdr, &info); l3_hdr = (char *)eth_hdr + info.l2_len; diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c29f1f153c..d0cd11fe4e 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3813,8 +3813,10 @@ init_port(void) "rte_zmalloc(%d struct rte_port) failed\n", RTE_MAX_ETHPORTS); } - for (i = 0; i < RTE_MAX_ETHPORTS; i++) + for (i = 0; i < RTE_MAX_ETHPORTS; i++) { + ports[i].fwd_mac_swap = 1; LIST_INIT(&ports[i].flow_tunnel_list); + } /* Initialize ports NUMA structures */ memset(port_numa, NUMA_NO_CONFIG, RTE_MAX_ETHPORTS); memset(rxring_numa, NUMA_NO_CONFIG, RTE_MAX_ETHPORTS); diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index d21d8501d5..76c2c55981 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -237,7 +237,8 @@ struct rte_port { struct rte_ether_addr *mc_addr_pool; /**< pool of multicast addrs */ uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ uint8_t slave_flag : 1, /**< bonding slave port */ - bond_flag : 1; /**< port is bond device */ + bond_flag : 1, /**< port is bond device */ + fwd_mac_swap : 1; /**< swap packet MAC before forward */ struct port_flow *flow_list; /**< Associated flows. */ struct port_shared_action *actions_list; /**< Associated shared actions. */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.659959543 +0000 +++ 0003-app-testpmd-fix-MAC-header-in-checksum-forward-engin.patch 2022-11-17 23:07:55.428328925 +0000 @@ -1 +1 @@ -From 236bc417e2dad4034e4b9b7ea4fc10e71a07c1f8 Mon Sep 17 00:00:00 2001 +From 827c2ba4facb66c180365f123e76a4ff3f400b13 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 236bc417e2dad4034e4b9b7ea4fc10e71a07c1f8 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ - app/test-pmd/testpmd.c | 5 +++-- + app/test-pmd/testpmd.c | 4 +++- @@ -32 +33 @@ - 4 files changed, 61 insertions(+), 3 deletions(-) + 4 files changed, 61 insertions(+), 2 deletions(-) @@ -35 +36 @@ -index 8dc60e9388..3fbcb6ca8f 100644 +index 83bb041484..9f46570cc4 100644 @@ -38 +39 @@ -@@ -4793,6 +4793,55 @@ static cmdline_parse_inst_t cmd_csum_tunnel = { +@@ -4778,6 +4778,55 @@ cmdline_parse_inst_t cmd_csum_tunnel = { @@ -94 +95 @@ -@@ -12628,6 +12677,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = { +@@ -16913,6 +16962,7 @@ cmdline_parse_ctx_t main_ctx[] = { @@ -103 +104 @@ -index 144f28819c..1c24598515 100644 +index ffec25f308..aa1c60e7b3 100644 @@ -106 +107 @@ -@@ -915,6 +915,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) +@@ -888,6 +888,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) @@ -112 +113 @@ -+ ð_hdr->dst_addr); ++ ð_hdr->d_addr); @@ -114 +115 @@ -+ ð_hdr->src_addr); ++ ð_hdr->s_addr); @@ -120 +121 @@ -index aa7ea29f15..bf589c4e8d 100644 +index c29f1f153c..d0cd11fe4e 100644 @@ -123 +124 @@ -@@ -4214,10 +4214,11 @@ init_port(void) +@@ -3813,8 +3813,10 @@ init_port(void) @@ -130,2 +130,0 @@ - ports[i].xstats_info.allocated = false; -- for (i = 0; i < RTE_MAX_ETHPORTS; i++) @@ -138 +137 @@ -index 349f02e18a..93fdb9d331 100644 +index d21d8501d5..76c2c55981 100644 @@ -141,3 +140,3 @@ -@@ -316,7 +316,8 @@ struct rte_port { - queueid_t queue_nb; /**< nb. of queues for flow rules */ - uint32_t queue_sz; /**< size of a queue for flow rules */ +@@ -237,7 +237,8 @@ struct rte_port { + struct rte_ether_addr *mc_addr_pool; /**< pool of multicast addrs */ + uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ @@ -148,3 +147,3 @@ - struct port_template *pattern_templ_list; /**< Pattern templates. */ - struct port_template *actions_templ_list; /**< Actions templates. */ - struct port_table *table_list; /**< Flow tables. */ + struct port_flow *flow_list; /**< Associated flows. */ + struct port_shared_action *actions_list; + /**< Associated shared actions. */ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix dropping valid MAC packets' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix slave device Rx/Tx offload configuration' " luca.boccassi 2022-11-17 23:08 ` patch 'app/testpmd: fix MAC header in checksum forward engine' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'app/testpmd: make quit flag volatile' " luca.boccassi ` (29 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Huisong Li; +Cc: Andrew Rybchenko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/8d40818e69b0dba586be8eff417bc13cf6000415 Thanks. Luca Boccassi --- From 8d40818e69b0dba586be8eff417bc13cf6000415 Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Wed, 19 Oct 2022 11:32:31 +0800 Subject: [PATCH] net/bonding: fix dropping valid MAC packets [ upstream commit 30bfba52cf356c03743b6f7deaeefce2f6cb39ed ] Currently, by default, bond4 will first try to enable allmulti and then enable promiscuous if fail to enable allmulti. On reception, whether unicast and multicast packets should be dropped depends on which mode has been enabled on the bonding interface. In fact, if MAC address of packets in mac_addrs array of bonding interface, these packets should not be dropped. However, now only check the default MAC address, which will cause the packets with MAC added by the '.mac_addr_add' are dropped. Fixes: 68218b87c184 ("net/bonding: prefer allmulti to promiscuous for LACP") Signed-off-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> --- drivers/net/bonding/rte_eth_bond_pmd.c | 33 +++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 4549fbf6ff..b147be0b84 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -271,6 +271,24 @@ bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port) { return 0; } +static bool +is_bond_mac_addr(const struct rte_ether_addr *ea, + const struct rte_ether_addr *mac_addrs, uint32_t max_mac_addrs) +{ + uint32_t i; + + for (i = 0; i < max_mac_addrs; i++) { + /* skip zero address */ + if (rte_is_zero_ether_addr(&mac_addrs[i])) + continue; + + if (rte_is_same_ether_addr(ea, &mac_addrs[i])) + return true; + } + + return false; +} + static inline uint16_t rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts, bool dedicated_rxq) @@ -331,8 +349,9 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts, /* Remove packet from array if: * - it is slow packet but no dedicated rxq is present, * - slave is not in collecting state, - * - bonding interface is not in promiscuous mode: - * - packet is unicast and address does not match, + * - bonding interface is not in promiscuous mode and + * packet address isn't in mac_addrs array: + * - packet is unicast, * - packet is multicast and bonding interface * is not in allmulti, */ @@ -342,12 +361,10 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts, bufs[j])) || !collecting || (!promisc && - ((rte_is_unicast_ether_addr(&hdr->d_addr) && - !rte_is_same_ether_addr(bond_mac, - &hdr->d_addr)) || - (!allmulti && - rte_is_multicast_ether_addr(&hdr->d_addr)))))) { - + !is_bond_mac_addr(&hdr->d_addr, bond_mac, + BOND_MAX_MAC_ADDRS) && + (rte_is_unicast_ether_addr(&hdr->d_addr) || + !allmulti)))) { if (hdr->ether_type == ether_type_slow_be) { bond_mode_8023ad_handle_slow_pkt( internals, slaves[idx], bufs[j]); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.711144604 +0000 +++ 0004-net-bonding-fix-dropping-valid-MAC-packets.patch 2022-11-17 23:07:55.432329016 +0000 @@ -1 +1 @@ -From 30bfba52cf356c03743b6f7deaeefce2f6cb39ed Mon Sep 17 00:00:00 2001 +From 8d40818e69b0dba586be8eff417bc13cf6000415 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 30bfba52cf356c03743b6f7deaeefce2f6cb39ed ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 006e13838a..864e073db8 100644 +index 4549fbf6ff..b147be0b84 100644 @@ -70 +71 @@ -- ((rte_is_unicast_ether_addr(&hdr->dst_addr) && +- ((rte_is_unicast_ether_addr(&hdr->d_addr) && @@ -72 +73 @@ -- &hdr->dst_addr)) || +- &hdr->d_addr)) || @@ -74 +75 @@ -- rte_is_multicast_ether_addr(&hdr->dst_addr)))))) { +- rte_is_multicast_ether_addr(&hdr->d_addr)))))) { @@ -76 +77 @@ -+ !is_bond_mac_addr(&hdr->dst_addr, bond_mac, ++ !is_bond_mac_addr(&hdr->d_addr, bond_mac, @@ -78 +79 @@ -+ (rte_is_unicast_ether_addr(&hdr->dst_addr) || ++ (rte_is_unicast_ether_addr(&hdr->d_addr) || ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'app/testpmd: make quit flag volatile' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (2 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/bonding: fix dropping valid MAC packets' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix mbuf fast free handling' " luca.boccassi ` (28 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Ruifeng Wang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4716a35952589c702ba625af7fbba9c289ac0c68 Thanks. Luca Boccassi --- From 4716a35952589c702ba625af7fbba9c289ac0c68 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Tue, 8 Nov 2022 10:07:43 -0800 Subject: [PATCH] app/testpmd: make quit flag volatile [ upstream commit 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 ] Since f_quit is set in a signal handler it needs to be marked volatile. Otherwise, compiler is allowed to optimize the loop because it can assume the value never changes. The flag can also be made local to the file it is used in. Fixes: d9a191a00e81 ("app/testpmd: fix quitting in container") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> --- app/test-pmd/testpmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index d0cd11fe4e..13d8c1c72a 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -216,7 +216,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */ * In container, it cannot terminate the process which running with 'stats-period' * option. Set flag to exit stats period loop after received SIGINT/SIGTERM. */ -uint8_t f_quit; +static volatile uint8_t f_quit; uint8_t cl_quit; /* Quit testpmd from cmdline. */ /* -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.748054017 +0000 +++ 0005-app-testpmd-make-quit-flag-volatile.patch 2022-11-17 23:07:55.436329106 +0000 @@ -1 +1 @@ -From 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 Mon Sep 17 00:00:00 2001 +From 4716a35952589c702ba625af7fbba9c289ac0c68 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 7381dfd9e5..295856f1a8 100644 +index d0cd11fe4e..13d8c1c72a 100644 @@ -24 +25 @@ -@@ -231,7 +231,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */ +@@ -216,7 +216,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */ ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/bonding: fix mbuf fast free handling' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (3 preceding siblings ...) 2022-11-17 23:08 ` patch 'app/testpmd: make quit flag volatile' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'eal: fix doxygen comments for UUID' " luca.boccassi ` (27 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Huisong Li; +Cc: Stephen Hemminger, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/30769b703cdbbd921ee9b752005057f062bbca1c Thanks. Luca Boccassi --- From 30769b703cdbbd921ee9b752005057f062bbca1c Mon Sep 17 00:00:00 2001 From: Huisong Li <lihuisong@huawei.com> Date: Wed, 9 Nov 2022 10:22:37 +0800 Subject: [PATCH] net/bonding: fix mbuf fast free handling [ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ] The RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload can't be used in bonding mode Broadcast and mode 8023AD. Currently, bonding driver forcibly removes from the dev->data->dev_conf.txmode.offloads and processes as success in bond_ethdev_configure(). But this still cause that rte_eth_dev_configure() fails to execute because of the failure of validating Tx offload in the eth_dev_validate_offloads(). So this patch moves the modification of txmode offlaods to the stage of adding slave device to report the correct txmode offloads. Fixes: 18c41457cbae ("net/bonding: fix mbuf fast free usage") Signed-off-by: Huisong Li <lihuisong@huawei.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/bonding/rte_eth_bond_api.c | 5 +++++ drivers/net/bonding/rte_eth_bond_pmd.c | 11 ----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 2f8d003cb0..7925f35882 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -541,6 +541,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) return ret; } + /* Bond mode Broadcast & 8023AD don't support MBUF_FAST_FREE offload. */ + if (internals->mode == BONDING_MODE_8023AD || + internals->mode == BONDING_MODE_BROADCAST) + internals->tx_offload_capa &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; + bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf &= internals->flow_type_rss_offloads; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index b147be0b84..5a9b9cc4b9 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3585,7 +3585,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) const char *name = dev->device->name; struct bond_dev_private *internals = dev->data->dev_private; struct rte_kvargs *kvlist = internals->kvlist; - uint64_t offloads; int arg_count; uint16_t port_id = dev - rte_eth_devices; uint8_t agg_mode; @@ -3646,16 +3645,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } } - offloads = dev->data->dev_conf.txmode.offloads; - if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) && - (internals->mode == BONDING_MODE_8023AD || - internals->mode == BONDING_MODE_BROADCAST)) { - RTE_BOND_LOG(WARNING, - "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it."); - offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; - dev->data->dev_conf.txmode.offloads = offloads; - } - /* set the max_rx_pktlen */ internals->max_rx_pktlen = internals->candidate_max_rx_pktlen; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.786887658 +0000 +++ 0006-net-bonding-fix-mbuf-fast-free-handling.patch 2022-11-17 23:07:55.440329196 +0000 @@ -1 +1 @@ -From b4924c0db589b5d4698abfab3ce60978d9df518b Mon Sep 17 00:00:00 2001 +From 30769b703cdbbd921ee9b752005057f062bbca1c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 694fe86115..c0178369b4 100644 +index 2f8d003cb0..7925f35882 100644 @@ -29 +30 @@ -@@ -544,6 +544,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) +@@ -541,6 +541,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) @@ -36 +37 @@ -+ internals->tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; ++ internals->tx_offload_capa &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; @@ -42 +43 @@ -index 864e073db8..2efaad1e8e 100644 +index b147be0b84..5a9b9cc4b9 100644 @@ -45 +46 @@ -@@ -3643,7 +3643,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3585,7 +3585,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -52,2 +53,2 @@ - uint32_t link_speeds; -@@ -3708,16 +3707,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) + uint8_t agg_mode; +@@ -3646,16 +3645,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -58 +59 @@ -- if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) && +- if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) && @@ -63 +64 @@ -- offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; +- offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; @@ -67,3 +68,3 @@ - link_speeds = dev->data->dev_conf.link_speeds; - /* - * The default value of 'link_speeds' is zero. From its definition, + /* set the max_rx_pktlen */ + internals->max_rx_pktlen = internals->candidate_max_rx_pktlen; + ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'eal: fix doxygen comments for UUID' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (4 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/bonding: fix mbuf fast free handling' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'power: fix some doxygen comments' " luca.boccassi ` (26 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Jerin Jacob; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3b823b57d9d8ca42497c29ef3a1160a1d9c94e23 Thanks. Luca Boccassi --- From 3b823b57d9d8ca42497c29ef3a1160a1d9c94e23 Mon Sep 17 00:00:00 2001 From: Jerin Jacob <jerinj@marvell.com> Date: Wed, 9 Nov 2022 20:24:10 +0530 Subject: [PATCH] eal: fix doxygen comments for UUID [ upstream commit 61c7dfe75a9ab345bbd8bdc30c2da0ee661660a8 ] Fix following syntax error reported by doxygen 1.9.5 version. lib/eal/include/rte_uuid.h:89: error: RTE_UUID_STRLEN has @param documentation sections but no arguments (warning treated as error, aborting now) Fixes: 6bc67c497a51 ("eal: add uuid API") Signed-off-by: Jerin Jacob <jerinj@marvell.com> --- lib/librte_eal/include/rte_uuid.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_uuid.h b/lib/librte_eal/include/rte_uuid.h index 8b42e070af..cfefd4308a 100644 --- a/lib/librte_eal/include/rte_uuid.h +++ b/lib/librte_eal/include/rte_uuid.h @@ -37,6 +37,9 @@ typedef unsigned char rte_uuid_t[16]; ((e) >> 8) & 0xff, (e) & 0xff \ } +/** UUID string length */ +#define RTE_UUID_STRLEN (36 + 1) + /** * Test if UUID is all zeros. * @@ -95,7 +98,6 @@ int rte_uuid_parse(const char *in, rte_uuid_t uu); * @param len * Sizeof the available string buffer */ -#define RTE_UUID_STRLEN (36 + 1) void rte_uuid_unparse(const rte_uuid_t uu, char *out, size_t len); #ifdef __cplusplus -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.826868624 +0000 +++ 0007-eal-fix-doxygen-comments-for-UUID.patch 2022-11-17 23:07:55.440329196 +0000 @@ -1 +1 @@ -From 61c7dfe75a9ab345bbd8bdc30c2da0ee661660a8 Mon Sep 17 00:00:00 2001 +From 3b823b57d9d8ca42497c29ef3a1160a1d9c94e23 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 61c7dfe75a9ab345bbd8bdc30c2da0ee661660a8 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/eal/include/rte_uuid.h | 4 +++- + lib/librte_eal/include/rte_uuid.h | 4 +++- @@ -20 +21 @@ -diff --git a/lib/eal/include/rte_uuid.h b/lib/eal/include/rte_uuid.h +diff --git a/lib/librte_eal/include/rte_uuid.h b/lib/librte_eal/include/rte_uuid.h @@ -22,2 +23,2 @@ ---- a/lib/eal/include/rte_uuid.h -+++ b/lib/eal/include/rte_uuid.h +--- a/lib/librte_eal/include/rte_uuid.h ++++ b/lib/librte_eal/include/rte_uuid.h ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'power: fix some doxygen comments' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (5 preceding siblings ...) 2022-11-17 23:08 ` patch 'eal: fix doxygen comments for UUID' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'hash: fix RCU configuration memory leak' " luca.boccassi ` (25 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Jerin Jacob; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/76c23eded561afb5899cbbe8155e49bddf756204 Thanks. Luca Boccassi --- From 76c23eded561afb5899cbbe8155e49bddf756204 Mon Sep 17 00:00:00 2001 From: Jerin Jacob <jerinj@marvell.com> Date: Wed, 9 Nov 2022 20:24:10 +0530 Subject: [PATCH] power: fix some doxygen comments [ upstream commit 58794bf8d2d577b18e8bd430fd6419274678b34e ] Fix following syntax error reported by doxygen 1.9.5 version. lib/power/rte_power.h:169: error: rte_power_freq_up has @param documentation sections but no arguments (warning treated as error, aborting now) Fixes: d7937e2e3d12 ("power: initial import") Signed-off-by: Jerin Jacob <jerinj@marvell.com> --- lib/librte_power/rte_power.h | 55 ------------------------------------ 1 file changed, 55 deletions(-) diff --git a/lib/librte_power/rte_power.h b/lib/librte_power/rte_power.h index c8086bf6ba..ce672b01a9 100644 --- a/lib/librte_power/rte_power.h +++ b/lib/librte_power/rte_power.h @@ -171,14 +171,6 @@ typedef int (*rte_power_freq_change_t)(unsigned int lcore_id); * Scale up the frequency of a specific lcore according to the available * frequencies. * Review each environments specific documentation for usage. - * - * @param lcore_id - * lcore id. - * - * @return - * - 1 on success with frequency changed. - * - 0 on success without frequency changed. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_freq_up; @@ -186,30 +178,13 @@ extern rte_power_freq_change_t rte_power_freq_up; * Scale down the frequency of a specific lcore according to the available * frequencies. * Review each environments specific documentation for usage. - * - * @param lcore_id - * lcore id. - * - * @return - * - 1 on success with frequency changed. - * - 0 on success without frequency changed. - * - Negative on error. */ - extern rte_power_freq_change_t rte_power_freq_down; /** * Scale up the frequency of a specific lcore to the highest according to the * available frequencies. * Review each environments specific documentation for usage. - * - * @param lcore_id - * lcore id. - * - * @return - * - 1 on success with frequency changed. - * - 0 on success without frequency changed. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_freq_max; @@ -217,54 +192,24 @@ extern rte_power_freq_change_t rte_power_freq_max; * Scale down the frequency of a specific lcore to the lowest according to the * available frequencies. * Review each environments specific documentation for usage.. - * - * @param lcore_id - * lcore id. - * - * @return - * - 1 on success with frequency changed. - * - 0 on success without frequency changed. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_freq_min; /** * Query the Turbo Boost status of a specific lcore. * Review each environments specific documentation for usage.. - * - * @param lcore_id - * lcore id. - * - * @return - * - 1 Turbo Boost is enabled for this lcore. - * - 0 Turbo Boost is disabled for this lcore. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_turbo_status; /** * Enable Turbo Boost for this lcore. * Review each environments specific documentation for usage.. - * - * @param lcore_id - * lcore id. - * - * @return - * - 0 on success. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_freq_enable_turbo; /** * Disable Turbo Boost for this lcore. * Review each environments specific documentation for usage.. - * - * @param lcore_id - * lcore id. - * - * @return - * - 0 on success. - * - Negative on error. */ extern rte_power_freq_change_t rte_power_freq_disable_turbo; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.862129602 +0000 +++ 0008-power-fix-some-doxygen-comments.patch 2022-11-17 23:07:55.440329196 +0000 @@ -1 +1 @@ -From 58794bf8d2d577b18e8bd430fd6419274678b34e Mon Sep 17 00:00:00 2001 +From 76c23eded561afb5899cbbe8155e49bddf756204 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 58794bf8d2d577b18e8bd430fd6419274678b34e ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/power/rte_power.h | 55 ------------------------------------------- + lib/librte_power/rte_power.h | 55 ------------------------------------ @@ -20,5 +21,5 @@ -diff --git a/lib/power/rte_power.h b/lib/power/rte_power.h -index 47345e26df..7954299489 100644 ---- a/lib/power/rte_power.h -+++ b/lib/power/rte_power.h -@@ -169,14 +169,6 @@ typedef int (*rte_power_freq_change_t)(unsigned int lcore_id); +diff --git a/lib/librte_power/rte_power.h b/lib/librte_power/rte_power.h +index c8086bf6ba..ce672b01a9 100644 +--- a/lib/librte_power/rte_power.h ++++ b/lib/librte_power/rte_power.h +@@ -171,14 +171,6 @@ typedef int (*rte_power_freq_change_t)(unsigned int lcore_id); @@ -39 +40 @@ -@@ -184,30 +176,13 @@ extern rte_power_freq_change_t rte_power_freq_up; +@@ -186,30 +178,13 @@ extern rte_power_freq_change_t rte_power_freq_up; @@ -70 +71 @@ -@@ -215,54 +190,24 @@ extern rte_power_freq_change_t rte_power_freq_max; +@@ -217,54 +192,24 @@ extern rte_power_freq_change_t rte_power_freq_max; ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'hash: fix RCU configuration memory leak' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (6 preceding siblings ...) 2022-11-17 23:08 ` patch 'power: fix some doxygen comments' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'test/hash: remove dead code in extendable bucket test' " luca.boccassi ` (24 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Jun Qiu; +Cc: David Marchand, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9d8095a096ab6803748bac2472894655e0dc6e70 Thanks. Luca Boccassi --- From 9d8095a096ab6803748bac2472894655e0dc6e70 Mon Sep 17 00:00:00 2001 From: Jun Qiu <jun.qiu@jaguarmicro.com> Date: Fri, 4 Nov 2022 09:51:23 +0000 Subject: [PATCH] hash: fix RCU configuration memory leak [ upstream commit bdd0c62c69b2b3c07e65d66daa7c564280e72480 ] The memory of h->hash_rcu_cfg which is allocated in rte_hash_rcu_qsbr_add was leaked. Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation") Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com> Reviewed-by: David Marchand <david.marchand@redhat.com> --- lib/librte_hash/rte_cuckoo_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 1191dfd81a..cff4242f79 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -527,6 +527,7 @@ rte_hash_free(struct rte_hash *h) rte_free(h->buckets_ext); rte_free(h->tbl_chng_cnt); rte_free(h->ext_bkt_to_free); + rte_free(h->hash_rcu_cfg); rte_free(h); rte_free(te); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.897800690 +0000 +++ 0009-hash-fix-RCU-configuration-memory-leak.patch 2022-11-17 23:07:55.444329286 +0000 @@ -1 +1 @@ -From bdd0c62c69b2b3c07e65d66daa7c564280e72480 Mon Sep 17 00:00:00 2001 +From 9d8095a096ab6803748bac2472894655e0dc6e70 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bdd0c62c69b2b3c07e65d66daa7c564280e72480 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - lib/hash/rte_cuckoo_hash.c | 1 + + lib/librte_hash/rte_cuckoo_hash.c | 1 + @@ -18,5 +19,5 @@ -diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c -index 62c762439a..829b79c89a 100644 ---- a/lib/hash/rte_cuckoo_hash.c -+++ b/lib/hash/rte_cuckoo_hash.c -@@ -521,6 +521,7 @@ rte_hash_free(struct rte_hash *h) +diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c +index 1191dfd81a..cff4242f79 100644 +--- a/lib/librte_hash/rte_cuckoo_hash.c ++++ b/lib/librte_hash/rte_cuckoo_hash.c +@@ -527,6 +527,7 @@ rte_hash_free(struct rte_hash *h) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/hash: remove dead code in extendable bucket test' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (7 preceding siblings ...) 2022-11-17 23:08 ` patch 'hash: fix RCU configuration memory leak' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'test/hash: fix bulk lookup check' " luca.boccassi ` (23 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Vladimir Medvedkin; +Cc: Ruifeng Wang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6c138f0580df667b0ba55b5825b9200cb3df9278 Thanks. Luca Boccassi --- From 6c138f0580df667b0ba55b5825b9200cb3df9278 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Date: Thu, 3 Nov 2022 18:12:39 +0000 Subject: [PATCH] test/hash: remove dead code in extendable bucket test [ upstream commit e5408325f3b415421de90abde8445d8d268dfeea ] Remove unnecessary variable assignment. Coverity issue: 336800 Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket") Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> --- app/test/test_hash_readwrite_lf_perf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c index 32f9ec9250..cf86046a2f 100644 --- a/app/test/test_hash_readwrite_lf_perf.c +++ b/app/test/test_hash_readwrite_lf_perf.c @@ -1102,7 +1102,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_eal_remote_launch(test_rwc_reader, (void *)(uintptr_t)read_type, enabled_core_ids[i]); - write_type = WRITE_KEY_SHIFT; pos_core = 0; /* Launch writers */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.934609539 +0000 +++ 0010-test-hash-remove-dead-code-in-extendable-bucket-test.patch 2022-11-17 23:07:55.444329286 +0000 @@ -1 +1 @@ -From e5408325f3b415421de90abde8445d8d268dfeea Mon Sep 17 00:00:00 2001 +From 6c138f0580df667b0ba55b5825b9200cb3df9278 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e5408325f3b415421de90abde8445d8d268dfeea ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/hash: fix bulk lookup check' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (8 preceding siblings ...) 2022-11-17 23:08 ` patch 'test/hash: remove dead code in extendable bucket test' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix race condition in counter pool resizing' " luca.boccassi ` (22 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0053fb1fe8feb7be4f06f5097095f2cb4967938e Thanks. Luca Boccassi --- From 0053fb1fe8feb7be4f06f5097095f2cb4967938e Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Date: Thu, 3 Nov 2022 18:52:56 +0000 Subject: [PATCH] test/hash: fix bulk lookup check [ upstream commit 521171cf2a3cbc108ec920874cfa3706e7f89c73 ] Check return value after bulk lookup. Coverity issue: 357746 Fixes: 14b8ab576235 ("hash: add bulk lookup with signatures array") Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- app/test/test_hash_perf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 76cdac5d53..199564bba3 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -480,6 +480,11 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, (const void **)keys_burst, &signatures[j * BURST_SIZE], BURST_SIZE, positions_burst); + if (ret != 0) { + printf("rte_hash_lookup_with_hash_bulk failed with %d\n", + ret); + return -1; + } for (k = 0; k < BURST_SIZE; k++) { if (positions_burst[k] != positions[j * @@ -492,10 +497,14 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, } } } else { - rte_hash_lookup_bulk(h[table_index], + ret = rte_hash_lookup_bulk(h[table_index], (const void **) keys_burst, BURST_SIZE, positions_burst); + if (ret != 0) { + printf("rte_hash_lookup_bulk failed with %d\n", ret); + return -1; + } for (k = 0; k < BURST_SIZE; k++) { if (positions_burst[k] != positions[j * BURST_SIZE + k]) { printf("Key looked up in %d, should be in %d\n", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:55.972196221 +0000 +++ 0011-test-hash-fix-bulk-lookup-check.patch 2022-11-17 23:07:55.448329376 +0000 @@ -1 +1 @@ -From 521171cf2a3cbc108ec920874cfa3706e7f89c73 Mon Sep 17 00:00:00 2001 +From 0053fb1fe8feb7be4f06f5097095f2cb4967938e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 521171cf2a3cbc108ec920874cfa3706e7f89c73 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 5d36c0f454..14a1283aba 100644 +index 76cdac5d53..199564bba3 100644 @@ -22 +23 @@ -@@ -475,6 +475,11 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, +@@ -480,6 +480,11 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, @@ -34 +35 @@ -@@ -487,10 +492,14 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, +@@ -492,10 +497,14 @@ timed_lookups_multi(unsigned int with_hash, unsigned int with_data, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix race condition in counter pool resizing' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (9 preceding siblings ...) 2022-11-17 23:08 ` patch 'test/hash: fix bulk lookup check' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix hairpin split with set VLAN VID action' " luca.boccassi ` (21 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Michael Baum; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4951ff74e90470dfd51af5fe148e1ce9e674c7bb Thanks. Luca Boccassi --- From 4951ff74e90470dfd51af5fe148e1ce9e674c7bb Mon Sep 17 00:00:00 2001 From: Michael Baum <michaelba@nvidia.com> Date: Mon, 31 Oct 2022 18:08:20 +0200 Subject: [PATCH] net/mlx5: fix race condition in counter pool resizing [ upstream commit a94e89e47b59ebaf84246bbb34c06e1a004cde8a ] Counter management structure has array of counter pools. This array is invalid in management structure initialization and grows on demand. The resizing include: 1. Allocate memory for the new size. 2. Copy the existing data to the new memory. 3. Move the pointer to the new memory. 4. Free the old memory. The third step can be performed before for this function, and compiler may do that, but another thread might read the pointer before coping and read invalid data or even crash. This patch allocates memory for this array once in management structure initialization and limit the counters number by 16M. Fixes: 3aa279157fa0 ("net/mlx5: synchronize flow counter pool creation") Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5.c | 27 ++++++++++++--- drivers/net/mlx5/mlx5.h | 5 +-- drivers/net/mlx5/mlx5_flow.c | 22 ++++++------- drivers/net/mlx5/mlx5_flow_dv.c | 53 +++++------------------------- drivers/net/mlx5/mlx5_flow_verbs.c | 23 +++---------- 5 files changed, 50 insertions(+), 80 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 0b82969b4d..90985479de 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -447,22 +447,38 @@ mlx5_flow_aging_init(struct mlx5_dev_ctx_shared *sh) * * @param[in] sh * Pointer to mlx5_dev_ctx_shared object to free + * + * @return + * 0 on success, otherwise negative errno value and rte_errno is set. */ -static void +static int mlx5_flow_counters_mng_init(struct mlx5_dev_ctx_shared *sh) { int i; + void *pools; + pools = mlx5_malloc(MLX5_MEM_ZERO, + sizeof(struct mlx5_flow_counter_pool *) * + MLX5_COUNTER_POOLS_MAX_NUM, + 0, SOCKET_ID_ANY); + if (!pools) { + DRV_LOG(ERR, + "Counter management allocation was failed."); + rte_errno = ENOMEM; + return -rte_errno; + } memset(&sh->cmng, 0, sizeof(sh->cmng)); TAILQ_INIT(&sh->cmng.flow_counters); sh->cmng.min_id = MLX5_CNT_BATCH_OFFSET; sh->cmng.max_id = -1; sh->cmng.last_pool_idx = POOL_IDX_INVALID; + sh->cmng.pools = pools; rte_spinlock_init(&sh->cmng.pool_update_sl); for (i = 0; i < MLX5_COUNTER_TYPE_MAX; i++) { TAILQ_INIT(&sh->cmng.counters[i]); rte_spinlock_init(&sh->cmng.csl[i]); } + return 0; } /** @@ -520,8 +536,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh) claim_zero (mlx5_flow_os_destroy_flow_action (cnt->action)); - if (fallback && MLX5_POOL_GET_CNT - (pool, j)->dcs_when_free) + if (fallback && cnt->dcs_when_free) claim_zero(mlx5_devx_cmd_destroy (cnt->dcs_when_free)); } @@ -1002,8 +1017,12 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn, err = rte_errno; goto error; } + err = mlx5_flow_counters_mng_init(sh); + if (err) { + DRV_LOG(ERR, "Fail to initialize counters manage."); + goto error; + } mlx5_flow_aging_init(sh); - mlx5_flow_counters_mng_init(sh); mlx5_flow_ipool_create(sh, config); /* Add device to memory callback list. */ rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock); diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 6c85c4e2db..69fb34826d 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -280,9 +280,10 @@ struct mlx5_lb_ctx { uint16_t refcnt; /* Reference count for representors. */ }; +#define MLX5_COUNTER_POOLS_MAX_NUM (1 << 15) #define MLX5_COUNTERS_PER_POOL 512 #define MLX5_MAX_PENDING_QUERIES 4 -#define MLX5_CNT_CONTAINER_RESIZE 64 +#define MLX5_CNT_MR_ALLOC_BULK 64 #define MLX5_CNT_SHARED_OFFSET 0x80000000 #define IS_SHARED_CNT(cnt) (!!((cnt) & MLX5_CNT_SHARED_OFFSET)) #define IS_BATCH_CNT(cnt) (((cnt) & (MLX5_CNT_SHARED_OFFSET - 1)) >= \ @@ -442,7 +443,6 @@ TAILQ_HEAD(mlx5_counter_pools, mlx5_flow_counter_pool); /* Counter global management structure. */ struct mlx5_flow_counter_mng { volatile uint16_t n_valid; /* Number of valid pools. */ - uint16_t n; /* Number of pools. */ uint16_t last_pool_idx; /* Last used pool index */ int min_id; /* The minimum counter ID in the pools. */ int max_id; /* The maximum counter ID in the pools. */ @@ -514,6 +514,7 @@ struct mlx5_aso_age_action { }; #define MLX5_ASO_AGE_ACTIONS_PER_POOL 512 +#define MLX5_ASO_AGE_CONTAINER_RESIZE 64 struct mlx5_aso_age_pool { struct mlx5_devx_obj *flow_hit_aso_obj; diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 43fa595be1..f0c90a314b 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -6647,7 +6647,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) { struct mlx5_counter_stats_mem_mng *mem_mng; volatile struct flow_counter_stats *raw_data; - int raws_n = MLX5_CNT_CONTAINER_RESIZE + MLX5_MAX_PENDING_QUERIES; + int raws_n = MLX5_CNT_MR_ALLOC_BULK + MLX5_MAX_PENDING_QUERIES; int size = (sizeof(struct flow_counter_stats) * MLX5_COUNTERS_PER_POOL + sizeof(struct mlx5_counter_stats_raw)) * raws_n + @@ -6685,7 +6685,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) } for (i = 0; i < MLX5_MAX_PENDING_QUERIES; ++i) LIST_INSERT_HEAD(&sh->cmng.free_stat_raws, - mem_mng->raws + MLX5_CNT_CONTAINER_RESIZE + i, + mem_mng->raws + MLX5_CNT_MR_ALLOC_BULK + i, next); LIST_INSERT_HEAD(&sh->cmng.mem_mngs, mem_mng, next); sh->cmng.mem_mng = mem_mng; @@ -6709,14 +6709,13 @@ mlx5_flow_set_counter_stat_mem(struct mlx5_dev_ctx_shared *sh, { struct mlx5_flow_counter_mng *cmng = &sh->cmng; /* Resize statistic memory once used out. */ - if (!(pool->index % MLX5_CNT_CONTAINER_RESIZE) && + if (!(pool->index % MLX5_CNT_MR_ALLOC_BULK) && mlx5_flow_create_counter_stat_mem_mng(sh)) { DRV_LOG(ERR, "Cannot resize counter stat mem."); return -1; } rte_spinlock_lock(&pool->sl); - pool->raw = cmng->mem_mng->raws + pool->index % - MLX5_CNT_CONTAINER_RESIZE; + pool->raw = cmng->mem_mng->raws + pool->index % MLX5_CNT_MR_ALLOC_BULK; rte_spinlock_unlock(&pool->sl); pool->raw_hw = NULL; return 0; @@ -6758,13 +6757,13 @@ void mlx5_flow_query_alarm(void *arg) { struct mlx5_dev_ctx_shared *sh = arg; - int ret; - uint16_t pool_index = sh->cmng.pool_index; struct mlx5_flow_counter_mng *cmng = &sh->cmng; + uint16_t pool_index = cmng->pool_index; struct mlx5_flow_counter_pool *pool; uint16_t n_valid; + int ret; - if (sh->cmng.pending_queries >= MLX5_MAX_PENDING_QUERIES) + if (cmng->pending_queries >= MLX5_MAX_PENDING_QUERIES) goto set_alarm; rte_spinlock_lock(&cmng->pool_update_sl); pool = cmng->pools[pool_index]; @@ -6776,8 +6775,7 @@ mlx5_flow_query_alarm(void *arg) if (pool->raw_hw) /* There is a pool query in progress. */ goto set_alarm; - pool->raw_hw = - LIST_FIRST(&sh->cmng.free_stat_raws); + pool->raw_hw = LIST_FIRST(&cmng->free_stat_raws); if (!pool->raw_hw) /* No free counter statistics raw memory. */ goto set_alarm; @@ -6803,12 +6801,12 @@ mlx5_flow_query_alarm(void *arg) goto set_alarm; } LIST_REMOVE(pool->raw_hw, next); - sh->cmng.pending_queries++; + cmng->pending_queries++; pool_index++; if (pool_index >= n_valid) pool_index = 0; set_alarm: - sh->cmng.pool_index = pool_index; + cmng->pool_index = pool_index; mlx5_set_query_alarm(sh); } diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index f25ee9f92f..1705e2a1f0 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4650,7 +4650,7 @@ flow_dv_counter_get_by_idx(struct rte_eth_dev *dev, /* Decrease to original index and clear shared bit. */ idx = (idx - 1) & (MLX5_CNT_SHARED_OFFSET - 1); - MLX5_ASSERT(idx / MLX5_COUNTERS_PER_POOL < cmng->n); + MLX5_ASSERT(idx / MLX5_COUNTERS_PER_POOL < MLX5_COUNTER_POOLS_MAX_NUM); pool = cmng->pools[idx / MLX5_COUNTERS_PER_POOL]; MLX5_ASSERT(pool); if (ppool) @@ -4726,39 +4726,6 @@ out: return pool; } -/** - * Resize a counter container. - * - * @param[in] dev - * Pointer to the Ethernet device structure. - * - * @return - * 0 on success, otherwise negative errno value and rte_errno is set. - */ -static int -flow_dv_container_resize(struct rte_eth_dev *dev) -{ - struct mlx5_priv *priv = dev->data->dev_private; - struct mlx5_flow_counter_mng *cmng = &priv->sh->cmng; - void *old_pools = cmng->pools; - uint32_t resize = cmng->n + MLX5_CNT_CONTAINER_RESIZE; - uint32_t mem_size = sizeof(struct mlx5_flow_counter_pool *) * resize; - void *pools = mlx5_malloc(MLX5_MEM_ZERO, mem_size, 0, SOCKET_ID_ANY); - - if (!pools) { - rte_errno = ENOMEM; - return -ENOMEM; - } - if (old_pools) - memcpy(pools, old_pools, cmng->n * - sizeof(struct mlx5_flow_counter_pool *)); - cmng->n = resize; - cmng->pools = pools; - if (old_pools) - mlx5_free(old_pools); - return 0; -} - /** * Query a devx flow counter. * @@ -4810,8 +4777,6 @@ _flow_dv_query_count(struct rte_eth_dev *dev, uint32_t counter, uint64_t *pkts, * The devX counter handle. * @param[in] age * Whether the pool is for counter that was allocated for aging. - * @param[in/out] cont_cur - * Pointer to the container pointer, it will be update in pool resize. * * @return * The pool container pointer on success, NULL otherwise and rte_errno is set. @@ -4823,9 +4788,14 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_flow_counter_pool *pool; struct mlx5_flow_counter_mng *cmng = &priv->sh->cmng; - bool fallback = priv->sh->cmng.counter_fallback; + bool fallback = cmng->counter_fallback; uint32_t size = sizeof(*pool); + if (cmng->n_valid == MLX5_COUNTER_POOLS_MAX_NUM) { + DRV_LOG(ERR, "All counter is in used, try again later."); + rte_errno = EAGAIN; + return NULL; + } size += MLX5_COUNTERS_PER_POOL * MLX5_CNT_SIZE; size += (!age ? 0 : MLX5_COUNTERS_PER_POOL * MLX5_AGE_SIZE); pool = mlx5_malloc(MLX5_MEM_ZERO, size, 0, SOCKET_ID_ANY); @@ -4844,11 +4814,6 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, pool->time_of_last_age_check = MLX5_CURR_TIME_SEC; rte_spinlock_lock(&cmng->pool_update_sl); pool->index = cmng->n_valid; - if (pool->index == cmng->n && flow_dv_container_resize(dev)) { - mlx5_free(pool); - rte_spinlock_unlock(&cmng->pool_update_sl); - return NULL; - } cmng->pools[pool->index] = pool; cmng->n_valid++; if (unlikely(fallback)) { @@ -9533,7 +9498,7 @@ flow_dv_aso_age_release(struct rte_eth_dev *dev, uint32_t age_idx) } /** - * Resize the ASO age pools array by MLX5_CNT_CONTAINER_RESIZE pools. + * Resize the ASO age pools array by MLX5_ASO_AGE_CONTAINER_RESIZE pools. * * @param[in] dev * Pointer to the Ethernet device structure. @@ -9547,7 +9512,7 @@ flow_dv_aso_age_pools_resize(struct rte_eth_dev *dev) struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_aso_age_mng *mng = priv->sh->aso_age_mng; void *old_pools = mng->pools; - uint32_t resize = mng->n + MLX5_CNT_CONTAINER_RESIZE; + uint32_t resize = mng->n + MLX5_ASO_AGE_CONTAINER_RESIZE; uint32_t mem_size = sizeof(struct mlx5_aso_age_pool *) * resize; void *pools = mlx5_malloc(MLX5_MEM_ZERO, mem_size, 0, SOCKET_ID_ANY); diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 6a755e7c36..340cea3a6b 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -274,27 +274,14 @@ flow_verbs_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id) break; } if (!cnt) { - struct mlx5_flow_counter_pool **pools; uint32_t size; - if (n_valid == cmng->n) { - /* Resize the container pool array. */ - size = sizeof(struct mlx5_flow_counter_pool *) * - (n_valid + MLX5_CNT_CONTAINER_RESIZE); - pools = mlx5_malloc(MLX5_MEM_ZERO, size, 0, - SOCKET_ID_ANY); - if (!pools) - return 0; - if (n_valid) { - memcpy(pools, cmng->pools, - sizeof(struct mlx5_flow_counter_pool *) * - n_valid); - mlx5_free(cmng->pools); - } - cmng->pools = pools; - cmng->n += MLX5_CNT_CONTAINER_RESIZE; + if (n_valid == MLX5_COUNTER_POOLS_MAX_NUM) { + DRV_LOG(ERR, "All counter is in used, try again later."); + rte_errno = EAGAIN; + return 0; } - /* Allocate memory for new pool*/ + /* Allocate memory for new pool */ size = sizeof(*pool) + sizeof(*cnt) * MLX5_COUNTERS_PER_POOL; pool = mlx5_malloc(MLX5_MEM_ZERO, size, 0, SOCKET_ID_ANY); if (!pool) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.008708071 +0000 +++ 0012-net-mlx5-fix-race-condition-in-counter-pool-resizing.patch 2022-11-17 23:07:55.472329917 +0000 @@ -1 +1 @@ -From a94e89e47b59ebaf84246bbb34c06e1a004cde8a Mon Sep 17 00:00:00 2001 +From 4951ff74e90470dfd51af5fe148e1ce9e674c7bb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a94e89e47b59ebaf84246bbb34c06e1a004cde8a ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -28,3 +29,3 @@ - drivers/net/mlx5/mlx5.c | 28 +++++++++++++--- - drivers/net/mlx5/mlx5.h | 7 ++-- - drivers/net/mlx5/mlx5_flow.c | 24 +++++++------- + drivers/net/mlx5/mlx5.c | 27 ++++++++++++--- + drivers/net/mlx5/mlx5.h | 5 +-- + drivers/net/mlx5/mlx5_flow.c | 22 ++++++------- @@ -33 +34 @@ - 5 files changed, 52 insertions(+), 83 deletions(-) + 5 files changed, 50 insertions(+), 80 deletions(-) @@ -36 +37 @@ -index 78234b116c..b85a56ec24 100644 +index 0b82969b4d..90985479de 100644 @@ -39 +40 @@ -@@ -561,18 +561,34 @@ mlx5_flow_counter_mode_config(struct rte_eth_dev *dev __rte_unused) +@@ -447,22 +447,38 @@ mlx5_flow_aging_init(struct mlx5_dev_ctx_shared *sh) @@ -51 +52,2 @@ - int i, j; + int i; ++ void *pools; @@ -53,25 +55,20 @@ - if (sh->config.dv_flow_en < 2) { -+ void *pools; -+ -+ pools = mlx5_malloc(MLX5_MEM_ZERO, -+ sizeof(struct mlx5_flow_counter_pool *) * -+ MLX5_COUNTER_POOLS_MAX_NUM, -+ 0, SOCKET_ID_ANY); -+ if (!pools) { -+ DRV_LOG(ERR, -+ "Counter management allocation was failed."); -+ rte_errno = ENOMEM; -+ return -rte_errno; -+ } - memset(&sh->sws_cmng, 0, sizeof(sh->sws_cmng)); - TAILQ_INIT(&sh->sws_cmng.flow_counters); - sh->sws_cmng.min_id = MLX5_CNT_BATCH_OFFSET; - sh->sws_cmng.max_id = -1; - sh->sws_cmng.last_pool_idx = POOL_IDX_INVALID; -+ sh->sws_cmng.pools = pools; - rte_spinlock_init(&sh->sws_cmng.pool_update_sl); - for (i = 0; i < MLX5_COUNTER_TYPE_MAX; i++) { - TAILQ_INIT(&sh->sws_cmng.counters[i]); -@@ -598,6 +614,7 @@ mlx5_flow_counters_mng_init(struct mlx5_dev_ctx_shared *sh) - sh->hws_max_log_bulk_sz = log_dcs; - sh->hws_max_nb_counters = max_nb_cnts; ++ pools = mlx5_malloc(MLX5_MEM_ZERO, ++ sizeof(struct mlx5_flow_counter_pool *) * ++ MLX5_COUNTER_POOLS_MAX_NUM, ++ 0, SOCKET_ID_ANY); ++ if (!pools) { ++ DRV_LOG(ERR, ++ "Counter management allocation was failed."); ++ rte_errno = ENOMEM; ++ return -rte_errno; ++ } + memset(&sh->cmng, 0, sizeof(sh->cmng)); + TAILQ_INIT(&sh->cmng.flow_counters); + sh->cmng.min_id = MLX5_CNT_BATCH_OFFSET; + sh->cmng.max_id = -1; + sh->cmng.last_pool_idx = POOL_IDX_INVALID; ++ sh->cmng.pools = pools; + rte_spinlock_init(&sh->cmng.pool_update_sl); + for (i = 0; i < MLX5_COUNTER_TYPE_MAX; i++) { + TAILQ_INIT(&sh->cmng.counters[i]); + rte_spinlock_init(&sh->cmng.csl[i]); @@ -83 +80 @@ -@@ -655,8 +672,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh) +@@ -520,8 +536,7 @@ mlx5_flow_counters_mng_close(struct mlx5_dev_ctx_shared *sh) @@ -93,3 +90,3 @@ -@@ -1572,8 +1588,12 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn, - if (err) - goto error; +@@ -1002,8 +1017,12 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn, + err = rte_errno; + goto error; @@ -104,3 +101,3 @@ - mlx5_flow_ipool_create(sh); - /* Add context to the global device list. */ - LIST_INSERT_HEAD(&mlx5_dev_ctx_list, sh, next); + mlx5_flow_ipool_create(sh, config); + /* Add device to memory callback list. */ + rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock); @@ -108 +105 @@ -index c9fcb71b69..cbe2d88b9e 100644 +index 6c85c4e2db..69fb34826d 100644 @@ -111,3 +108,3 @@ -@@ -386,11 +386,10 @@ struct mlx5_hw_q { - } __rte_cache_aligned; - +@@ -280,9 +280,10 @@ struct mlx5_lb_ctx { + uint16_t refcnt; /* Reference count for representors. */ + }; @@ -115,2 +111,0 @@ -- -- @@ -122,0 +118 @@ + #define IS_SHARED_CNT(cnt) (!!((cnt) & MLX5_CNT_SHARED_OFFSET)) @@ -124,2 +120 @@ - MLX5_CNT_BATCH_OFFSET) -@@ -549,7 +548,6 @@ TAILQ_HEAD(mlx5_counter_pools, mlx5_flow_counter_pool); +@@ -442,7 +443,6 @@ TAILQ_HEAD(mlx5_counter_pools, mlx5_flow_counter_pool); @@ -133 +128 @@ -@@ -621,6 +619,7 @@ struct mlx5_aso_age_action { +@@ -514,6 +514,7 @@ struct mlx5_aso_age_action { @@ -142 +137 @@ -index e28587da8e..78c92fe086 100644 +index 43fa595be1..f0c90a314b 100644 @@ -145 +140 @@ -@@ -9061,7 +9061,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) +@@ -6647,7 +6647,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) @@ -154 +149 @@ -@@ -9099,7 +9099,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) +@@ -6685,7 +6685,7 @@ mlx5_flow_create_counter_stat_mem_mng(struct mlx5_dev_ctx_shared *sh) @@ -157 +152 @@ - LIST_INSERT_HEAD(&sh->sws_cmng.free_stat_raws, + LIST_INSERT_HEAD(&sh->cmng.free_stat_raws, @@ -161,3 +156,3 @@ - LIST_INSERT_HEAD(&sh->sws_cmng.mem_mngs, mem_mng, next); - sh->sws_cmng.mem_mng = mem_mng; -@@ -9123,14 +9123,13 @@ mlx5_flow_set_counter_stat_mem(struct mlx5_dev_ctx_shared *sh, + LIST_INSERT_HEAD(&sh->cmng.mem_mngs, mem_mng, next); + sh->cmng.mem_mng = mem_mng; +@@ -6709,14 +6709,13 @@ mlx5_flow_set_counter_stat_mem(struct mlx5_dev_ctx_shared *sh, @@ -165 +160 @@ - struct mlx5_flow_counter_mng *cmng = &sh->sws_cmng; + struct mlx5_flow_counter_mng *cmng = &sh->cmng; @@ -180 +175 @@ -@@ -9172,13 +9171,13 @@ void +@@ -6758,13 +6757,13 @@ void @@ -185,2 +180,2 @@ -- uint16_t pool_index = sh->sws_cmng.pool_index; - struct mlx5_flow_counter_mng *cmng = &sh->sws_cmng; +- uint16_t pool_index = sh->cmng.pool_index; + struct mlx5_flow_counter_mng *cmng = &sh->cmng; @@ -192 +187 @@ -- if (sh->sws_cmng.pending_queries >= MLX5_MAX_PENDING_QUERIES) +- if (sh->cmng.pending_queries >= MLX5_MAX_PENDING_QUERIES) @@ -197 +192 @@ -@@ -9190,8 +9189,7 @@ mlx5_flow_query_alarm(void *arg) +@@ -6776,8 +6775,7 @@ mlx5_flow_query_alarm(void *arg) @@ -202 +197 @@ -- LIST_FIRST(&sh->sws_cmng.free_stat_raws); +- LIST_FIRST(&sh->cmng.free_stat_raws); @@ -207 +202 @@ -@@ -9217,12 +9215,12 @@ mlx5_flow_query_alarm(void *arg) +@@ -6803,12 +6801,12 @@ mlx5_flow_query_alarm(void *arg) @@ -211 +206 @@ -- sh->sws_cmng.pending_queries++; +- sh->cmng.pending_queries++; @@ -217 +212 @@ -- sh->sws_cmng.pool_index = pool_index; +- sh->cmng.pool_index = pool_index; @@ -222,9 +216,0 @@ -@@ -9753,7 +9751,7 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev, - } - - /* get counter */ -- MLX5_ASSERT(cmng->n_valid <= cmng->n); -+ MLX5_ASSERT(cmng->n_valid <= MLX5_COUNTER_POOLS_MAX_NUM); - max = MLX5_COUNTERS_PER_POOL * cmng->n_valid; - for (j = 1; j <= max; j++) { - action = NULL; @@ -232 +218 @@ -index 1e52278191..e77cbb862b 100644 +index f25ee9f92f..1705e2a1f0 100644 @@ -235 +221 @@ -@@ -6091,7 +6091,7 @@ flow_dv_counter_get_by_idx(struct rte_eth_dev *dev, +@@ -4650,7 +4650,7 @@ flow_dv_counter_get_by_idx(struct rte_eth_dev *dev, @@ -244 +230 @@ -@@ -6167,39 +6167,6 @@ out: +@@ -4726,39 +4726,6 @@ out: @@ -261 +247 @@ -- struct mlx5_flow_counter_mng *cmng = &priv->sh->sws_cmng; +- struct mlx5_flow_counter_mng *cmng = &priv->sh->cmng; @@ -284 +270 @@ -@@ -6251,8 +6218,6 @@ _flow_dv_query_count(struct rte_eth_dev *dev, uint32_t counter, uint64_t *pkts, +@@ -4810,8 +4777,6 @@ _flow_dv_query_count(struct rte_eth_dev *dev, uint32_t counter, uint64_t *pkts, @@ -293 +279 @@ -@@ -6264,9 +6229,14 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, +@@ -4823,9 +4788,14 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, @@ -296,2 +282,2 @@ - struct mlx5_flow_counter_mng *cmng = &priv->sh->sws_cmng; -- bool fallback = priv->sh->sws_cmng.counter_fallback; + struct mlx5_flow_counter_mng *cmng = &priv->sh->cmng; +- bool fallback = priv->sh->cmng.counter_fallback; @@ -309 +295 @@ -@@ -6285,11 +6255,6 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, +@@ -4844,11 +4814,6 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs, @@ -321 +307 @@ -@@ -12511,7 +12476,7 @@ flow_dv_aso_age_release(struct rte_eth_dev *dev, uint32_t age_idx) +@@ -9533,7 +9498,7 @@ flow_dv_aso_age_release(struct rte_eth_dev *dev, uint32_t age_idx) @@ -330 +316 @@ -@@ -12525,7 +12490,7 @@ flow_dv_aso_age_pools_resize(struct rte_eth_dev *dev) +@@ -9547,7 +9512,7 @@ flow_dv_aso_age_pools_resize(struct rte_eth_dev *dev) @@ -340 +326 @@ -index 81a33ddf09..4bca685674 100644 +index 6a755e7c36..340cea3a6b 100644 @@ -343 +329 @@ -@@ -232,27 +232,14 @@ flow_verbs_counter_new(struct rte_eth_dev *dev, uint32_t id __rte_unused) +@@ -274,27 +274,14 @@ flow_verbs_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix hairpin split with set VLAN VID action' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (10 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix race condition in counter pool resizing' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix first segment inline length' " luca.boccassi ` (20 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/981419d628ed4c8541faa279819a9607e99246ca Thanks. Luca Boccassi --- From 981419d628ed4c8541faa279819a9607e99246ca Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski <dsosnowski@nvidia.com> Date: Mon, 7 Nov 2022 10:28:52 +0000 Subject: [PATCH] net/mlx5: fix hairpin split with set VLAN VID action [ upstream commit 5615d27b7a1bda7cc58ef07c2e77c6f9a7792c1d ] Before this patch any flow rule which works on hairpin queues and which has OF_SET_VLAN_VID action was split into 2 flow rules: - one subflow for Rx, - one subflow for Tx. OF_SET_VLAN_VID action was always placed in the Tx subflow. Assuming a flow rule which matches VLAN traffic and has both OF_SET_VLAN_VID action, and MODIFY_FIELD action on VLAN VID, but no OF_PUSH_VLAN action, the following happened: - MODIFY_FIELD action was placed in Rx subflow, - OF_SET_VLAN_VID action was placed in Tx subflow, - OF_SET_VLAN_VID action is internally compiled to a header modify command. This caused the following issues: 1. Since OF_SET_VLAN_VID was placed in Tx subflow, 2 header modify actions were allocated. One for Rx and one for Tx. 2. If OF_SET_VLAN_VID action was placed before MODIFY_FIELD on VLAN VID, the flow rule executed header modifications in reverse order. MODIFY_FIELD actions were executed first in the Rx subflow and OF_SET_VLAN_VID was executed second in Tx subflow. This patch fixes this behavior by not splitting hairpin flow rules if OF_SET_VLAN_VID action is used without OF_PUSH_VLAN. On top of that, if flow rule is split, the OF_SET_VLAN_VID action is not moved to Tx subflow (for flow rules mentioned above). Fixes: 210008309b45 ("net/mlx5: fix VLAN push action on hairpin queue") Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_flow.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f0c90a314b..87d55fc6be 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -3729,6 +3729,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, int queue_action = 0; int action_n = 0; int split = 0; + int push_vlan = 0; const struct rte_flow_action_queue *queue; const struct rte_flow_action_rss *rss; const struct rte_flow_action_raw_encap *raw_encap; @@ -3737,6 +3738,8 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, if (!attr->ingress) return 0; for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) { + if (actions->type == RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN) + push_vlan = 1; switch (actions->type) { case RTE_FLOW_ACTION_TYPE_QUEUE: queue = actions->conf; @@ -3761,11 +3764,15 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP: case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP: case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: - case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP: split++; action_n++; break; + case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: + if (push_vlan) + split++; + action_n++; + break; case RTE_FLOW_ACTION_TYPE_RAW_ENCAP: raw_encap = actions->conf; if (raw_encap->size > MLX5_ENCAPSULATION_DECISION_SIZE) @@ -4177,19 +4184,32 @@ flow_hairpin_split(struct rte_eth_dev *dev, struct mlx5_rte_flow_item_tag *tag_item; struct rte_flow_item *item; char *addr; + int push_vlan = 0; int encap = 0; for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) { + if (actions->type == RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN) + push_vlan = 1; switch (actions->type) { case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP: case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP: case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: - case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP: rte_memcpy(actions_tx, actions, sizeof(struct rte_flow_action)); actions_tx++; break; + case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: + if (push_vlan) { + rte_memcpy(actions_tx, actions, + sizeof(struct rte_flow_action)); + actions_tx++; + } else { + rte_memcpy(actions_rx, actions, + sizeof(struct rte_flow_action)); + actions_rx++; + } + break; case RTE_FLOW_ACTION_TYPE_COUNT: if (encap) { rte_memcpy(actions_tx, actions, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.070938141 +0000 +++ 0013-net-mlx5-fix-hairpin-split-with-set-VLAN-VID-action.patch 2022-11-17 23:07:55.480330097 +0000 @@ -1 +1 @@ -From 5615d27b7a1bda7cc58ef07c2e77c6f9a7792c1d Mon Sep 17 00:00:00 2001 +From 981419d628ed4c8541faa279819a9607e99246ca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5615d27b7a1bda7cc58ef07c2e77c6f9a7792c1d ] + @@ -38 +39,0 @@ -Cc: stable@dpdk.org @@ -47 +48 @@ -index 65af1b4dd5..ea88882b88 100644 +index f0c90a314b..87d55fc6be 100644 @@ -50 +51 @@ -@@ -4591,6 +4591,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, +@@ -3729,6 +3729,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, @@ -58 +59 @@ -@@ -4599,6 +4600,8 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, +@@ -3737,6 +3738,8 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, @@ -67 +68 @@ -@@ -4623,11 +4626,15 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, +@@ -3761,11 +3764,15 @@ flow_check_hairpin_split(struct rte_eth_dev *dev, @@ -84 +85 @@ -@@ -5088,19 +5095,32 @@ flow_hairpin_split(struct rte_eth_dev *dev, +@@ -4177,19 +4184,32 @@ flow_hairpin_split(struct rte_eth_dev *dev, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix first segment inline length' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (11 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix hairpin split with set VLAN VID action' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix port initialization with small LRO' " luca.boccassi ` (19 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c8c70e90664f5a9eb87737b2ad2ffafade607b29 Thanks. Luca Boccassi --- From c8c70e90664f5a9eb87737b2ad2ffafade607b29 Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev <akozyrev@nvidia.com> Date: Tue, 8 Nov 2022 15:45:00 +0200 Subject: [PATCH] net/mlx5: fix first segment inline length [ upstream commit da4470cb178b87c9637cb575719e022182ea38da ] Packets can be split into several mbufs with various data sizes. There is no limitation on how small these segments can be. But there is a limitation on Tx side for inline configuration: send WQEs with inline headers less than the required are dropped. The very first segment must be more than minimal inline eth segment. Enforce this requirement by merging a few segments in this case. Fixes: ec837ad0fc7c ("net/mlx5: fix multi-segment inline for the first segments") Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com> --- drivers/net/mlx5/mlx5_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index fb4b8544ae..12a1eff681 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -3490,6 +3490,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, } else if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE || nxlen > txq->inlen_send) { return mlx5_tx_packet_multi_send(txq, loc, olx); + } else if (nxlen <= MLX5_ESEG_MIN_INLINE_SIZE) { + inlen = MLX5_ESEG_MIN_INLINE_SIZE; } else { goto do_first; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.116889750 +0000 +++ 0014-net-mlx5-fix-first-segment-inline-length.patch 2022-11-17 23:07:55.484330187 +0000 @@ -1 +1 @@ -From da4470cb178b87c9637cb575719e022182ea38da Mon Sep 17 00:00:00 2001 +From c8c70e90664f5a9eb87737b2ad2ffafade607b29 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit da4470cb178b87c9637cb575719e022182ea38da ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ - drivers/net/mlx5/mlx5_tx.h | 2 ++ + drivers/net/mlx5/mlx5_rxtx.c | 2 ++ @@ -22,6 +23,6 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index 6471ebf59f..a44050a1ce 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -1994,6 +1994,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, - } else if (mbuf->ol_flags & RTE_MBUF_F_TX_DYNF_NOINLINE || +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index fb4b8544ae..12a1eff681 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -3490,6 +3490,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, + } else if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE || ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix port initialization with small LRO' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (12 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix first segment inline length' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix port event cleaning order' " luca.boccassi ` (18 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ff0263d0f18a44a27c61a2e5c554d13be184f103 Thanks. Luca Boccassi --- From ff0263d0f18a44a27c61a2e5c554d13be184f103 Mon Sep 17 00:00:00 2001 From: Gregory Etelson <getelson@nvidia.com> Date: Wed, 9 Nov 2022 18:50:38 +0200 Subject: [PATCH] net/mlx5: fix port initialization with small LRO [ upstream commit b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 ] If application provided maximal LRO size was less than expected PMD minimum, the PMD either crashed with assert, if asserts were enabled, or proceeded with port initialization to set port private maximal LRO size below supported minimum. The patch terminates port start if LRO size does not match PMD requirements and TCP LRO offload was requested at least for one Rx queue. Fixes: 50c00baff763 ("net/mlx5: limit LRO size to maximum Rx packet") Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5_rxq.c | 1 - drivers/net/mlx5/mlx5_trigger.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index cb79a8b772..048d1c571b 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, MLX5_MAX_TCP_HDR_OFFSET) max_lro_size -= MLX5_MAX_TCP_HDR_OFFSET; max_lro_size = RTE_MIN(max_lro_size, MLX5_MAX_LRO_SIZE); - MLX5_ASSERT(max_lro_size >= MLX5_LRO_SEG_CHUNK_SIZE); max_lro_size /= MLX5_LRO_SEG_CHUNK_SIZE; if (priv->max_lro_msg_size) priv->max_lro_msg_size = diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 9b82ee40fd..3440947f3e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1070,6 +1070,22 @@ mlx5_dev_start(struct rte_eth_dev *dev) else rte_net_mlx5_dynf_inline_mask = 0; if (dev->data->nb_rx_queues > 0) { + uint32_t max_lro_msg_size = priv->max_lro_msg_size; + + if (max_lro_msg_size < MLX5_LRO_SEG_CHUNK_SIZE) { + uint32_t i; + struct mlx5_rxq_ctrl *rxq_ctrl; + + for (i = 0; i != priv->rxqs_n; ++i) { + rxq_ctrl = mlx5_rxq_get(dev, i); + if (rxq_ctrl && rxq_ctrl->rxq.lro) { + DRV_LOG(ERR, "port %u invalid max LRO size", + dev->data->port_id); + rte_errno = EINVAL; + return -rte_errno; + } + } + } ret = mlx5_dev_configure_rss_reta(dev); if (ret) { DRV_LOG(ERR, "port %u reta config failed: %s", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.154712231 +0000 +++ 0015-net-mlx5-fix-port-initialization-with-small-LRO.patch 2022-11-17 23:07:55.488330277 +0000 @@ -1 +1 @@ -From b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 Mon Sep 17 00:00:00 2001 +From ff0263d0f18a44a27c61a2e5c554d13be184f103 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b9f1f4c2394d1fd03ec2e27f8bad6c24153fa228 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 0d9d11680b..724cd6c7e6 100644 +index cb79a8b772..048d1c571b 100644 @@ -29 +30 @@ -@@ -1533,7 +1533,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, +@@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, @@ -38 +39 @@ -index 4b821a1076..71089299b8 100644 +index 9b82ee40fd..3440947f3e 100644 @@ -41 +42 @@ -@@ -1167,6 +1167,22 @@ continue_dev_start: +@@ -1070,6 +1070,22 @@ mlx5_dev_start(struct rte_eth_dev *dev) @@ -49 +50 @@ -+ struct mlx5_rxq_priv *rxq; ++ struct mlx5_rxq_ctrl *rxq_ctrl; @@ -52,2 +53,2 @@ -+ rxq = mlx5_rxq_get(dev, i); -+ if (rxq && rxq->ctrl && rxq->ctrl->rxq.lro) { ++ rxq_ctrl = mlx5_rxq_get(dev, i); ++ if (rxq_ctrl && rxq_ctrl->rxq.lro) { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (13 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix port initialization with small LRO' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-18 12:53 ` Michael Baum 2022-11-17 23:08 ` patch 'net/mlx5: fix drop action validation' " luca.boccassi ` (17 subsequent siblings) 32 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Michael Baum; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/79c37d65d2ff68ccd8dd2ad99340f54c80232918 Thanks. Luca Boccassi --- From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 2001 From: Michael Baum <michaelba@nvidia.com> Date: Thu, 10 Nov 2022 00:29:38 +0200 Subject: [PATCH] net/mlx5: fix port event cleaning order [ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] The shared IB device (sh) has per port data with filed for interrupt handler port_id. It used by shared interrupt handler to find the corresponding rte_eth device by IB port index. If value is equal or greater RTE_MAX_ETHPORTS it means there is no subhandler installed for specified IB port index. When a few ports are created under same sh, the sh is created with the first port and the interrupt handler port_id is initialized to RTE_MAX_ETHPORTS for each port. In port creation, the interrupt handler port_id is updated with the correct value. Since this updating, the mlx5_dev_interrupt_nl_cb function uses this port and its priv structure. However, when the ports are closed, this filed isn't updated and the interrupt handler continue working until it is uninstalled in SH destruction. If mlx5_dev_interrupt_nl_cb is called between port closing and SH destruction, it uses invalid port causing a crash. This patch adds interrupt handler port_id updating to the close function and add memory barrier to make sure it is done before priv reset. Fixes: 655c3c26c11e ("net/mlx5: fix initial link status detection") Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/linux/mlx5_os.c | 3 +++ drivers/net/mlx5/mlx5.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index af19b54b7e..e79b1a275c 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1640,6 +1640,9 @@ err_secondary: return eth_dev; error: if (priv) { + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = + RTE_MAX_ETHPORTS; + rte_io_wmb(); if (priv->mreg_cp_tbl) mlx5_hlist_destroy(priv->mreg_cp_tbl); if (priv->sh) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 90985479de..22d3ecace2 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) if (!c) claim_zero(rte_eth_switch_domain_free(priv->domain_id)); } + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = RTE_MAX_ETHPORTS; + /* + * The interrupt handler port id must be reset before priv is reset + * since 'mlx5_dev_interrupt_nl_cb' uses priv. + */ + rte_io_wmb(); memset(priv, 0, sizeof(*priv)); priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID; /* -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.193400526 +0000 +++ 0016-net-mlx5-fix-port-event-cleaning-order.patch 2022-11-17 23:07:55.492330367 +0000 @@ -1 +1 @@ -From 13c5c093905c09bb6207ee1c6a4f05d39f8badcd Mon Sep 17 00:00:00 2001 +From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] + @@ -28 +29,0 @@ -Cc: stable@dpdk.org @@ -38 +39 @@ -index 2b6741396d..a71474c90a 100644 +index af19b54b7e..e79b1a275c 100644 @@ -41 +42 @@ -@@ -1676,6 +1676,9 @@ err_secondary: +@@ -1640,6 +1640,9 @@ err_secondary: @@ -48,3 +49,3 @@ - #ifdef HAVE_MLX5_HWS_SUPPORT - if (eth_dev && - priv->sh && + if (priv->mreg_cp_tbl) + mlx5_hlist_destroy(priv->mreg_cp_tbl); + if (priv->sh) @@ -52 +53 @@ -index 1cf6df6049..95b0151fbc 100644 +index 90985479de..22d3ecace2 100644 @@ -55 +56 @@ -@@ -2137,6 +2137,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) +@@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* RE: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/mlx5: fix port event cleaning order' " luca.boccassi @ 2022-11-18 12:53 ` Michael Baum 2022-11-18 14:27 ` Luca Boccassi 0 siblings, 1 reply; 207+ messages in thread From: Michael Baum @ 2022-11-18 12:53 UTC (permalink / raw) To: luca.boccassi; +Cc: Matan Azrad, dpdk stable Hi Luca, This patch causes another issue, so I have sent another patch to squash into. The title of this patch is: " [PATCH 20.11] net/mlx5: fix invalid memory access in port closing" Thanks, Michael Baum > -----Original Message----- > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com> > Sent: Friday, 18 November 2022 1:09 > To: Michael Baum <michaelba@nvidia.com> > Cc: Matan Azrad <matan@nvidia.com>; dpdk stable <stable@dpdk.org> > Subject: patch 'net/mlx5: fix port event cleaning order' has been queued to > stable release 20.11.7 > > External email: Use caution opening links or attachments > > > Hi, > > FYI, your patch has been queued to stable release 20.11.7 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 11/19/22. So please shout if > anyone has objections. > > Also note that after the patch there's a diff of the upstream commit vs the patch > applied to the branch. This will indicate if there was any rebasing needed to > apply to the stable branch. If there were code changes for rebasing > (ie: not only metadata diffs), please double check that the rebase was correctly > done. > > Queued patches are on a temporary branch at: > https://github.com/kevintraynor/dpdk-stable > > This queued commit can be viewed at: > https://github.com/kevintraynor/dpdk- > stable/commit/79c37d65d2ff68ccd8dd2ad99340f54c80232918 > > Thanks. > > Luca Boccassi > > --- > From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 2001 > From: Michael Baum <michaelba@nvidia.com> > Date: Thu, 10 Nov 2022 00:29:38 +0200 > Subject: [PATCH] net/mlx5: fix port event cleaning order > > [ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > > The shared IB device (sh) has per port data with filed for interrupt handler > port_id. It used by shared interrupt handler to find the corresponding rte_eth > device by IB port index. > If value is equal or greater RTE_MAX_ETHPORTS it means there is no subhandler > installed for specified IB port index. > > When a few ports are created under same sh, the sh is created with the first port > and the interrupt handler port_id is initialized to RTE_MAX_ETHPORTS for each > port. > In port creation, the interrupt handler port_id is updated with the correct value. > Since this updating, the mlx5_dev_interrupt_nl_cb function uses this port and its > priv structure. > However, when the ports are closed, this filed isn't updated and the interrupt > handler continue working until it is uninstalled in SH destruction. > If mlx5_dev_interrupt_nl_cb is called between port closing and SH destruction, it > uses invalid port causing a crash. > > This patch adds interrupt handler port_id updating to the close function and add > memory barrier to make sure it is done before priv reset. > > Fixes: 655c3c26c11e ("net/mlx5: fix initial link status detection") > > Signed-off-by: Michael Baum <michaelba@nvidia.com> > Acked-by: Matan Azrad <matan@nvidia.com> > --- > drivers/net/mlx5/linux/mlx5_os.c | 3 +++ > drivers/net/mlx5/mlx5.c | 6 ++++++ > 2 files changed, 9 insertions(+) > > diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c > index af19b54b7e..e79b1a275c 100644 > --- a/drivers/net/mlx5/linux/mlx5_os.c > +++ b/drivers/net/mlx5/linux/mlx5_os.c > @@ -1640,6 +1640,9 @@ err_secondary: > return eth_dev; > error: > if (priv) { > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = > + RTE_MAX_ETHPORTS; > + rte_io_wmb(); > if (priv->mreg_cp_tbl) > mlx5_hlist_destroy(priv->mreg_cp_tbl); > if (priv->sh) > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > 90985479de..22d3ecace2 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > if (!c) > claim_zero(rte_eth_switch_domain_free(priv->domain_id)); > } > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = RTE_MAX_ETHPORTS; > + /* > + * The interrupt handler port id must be reset before priv is reset > + * since 'mlx5_dev_interrupt_nl_cb' uses priv. > + */ > + rte_io_wmb(); > memset(priv, 0, sizeof(*priv)); > priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID; > /* > -- > 2.34.1 > > --- > Diff of the applied patch vs upstream commit (please double-check if non- > empty: > --- > --- - 2022-11-17 23:07:56.193400526 +0000 > +++ 0016-net-mlx5-fix-port-event-cleaning-order.patch 2022-11-17 > 23:07:55.492330367 +0000 > @@ -1 +1 @@ > -From 13c5c093905c09bb6207ee1c6a4f05d39f8badcd Mon Sep 17 00:00:00 > 2001 > +From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 > 2001 > @@ -5,0 +6,2 @@ > +[ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > + > @@ -28 +29,0 @@ > -Cc: stable@dpdk.org > @@ -38 +39 @@ > -index 2b6741396d..a71474c90a 100644 > +index af19b54b7e..e79b1a275c 100644 > @@ -41 +42 @@ > -@@ -1676,6 +1676,9 @@ err_secondary: > +@@ -1640,6 +1640,9 @@ err_secondary: > @@ -48,3 +49,3 @@ > - #ifdef HAVE_MLX5_HWS_SUPPORT > - if (eth_dev && > - priv->sh && > + if (priv->mreg_cp_tbl) > + mlx5_hlist_destroy(priv->mreg_cp_tbl); > + if (priv->sh) > @@ -52 +53 @@ > -index 1cf6df6049..95b0151fbc 100644 > +index 90985479de..22d3ecace2 100644 > @@ -55 +56 @@ > -@@ -2137,6 +2137,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > +@@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* Re: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-18 12:53 ` Michael Baum @ 2022-11-18 14:27 ` Luca Boccassi 2022-11-20 7:28 ` Michael Baum 0 siblings, 1 reply; 207+ messages in thread From: Luca Boccassi @ 2022-11-18 14:27 UTC (permalink / raw) To: Michael Baum; +Cc: Matan Azrad, dpdk stable On Fri, 2022-11-18 at 12:53 +0000, Michael Baum wrote: > Hi Luca, > > This patch causes another issue, so I have sent another patch to squash into. > > The title of this patch is: " [PATCH 20.11] net/mlx5: fix invalid memory access in port closing" > > Thanks, > Michael Baum Is it a backport gone wrong (or an issue specific to 20.11), or is it an issue also in the same change that went in main? If the latter, what's the commit id of the fix? > > -----Original Message----- > > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com> > > Sent: Friday, 18 November 2022 1:09 > > To: Michael Baum <michaelba@nvidia.com> > > Cc: Matan Azrad <matan@nvidia.com>; dpdk stable <stable@dpdk.org> > > Subject: patch 'net/mlx5: fix port event cleaning order' has been queued to > > stable release 20.11.7 > > > > External email: Use caution opening links or attachments > > > > > > Hi, > > > > FYI, your patch has been queued to stable release 20.11.7 > > > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > > It will be pushed if I get no objections before 11/19/22. So please shout if > > anyone has objections. > > > > Also note that after the patch there's a diff of the upstream commit vs the patch > > applied to the branch. This will indicate if there was any rebasing needed to > > apply to the stable branch. If there were code changes for rebasing > > (ie: not only metadata diffs), please double check that the rebase was correctly > > done. > > > > Queued patches are on a temporary branch at: > > https://github.com/kevintraynor/dpdk-stable > > > > This queued commit can be viewed at: > > https://github.com/kevintraynor/dpdk- > > stable/commit/79c37d65d2ff68ccd8dd2ad99340f54c80232918 > > > > Thanks. > > > > Luca Boccassi > > > > --- > > From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 2001 > > From: Michael Baum <michaelba@nvidia.com> > > Date: Thu, 10 Nov 2022 00:29:38 +0200 > > Subject: [PATCH] net/mlx5: fix port event cleaning order > > > > [ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > > > > The shared IB device (sh) has per port data with filed for interrupt handler > > port_id. It used by shared interrupt handler to find the corresponding rte_eth > > device by IB port index. > > If value is equal or greater RTE_MAX_ETHPORTS it means there is no subhandler > > installed for specified IB port index. > > > > When a few ports are created under same sh, the sh is created with the first port > > and the interrupt handler port_id is initialized to RTE_MAX_ETHPORTS for each > > port. > > In port creation, the interrupt handler port_id is updated with the correct value. > > Since this updating, the mlx5_dev_interrupt_nl_cb function uses this port and its > > priv structure. > > However, when the ports are closed, this filed isn't updated and the interrupt > > handler continue working until it is uninstalled in SH destruction. > > If mlx5_dev_interrupt_nl_cb is called between port closing and SH destruction, it > > uses invalid port causing a crash. > > > > This patch adds interrupt handler port_id updating to the close function and add > > memory barrier to make sure it is done before priv reset. > > > > Fixes: 655c3c26c11e ("net/mlx5: fix initial link status detection") > > > > Signed-off-by: Michael Baum <michaelba@nvidia.com> > > Acked-by: Matan Azrad <matan@nvidia.com> > > --- > > drivers/net/mlx5/linux/mlx5_os.c | 3 +++ > > drivers/net/mlx5/mlx5.c | 6 ++++++ > > 2 files changed, 9 insertions(+) > > > > diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c > > index af19b54b7e..e79b1a275c 100644 > > --- a/drivers/net/mlx5/linux/mlx5_os.c > > +++ b/drivers/net/mlx5/linux/mlx5_os.c > > @@ -1640,6 +1640,9 @@ err_secondary: > > return eth_dev; > > error: > > if (priv) { > > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = > > + RTE_MAX_ETHPORTS; > > + rte_io_wmb(); > > if (priv->mreg_cp_tbl) > > mlx5_hlist_destroy(priv->mreg_cp_tbl); > > if (priv->sh) > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > > 90985479de..22d3ecace2 100644 > > --- a/drivers/net/mlx5/mlx5.c > > +++ b/drivers/net/mlx5/mlx5.c > > @@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > > if (!c) > > claim_zero(rte_eth_switch_domain_free(priv->domain_id)); > > } > > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = RTE_MAX_ETHPORTS; > > + /* > > + * The interrupt handler port id must be reset before priv is reset > > + * since 'mlx5_dev_interrupt_nl_cb' uses priv. > > + */ > > + rte_io_wmb(); > > memset(priv, 0, sizeof(*priv)); > > priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID; > > /* > > -- > > 2.34.1 > > > > --- > > Diff of the applied patch vs upstream commit (please double-check if non- > > empty: > > --- > > --- - 2022-11-17 23:07:56.193400526 +0000 > > +++ 0016-net-mlx5-fix-port-event-cleaning-order.patch 2022-11-17 > > 23:07:55.492330367 +0000 > > @@ -1 +1 @@ > > -From 13c5c093905c09bb6207ee1c6a4f05d39f8badcd Mon Sep 17 00:00:00 > > 2001 > > +From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 > > 2001 > > @@ -5,0 +6,2 @@ > > +[ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > > + > > @@ -28 +29,0 @@ > > -Cc: stable@dpdk.org > > @@ -38 +39 @@ > > -index 2b6741396d..a71474c90a 100644 > > +index af19b54b7e..e79b1a275c 100644 > > @@ -41 +42 @@ > > -@@ -1676,6 +1676,9 @@ err_secondary: > > +@@ -1640,6 +1640,9 @@ err_secondary: > > @@ -48,3 +49,3 @@ > > - #ifdef HAVE_MLX5_HWS_SUPPORT > > - if (eth_dev && > > - priv->sh && > > + if (priv->mreg_cp_tbl) > > + mlx5_hlist_destroy(priv->mreg_cp_tbl); > > + if (priv->sh) > > @@ -52 +53 @@ > > -index 1cf6df6049..95b0151fbc 100644 > > +index 90985479de..22d3ecace2 100644 > > @@ -55 +56 @@ > > -@@ -2137,6 +2137,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > > +@@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* RE: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-18 14:27 ` Luca Boccassi @ 2022-11-20 7:28 ` Michael Baum 2022-11-21 14:12 ` Luca Boccassi 0 siblings, 1 reply; 207+ messages in thread From: Michael Baum @ 2022-11-20 7:28 UTC (permalink / raw) To: Luca Boccassi; +Cc: Matan Azrad, dpdk stable On Fri, 2022-11-18 at 16:28, Luca Boccassi wrote: > > On Fri, 2022-11-18 at 12:53 +0000, Michael Baum wrote: > > Hi Luca, > > > > This patch causes another issue, so I have sent another patch to squash into. > > > > The title of this patch is: " [PATCH 20.11] net/mlx5: fix invalid memory access > in port closing" > > > > Thanks, > > Michael Baum > > Is it a backport gone wrong (or an issue specific to 20.11), or is it an issue also in > the same change that went in main? If the latter, what's the commit id of the > fix? The issue also in the same change that went in main. I sent the fix and it isn't merged yet, the fix in patchwork: https://patchwork.dpdk.org/project/dpdk/patch/20221117152807.1259256-1-michaelba@nvidia.com/ > > > > -----Original Message----- > > > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com> > > > Sent: Friday, 18 November 2022 1:09 > > > To: Michael Baum <michaelba@nvidia.com> > > > Cc: Matan Azrad <matan@nvidia.com>; dpdk stable <stable@dpdk.org> > > > Subject: patch 'net/mlx5: fix port event cleaning order' has been > > > queued to stable release 20.11.7 > > > > > > External email: Use caution opening links or attachments > > > > > > > > > Hi, > > > > > > FYI, your patch has been queued to stable release 20.11.7 > > > > > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > > > It will be pushed if I get no objections before 11/19/22. So please > > > shout if anyone has objections. > > > > > > Also note that after the patch there's a diff of the upstream commit > > > vs the patch applied to the branch. This will indicate if there was > > > any rebasing needed to apply to the stable branch. If there were > > > code changes for rebasing > > > (ie: not only metadata diffs), please double check that the rebase > > > was correctly done. > > > > > > Queued patches are on a temporary branch at: > > > https://github.com/kevintraynor/dpdk-stable > > > > > > This queued commit can be viewed at: > > > https://github.com/kevintraynor/dpdk- > > > stable/commit/79c37d65d2ff68ccd8dd2ad99340f54c80232918 > > > > > > Thanks. > > > > > > Luca Boccassi > > > > > > --- > > > From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 > > > 2001 > > > From: Michael Baum <michaelba@nvidia.com> > > > Date: Thu, 10 Nov 2022 00:29:38 +0200 > > > Subject: [PATCH] net/mlx5: fix port event cleaning order > > > > > > [ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > > > > > > The shared IB device (sh) has per port data with filed for interrupt > > > handler port_id. It used by shared interrupt handler to find the > > > corresponding rte_eth device by IB port index. > > > If value is equal or greater RTE_MAX_ETHPORTS it means there is no > > > subhandler installed for specified IB port index. > > > > > > When a few ports are created under same sh, the sh is created with > > > the first port and the interrupt handler port_id is initialized to > > > RTE_MAX_ETHPORTS for each port. > > > In port creation, the interrupt handler port_id is updated with the correct > value. > > > Since this updating, the mlx5_dev_interrupt_nl_cb function uses this > > > port and its priv structure. > > > However, when the ports are closed, this filed isn't updated and the > > > interrupt handler continue working until it is uninstalled in SH destruction. > > > If mlx5_dev_interrupt_nl_cb is called between port closing and SH > > > destruction, it uses invalid port causing a crash. > > > > > > This patch adds interrupt handler port_id updating to the close > > > function and add memory barrier to make sure it is done before priv reset. > > > > > > Fixes: 655c3c26c11e ("net/mlx5: fix initial link status detection") > > > > > > Signed-off-by: Michael Baum <michaelba@nvidia.com> > > > Acked-by: Matan Azrad <matan@nvidia.com> > > > --- > > > drivers/net/mlx5/linux/mlx5_os.c | 3 +++ > > > drivers/net/mlx5/mlx5.c | 6 ++++++ > > > 2 files changed, 9 insertions(+) > > > > > > diff --git a/drivers/net/mlx5/linux/mlx5_os.c > > > b/drivers/net/mlx5/linux/mlx5_os.c > > > index af19b54b7e..e79b1a275c 100644 > > > --- a/drivers/net/mlx5/linux/mlx5_os.c > > > +++ b/drivers/net/mlx5/linux/mlx5_os.c > > > @@ -1640,6 +1640,9 @@ err_secondary: > > > return eth_dev; > > > error: > > > if (priv) { > > > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = > > > + RTE_MAX_ETHPORTS; > > > + rte_io_wmb(); > > > if (priv->mreg_cp_tbl) > > > mlx5_hlist_destroy(priv->mreg_cp_tbl); > > > if (priv->sh) > > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > > > 90985479de..22d3ecace2 100644 > > > --- a/drivers/net/mlx5/mlx5.c > > > +++ b/drivers/net/mlx5/mlx5.c > > > @@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > > > if (!c) > > > claim_zero(rte_eth_switch_domain_free(priv->domain_id)); > > > } > > > + priv->sh->port[priv->dev_port - 1].nl_ih_port_id = > RTE_MAX_ETHPORTS; > > > + /* > > > + * The interrupt handler port id must be reset before priv is reset > > > + * since 'mlx5_dev_interrupt_nl_cb' uses priv. > > > + */ > > > + rte_io_wmb(); > > > memset(priv, 0, sizeof(*priv)); > > > priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID; > > > /* > > > -- > > > 2.34.1 > > > > > > --- > > > Diff of the applied patch vs upstream commit (please double-check > > > if non- > > > empty: > > > --- > > > --- - 2022-11-17 23:07:56.193400526 +0000 > > > +++ 0016-net-mlx5-fix-port-event-cleaning-order.patch 2022-11-17 > > > 23:07:55.492330367 +0000 > > > @@ -1 +1 @@ > > > -From 13c5c093905c09bb6207ee1c6a4f05d39f8badcd Mon Sep 17 00:00:00 > > > 2001 > > > +From 79c37d65d2ff68ccd8dd2ad99340f54c80232918 Mon Sep 17 00:00:00 > > > 2001 > > > @@ -5,0 +6,2 @@ > > > +[ upstream commit 13c5c093905c09bb6207ee1c6a4f05d39f8badcd ] > > > + > > > @@ -28 +29,0 @@ > > > -Cc: stable@dpdk.org > > > @@ -38 +39 @@ > > > -index 2b6741396d..a71474c90a 100644 > > > +index af19b54b7e..e79b1a275c 100644 > > > @@ -41 +42 @@ > > > -@@ -1676,6 +1676,9 @@ err_secondary: > > > +@@ -1640,6 +1640,9 @@ err_secondary: > > > @@ -48,3 +49,3 @@ > > > - #ifdef HAVE_MLX5_HWS_SUPPORT > > > - if (eth_dev && > > > - priv->sh && > > > + if (priv->mreg_cp_tbl) > > > + mlx5_hlist_destroy(priv->mreg_cp_tbl); > > > + if (priv->sh) > > > @@ -52 +53 @@ > > > -index 1cf6df6049..95b0151fbc 100644 > > > +index 90985479de..22d3ecace2 100644 > > > @@ -55 +56 @@ > > > -@@ -2137,6 +2137,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) > > > +@@ -1453,6 +1453,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* Re: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-20 7:28 ` Michael Baum @ 2022-11-21 14:12 ` Luca Boccassi 2022-11-21 14:17 ` Michael Baum 0 siblings, 1 reply; 207+ messages in thread From: Luca Boccassi @ 2022-11-21 14:12 UTC (permalink / raw) To: Michael Baum; +Cc: Matan Azrad, dpdk stable On Sun, 20 Nov 2022 at 07:28, Michael Baum <michaelba@nvidia.com> wrote: > > On Fri, 2022-11-18 at 16:28, Luca Boccassi wrote: > > > > On Fri, 2022-11-18 at 12:53 +0000, Michael Baum wrote: > > > Hi Luca, > > > > > > This patch causes another issue, so I have sent another patch to squash into. > > > > > > The title of this patch is: " [PATCH 20.11] net/mlx5: fix invalid memory access > > in port closing" > > > > > > Thanks, > > > Michael Baum > > > > Is it a backport gone wrong (or an issue specific to 20.11), or is it an issue also in > > the same change that went in main? If the latter, what's the commit id of the > > fix? > > The issue also in the same change that went in main. > I sent the fix and it isn't merged yet, the fix in patchwork: https://patchwork.dpdk.org/project/dpdk/patch/20221117152807.1259256-1-michaelba@nvidia.com/ Is this going to be pulled in 22.11? ^ permalink raw reply [flat|nested] 207+ messages in thread
* RE: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-21 14:12 ` Luca Boccassi @ 2022-11-21 14:17 ` Michael Baum 2022-11-21 20:36 ` Michael Baum 0 siblings, 1 reply; 207+ messages in thread From: Michael Baum @ 2022-11-21 14:17 UTC (permalink / raw) To: Luca Boccassi; +Cc: Matan Azrad, dpdk stable On Monday, 2022-11-21 at 16:12, Luca Boccassi wrote: > > On Sun, 20 Nov 2022 at 07:28, Michael Baum <michaelba@nvidia.com> wrote: > > > > On Fri, 2022-11-18 at 16:28, Luca Boccassi wrote: > > > > > > On Fri, 2022-11-18 at 12:53 +0000, Michael Baum wrote: > > > > Hi Luca, > > > > > > > > This patch causes another issue, so I have sent another patch to squash > into. > > > > > > > > The title of this patch is: " [PATCH 20.11] net/mlx5: fix invalid > > > > memory access > > > in port closing" > > > > > > > > Thanks, > > > > Michael Baum > > > > > > Is it a backport gone wrong (or an issue specific to 20.11), or is > > > it an issue also in the same change that went in main? If the > > > latter, what's the commit id of the fix? > > > > The issue also in the same change that went in main. > > I sent the fix and it isn't merged yet, the fix in patchwork: > > https://patchwork.dpdk.org/project/dpdk/patch/20221117152807.1259256-1 > > -michaelba@nvidia.com/ > > Is this going to be pulled in 22.11? Yes, it has been already taken into next-net-mlx. ^ permalink raw reply [flat|nested] 207+ messages in thread
* RE: patch 'net/mlx5: fix port event cleaning order' has been queued to stable release 20.11.7 2022-11-21 14:17 ` Michael Baum @ 2022-11-21 20:36 ` Michael Baum 0 siblings, 0 replies; 207+ messages in thread From: Michael Baum @ 2022-11-21 20:36 UTC (permalink / raw) To: Luca Boccassi; +Cc: Matan Azrad, dpdk stable Hi, > > On Monday, 2022-11-21 at 16:12, Luca Boccassi wrote: > > > > On Sun, 20 Nov 2022 at 07:28, Michael Baum <michaelba@nvidia.com> wrote: > > > > > > On Fri, 2022-11-18 at 16:28, Luca Boccassi wrote: > > > > > > > > On Fri, 2022-11-18 at 12:53 +0000, Michael Baum wrote: > > > > > Hi Luca, > > > > > > > > > > This patch causes another issue, so I have sent another patch to > > > > > squash > > into. > > > > > > > > > > The title of this patch is: " [PATCH 20.11] net/mlx5: fix > > > > > invalid memory access > > > > in port closing" > > > > > > > > > > Thanks, > > > > > Michael Baum > > > > > > > > Is it a backport gone wrong (or an issue specific to 20.11), or is > > > > it an issue also in the same change that went in main? If the > > > > latter, what's the commit id of the fix? > > > > > > The issue also in the same change that went in main. > > > I sent the fix and it isn't merged yet, the fix in patchwork: > > > https://patchwork.dpdk.org/project/dpdk/patch/20221117152807.1259256 > > > -1 > > > -michaelba@nvidia.com/ > > > > Is this going to be pulled in 22.11? > > Yes, it has been already taken into next-net-mlx. The commit id in main is ef4ece4dbb962e38c19579766203c21a20622df9 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix drop action validation' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (14 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix port event cleaning order' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/ice/base: fix duplicate flow rules' " luca.boccassi ` (16 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Shun Hao; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1f22dd064c5df53f43d04c08af61340f48faa931 Thanks. Luca Boccassi --- From 1f22dd064c5df53f43d04c08af61340f48faa931 Mon Sep 17 00:00:00 2001 From: Shun Hao <shunh@nvidia.com> Date: Thu, 10 Nov 2022 08:59:21 +0200 Subject: [PATCH] net/mlx5: fix drop action validation [ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ] Currently there's limitation for Drop action that can only co-exist with Count action. Sample and Age actions are also able to exist with Drop within the same flow, and this patch includes them in the Drop action validation. Fixes: 70faf9ae0a29 ("net/mlx5: unify validation of drop action") Signed-off-by: Shun Hao <shunh@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5_flow.h | 3 +++ drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 090cc7c77f..156dadde6b 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -217,6 +217,9 @@ enum mlx5_feature_name { #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37) #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38) +#define MLX5_FLOW_DROP_INCLUSIVE_ACTIONS \ + (MLX5_FLOW_ACTION_COUNT | MLX5_FLOW_ACTION_SAMPLE | MLX5_FLOW_ACTION_AGE) + #define MLX5_FLOW_FATE_ACTIONS \ (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | \ MLX5_FLOW_ACTION_RSS | MLX5_FLOW_ACTION_JUMP | \ diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 1705e2a1f0..c60aabf075 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -6155,18 +6155,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, /* * Validate the drop action mutual exclusion with other actions. * Drop action is mutually-exclusive with any other action, except for - * Count action. + * Count/Sample/Age actions. * Drop action compatibility with tunnel offload was already validated. */ if (action_flags & (MLX5_FLOW_ACTION_TUNNEL_MATCH | MLX5_FLOW_ACTION_TUNNEL_MATCH)); else if ((action_flags & MLX5_FLOW_ACTION_DROP) && - (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_COUNT))) + (action_flags & ~(MLX5_FLOW_ACTION_DROP | MLX5_FLOW_DROP_INCLUSIVE_ACTIONS))) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "Drop action is mutually-exclusive " "with any other action, except for " - "Count action"); + "Count/Sample/Age action"); /* Eswitch has few restrictions on using items and actions */ if (attr->transfer) { if (!mlx5_flow_ext_mreg_supported(dev) && -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.232855751 +0000 +++ 0017-net-mlx5-fix-drop-action-validation.patch 2022-11-17 23:07:55.504330637 +0000 @@ -1 +1 @@ -From e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 Mon Sep 17 00:00:00 2001 +From 1f22dd064c5df53f43d04c08af61340f48faa931 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e2b05b22ec5c8fbe35abf8a38e02bd2997e052a3 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 955383dd07..94e0ac99b9 100644 +index 090cc7c77f..156dadde6b 100644 @@ -26,3 +27,3 @@ -@@ -304,6 +304,9 @@ enum mlx5_feature_name { - #define MLX5_FLOW_ACTION_INDIRECT_COUNT (1ull << 43) - #define MLX5_FLOW_ACTION_INDIRECT_AGE (1ull << 44) +@@ -217,6 +217,9 @@ enum mlx5_feature_name { + #define MLX5_FLOW_ACTION_TUNNEL_SET (1ull << 37) + #define MLX5_FLOW_ACTION_TUNNEL_MATCH (1ull << 38) @@ -37 +38 @@ -index d79dd8d5f0..bc9a75f225 100644 +index 1705e2a1f0..c60aabf075 100644 @@ -40 +41 @@ -@@ -8103,18 +8103,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -6155,18 +6155,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice/base: fix duplicate flow rules' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (15 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/mlx5: fix drop action validation' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/i40e: fix jumbo frame Rx with X722' " luca.boccassi ` (15 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Yiding Zhou; +Cc: Ke Xu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/daa172642b713076d7bdc7dd31b4c185cd3532ec Thanks. Luca Boccassi --- From daa172642b713076d7bdc7dd31b4c185cd3532ec Mon Sep 17 00:00:00 2001 From: Yiding Zhou <yidingx.zhou@intel.com> Date: Thu, 13 Oct 2022 14:21:13 +0800 Subject: [PATCH] net/ice/base: fix duplicate flow rules [ upstream commit 43d30256b215937d9d8b554d39ac91f1866b0e5a ] When a vsi that already exists in the created vsi_list subscribes to the same filter again, the return value ICE_SUCCESS results in duplicate flow rules to be stored, which will cause 'flush' and 'destroy' errors. Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe") Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com> Tested-by: Ke Xu <ke1.xu@intel.com> --- drivers/net/ice/base/ice_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 16ddfc09c7..b03db4aabd 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7901,7 +7901,7 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, /* A rule already exists with the new VSI being added */ if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle)) - return ICE_SUCCESS; + return ICE_ERR_ALREADY_EXISTS; /* Update the previously created VSI list set with * the new VSI ID passed in -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.286218874 +0000 +++ 0018-net-ice-base-fix-duplicate-flow-rules.patch 2022-11-17 23:07:55.512330818 +0000 @@ -1 +1 @@ -From 43d30256b215937d9d8b554d39ac91f1866b0e5a Mon Sep 17 00:00:00 2001 +From daa172642b713076d7bdc7dd31b4c185cd3532ec Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 43d30256b215937d9d8b554d39ac91f1866b0e5a ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 4b115ce660..a2581f404d 100644 +index 16ddfc09c7..b03db4aabd 100644 @@ -23 +24 @@ -@@ -8786,7 +8786,7 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, +@@ -7901,7 +7901,7 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/i40e: fix jumbo frame Rx with X722' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (16 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/ice/base: fix duplicate flow rules' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/iavf: fix tainted scalar' " luca.boccassi ` (14 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Jie Wang; +Cc: Dukai Yuan, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/3508b43bcc24e7caf822bab4c3b1a9146a7175b0 Thanks. Luca Boccassi --- From 3508b43bcc24e7caf822bab4c3b1a9146a7175b0 Mon Sep 17 00:00:00 2001 From: Jie Wang <jie1x.wang@intel.com> Date: Thu, 10 Nov 2022 11:45:24 +0800 Subject: [PATCH] net/i40e: fix jumbo frame Rx with X722 [ upstream commit 719469f13b11dbdc921b74258f2d10bd1c5328d4 ] For NIC I40E_10G-10G_BASE_T_X722, when the port is configured with link speed, it cannot receive jumbo frame packets. Because it set maximum frame size failed when starts the port that the port link status is still down. This patch fix the error that starts the port will force set maximum frame size. Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port level") Signed-off-by: Jie Wang <jie1x.wang@intel.com> Tested-by: Dukai Yuan <dukaix.yuan@intel.com> --- drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index c2d52e4acc..c5eb7ccddc 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -13141,8 +13141,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size) enum i40e_status_code status; bool can_be_set = true; - /* I40E_MEDIA_TYPE_BASET link up can be ignored */ - if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) { + /* + * I40E_MEDIA_TYPE_BASET link up can be ignored + * I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type + * is I40E_MEDIA_TYPE_UNKNOWN + */ + if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET && + hw->phy.media_type != I40E_MEDIA_TYPE_UNKNOWN) { do { update_link_reg(hw, &link); if (link.link_status) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.330719666 +0000 +++ 0019-net-i40e-fix-jumbo-frame-Rx-with-X722.patch 2022-11-17 23:07:55.524331088 +0000 @@ -1 +1 @@ -From 719469f13b11dbdc921b74258f2d10bd1c5328d4 Mon Sep 17 00:00:00 2001 +From 3508b43bcc24e7caf822bab4c3b1a9146a7175b0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 719469f13b11dbdc921b74258f2d10bd1c5328d4 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 80fbcc847c..7726a89d99 100644 +index c2d52e4acc..c5eb7ccddc 100644 @@ -28 +29 @@ -@@ -12132,8 +12132,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size) +@@ -13141,8 +13141,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/iavf: fix tainted scalar' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (17 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/i40e: fix jumbo frame Rx with X722' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/ice: fix scalar Rx path segment' " luca.boccassi ` (13 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Steve Yang; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/37255d7be5d69fed1f4d0a56fee72fcd711237bf Thanks. Luca Boccassi --- From 37255d7be5d69fed1f4d0a56fee72fcd711237bf Mon Sep 17 00:00:00 2001 From: Steve Yang <stevex.yang@intel.com> Date: Thu, 10 Nov 2022 08:30:52 +0000 Subject: [PATCH] net/iavf: fix tainted scalar [ upstream commit b125c0e721ac7803ee2fa16cd6b3d97bc575de6f ] tainted_data_downcast: Downcasting match_item->meta from void * to struct virtchnl_proto_hdrs implies that the data that this pointer points to is tainted. var_assign_var: Assigning: proto_hdrs = match_item->meta. Both are now tainted. var_assign_var: Assigning: rss_meta->proto_hdrs = *proto_hdrs. Both are now tainted. Passing tainted expression "rss_meta->proto_hdrs.count" to "iavf_refine_proto_hdrs", which uses it as a loop boundary. Removed temporary variable 'proto_hdrs', and copied whole memory of match_item meta with exact structure size to avoid data downcast. Coverity issue: 381131 Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") Signed-off-by: Steve Yang <stevex.yang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/iavf/iavf_hash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index eb7fd3f66f..81b1bd9ec0 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -904,7 +904,6 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, uint64_t pattern_hint, struct iavf_rss_meta *rss_meta, struct rte_flow_error *error) { - struct virtchnl_proto_hdrs *proto_hdrs; enum rte_flow_action_type action_type; const struct rte_flow_action_rss *rss; const struct rte_flow_action *action; @@ -961,8 +960,10 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "RSS type not supported"); - proto_hdrs = match_item->meta; - rss_meta->proto_hdrs = *proto_hdrs; + + memcpy(&rss_meta->proto_hdrs, match_item->meta, + sizeof(struct virtchnl_proto_hdrs)); + iavf_refine_proto_hdrs(&rss_meta->proto_hdrs, rss_type, pattern_hint); break; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.376852430 +0000 +++ 0020-net-iavf-fix-tainted-scalar.patch 2022-11-17 23:07:55.524331088 +0000 @@ -1 +1 @@ -From b125c0e721ac7803ee2fa16cd6b3d97bc575de6f Mon Sep 17 00:00:00 2001 +From 37255d7be5d69fed1f4d0a56fee72fcd711237bf Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b125c0e721ac7803ee2fa16cd6b3d97bc575de6f ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -29,2 +30,2 @@ - drivers/net/iavf/iavf_hash.c | 22 +++++++++------------- - 1 file changed, 9 insertions(+), 13 deletions(-) + drivers/net/iavf/iavf_hash.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) @@ -33 +34 @@ -index 67b05313eb..ae6fb38594 100644 +index eb7fd3f66f..81b1bd9ec0 100644 @@ -36,73 +37 @@ -@@ -992,10 +992,9 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs, - uint64_t rss_type) - { - struct virtchnl_proto_hdr *hdr; -- int phdrs_count = proto_hdrs->count; - int i; - -- for (i = 0; i < phdrs_count; i++) { -+ for (i = 0; i < proto_hdrs->count; i++) { - hdr = &proto_hdrs->proto_hdr[i]; - switch (hdr->type) { - case VIRTCHNL_PROTO_HDR_ETH: -@@ -1184,13 +1183,12 @@ iavf_refine_proto_hdrs_gtpu(struct virtchnl_proto_hdrs *proto_hdrs, - uint64_t rss_type) - { - struct virtchnl_proto_hdr *hdr; -- int phdrs_count = proto_hdrs->count; - int i; - - if (!(rss_type & RTE_ETH_RSS_GTPU)) - return; - -- for (i = 0; i < phdrs_count; i++) { -+ for (i = 0; i < proto_hdrs->count; i++) { - hdr = &proto_hdrs->proto_hdr[i]; - switch (hdr->type) { - case VIRTCHNL_PROTO_HDR_GTPU_IP: -@@ -1210,7 +1208,6 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs, - struct virtchnl_proto_hdr *hdr2; - int i, shift_count = 1; - int tun_lvl = proto_hdrs->tunnel_level; -- int phdrs_count = 0; - - if (!(phint & IAVF_PHINT_GTPU_MSK) && !(phint & IAVF_PHINT_GRE)) - return; -@@ -1219,9 +1216,8 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs, - if (phint & IAVF_PHINT_LAYERS_MSK) - shift_count = 2; - -- phdrs_count = proto_hdrs->count; - /* shift headers layer */ -- for (i = phdrs_count - 1 + shift_count; -+ for (i = proto_hdrs->count - 1 + shift_count; - i > shift_count - 1; i--) { - hdr1 = &proto_hdrs->proto_hdr[i]; - hdr2 = &proto_hdrs->proto_hdr[i - shift_count]; -@@ -1282,7 +1278,6 @@ iavf_refine_proto_hdrs_l2tpv2(struct virtchnl_proto_hdrs *proto_hdrs, - uint64_t phint) - { - struct virtchnl_proto_hdr *hdr, *hdr1; -- int phdrs_count = proto_hdrs->count; - int i; - - if (!(phint & IAVF_PHINT_L2TPV2) && !(phint & IAVF_PHINT_L2TPV2_LEN)) -@@ -1290,7 +1285,7 @@ iavf_refine_proto_hdrs_l2tpv2(struct virtchnl_proto_hdrs *proto_hdrs, - - if (proto_hdrs->tunnel_level == TUNNEL_LEVEL_INNER) { - /* shift headers layer */ -- for (i = phdrs_count; i > 0; i--) -+ for (i = proto_hdrs->count; i > 0; i--) - proto_hdrs->proto_hdr[i] = proto_hdrs->proto_hdr[i - 1]; - - /* adding outer ip header at layer 0 */ -@@ -1303,7 +1298,7 @@ iavf_refine_proto_hdrs_l2tpv2(struct virtchnl_proto_hdrs *proto_hdrs, - else if (phint & IAVF_PHINT_OUTER_IPV6) - VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV6); - } else { -- for (i = 0; i < phdrs_count; i++) { -+ for (i = 0; i < proto_hdrs->count; i++) { - hdr = &proto_hdrs->proto_hdr[i]; - if (hdr->type == VIRTCHNL_PROTO_HDR_L2TPV2) { - if (phint & IAVF_PHINT_L2TPV2) { -@@ -1427,7 +1422,6 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, +@@ -904,7 +904,6 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, @@ -116 +45 @@ -@@ -1488,8 +1482,10 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, +@@ -961,8 +960,10 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *match_item, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice: fix scalar Rx path segment' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (18 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/iavf: fix tainted scalar' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'net/ice: fix scalar Tx " luca.boccassi ` (12 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f711f82ed6a3f6ac1b5729df9e3204a4105aa52b Thanks. Luca Boccassi --- From f711f82ed6a3f6ac1b5729df9e3204a4105aa52b Mon Sep 17 00:00:00 2001 From: Mingjin Ye <mingjinx.ye@intel.com> Date: Fri, 11 Nov 2022 12:04:00 +0000 Subject: [PATCH] net/ice: fix scalar Rx path segment [ upstream commit 90ba4442058a14763e57ca96d03ab1e6044e3e5c ] CRC is stripped by the hardware in the scattered Rx path. The last buffer is invalid if it's packet length is zero. This patch adds a judgment for the last buffer length to fix this issue, it would free the mbuf associated to the last one if the last buffer is empty. Fixes: 6eac0b7fde95 ("net/ice: support advance Rx/Tx") Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/ice_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 9a7f8ecfe4..bafb853ab9 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -1850,6 +1850,10 @@ ice_recv_scattered_pkts(void *rx_queue, } else rxm->data_len = (uint16_t)(rx_packet_len - RTE_ETHER_CRC_LEN); + } else if (rx_packet_len == 0) { + rte_pktmbuf_free_seg(rxm); + first_seg->nb_segs--; + last_seg->next = NULL; } first_seg->port = rxq->port_id; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.412706827 +0000 +++ 0021-net-ice-fix-scalar-Rx-path-segment.patch 2022-11-17 23:07:55.528331178 +0000 @@ -1 +1 @@ -From 90ba4442058a14763e57ca96d03ab1e6044e3e5c Mon Sep 17 00:00:00 2001 +From f711f82ed6a3f6ac1b5729df9e3204a4105aa52b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 90ba4442058a14763e57ca96d03ab1e6044e3e5c ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index cd046a3432..3224a02db2 100644 +index 9a7f8ecfe4..bafb853ab9 100644 @@ -26 +27 @@ -@@ -2113,6 +2113,10 @@ ice_recv_scattered_pkts(void *rx_queue, +@@ -1850,6 +1850,10 @@ ice_recv_scattered_pkts(void *rx_queue, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ice: fix scalar Tx path segment' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (19 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/ice: fix scalar Rx path segment' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'ci: bump versions of actions in GHA' " luca.boccassi ` (11 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Mingjin Ye; +Cc: Qi Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2808a6c7175cc293fb51b2b467cce936cddfd458 Thanks. Luca Boccassi --- From 2808a6c7175cc293fb51b2b467cce936cddfd458 Mon Sep 17 00:00:00 2001 From: Mingjin Ye <mingjinx.ye@intel.com> Date: Fri, 11 Nov 2022 16:12:41 +0000 Subject: [PATCH] net/ice: fix scalar Tx path segment [ upstream commit 688cb2f2c61e48552fb9a211fdcfdb754a795b40 ] The scalar Tx path would send empty buffer that causes the Tx queue to overflow. This patch adds the last buffer length judgment in tx_prepare to fix this issue, rte_errno will be set to EINVAL and returned if the last buffer is empty. Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx") Fixes: ccf33dccf7aa ("net/ice: check illegal packet sizes") Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/ice_rxtx.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index bafb853ab9..2716c56f3a 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -3208,6 +3208,22 @@ ice_set_tx_function_flag(struct rte_eth_dev *dev, struct ice_tx_queue *txq) #define ICE_MIN_TSO_MSS 64 #define ICE_MAX_TSO_MSS 9728 #define ICE_MAX_TSO_FRAME_SIZE 262144 + +/*Check for empty mbuf*/ +static inline uint16_t +ice_check_empty_mbuf(struct rte_mbuf *tx_pkt) +{ + struct rte_mbuf *txd = tx_pkt; + + while (txd != NULL) { + if (txd->data_len == 0) + return -1; + txd = txd->next; + } + + return 0; +} + uint16_t ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) @@ -3254,6 +3270,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, rte_errno = -ret; return i; } + + if (ice_check_empty_mbuf(m) != 0) { + rte_errno = EINVAL; + PMD_DRV_LOG(ERR, "INVALID mbuf: last mbuf data_len=[0]"); + return i; + } } return i; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.451508360 +0000 +++ 0022-net-ice-fix-scalar-Tx-path-segment.patch 2022-11-17 23:07:55.528331178 +0000 @@ -1 +1 @@ -From 688cb2f2c61e48552fb9a211fdcfdb754a795b40 Mon Sep 17 00:00:00 2001 +From 2808a6c7175cc293fb51b2b467cce936cddfd458 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 688cb2f2c61e48552fb9a211fdcfdb754a795b40 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 3224a02db2..0ea0045836 100644 +index bafb853ab9..2716c56f3a 100644 @@ -27 +28 @@ -@@ -3645,6 +3645,22 @@ ice_set_tx_function_flag(struct rte_eth_dev *dev, struct ice_tx_queue *txq) +@@ -3208,6 +3208,22 @@ ice_set_tx_function_flag(struct rte_eth_dev *dev, struct ice_tx_queue *txq) @@ -50 +51 @@ -@@ -3691,6 +3707,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -3254,6 +3270,12 @@ ice_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'ci: bump versions of actions in GHA' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (20 preceding siblings ...) 2022-11-17 23:08 ` patch 'net/ice: fix scalar Tx " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'ci: update to new API for step outputs " luca.boccassi ` (10 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: David Marchand; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/072fc824a9b8577fc03e4cea10cbdb8de6207998 Thanks. Luca Boccassi --- From 072fc824a9b8577fc03e4cea10cbdb8de6207998 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Wed, 12 Oct 2022 18:29:41 +0200 Subject: [PATCH] ci: bump versions of actions in GHA [ upstream commit 95da49a9eab3d8c97b7b1d8b047f8c895e3d5fce ] GitHub started deprecating GHA actions based on Node 12 [1]. For now, only warnings are raised, but we might as well switch to v3 versions of the common actions, now. 1: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ Signed-off-by: David Marchand <david.marchand@redhat.com> --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa79f05955..3ce691a0bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Generate cache keys id: get_ref_keys run: | @@ -68,7 +68,7 @@ jobs: echo -n '::set-output name=abi::' echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' - name: Retrieve ccache cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.ccache key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }} @@ -76,13 +76,13 @@ jobs: ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main - name: Retrieve libabigail cache id: libabigail-cache - uses: actions/cache@v2 + uses: actions/cache@v3 if: env.ABI_CHECKS == 'true' with: path: libabigail key: ${{ steps.get_ref_keys.outputs.libabigail }} - name: Retrieve ABI reference cache - uses: actions/cache@v2 + uses: actions/cache@v3 if: env.ABI_CHECKS == 'true' with: path: reference @@ -119,7 +119,7 @@ jobs: run: .ci/linux-build.sh - name: Upload logs on failure if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: meson-logs-${{ join(matrix.config.*, '-') }} path: | -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.489206187 +0000 +++ 0023-ci-bump-versions-of-actions-in-GHA.patch 2022-11-17 23:07:55.532331268 +0000 @@ -1 +1 @@ -From 95da49a9eab3d8c97b7b1d8b047f8c895e3d5fce Mon Sep 17 00:00:00 2001 +From 072fc824a9b8577fc03e4cea10cbdb8de6207998 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 95da49a9eab3d8c97b7b1d8b047f8c895e3d5fce ] + @@ -12,2 +13,0 @@ -Cc: stable@dpdk.org - @@ -16,2 +16,2 @@ - .github/workflows/build.yml | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) + .github/workflows/build.yml | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) @@ -20 +20 @@ -index a595c12354..e27a2642c8 100644 +index fa79f05955..3ce691a0bd 100644 @@ -23 +23 @@ -@@ -62,7 +62,7 @@ jobs: +@@ -57,7 +57,7 @@ jobs: @@ -32 +32 @@ -@@ -73,7 +73,7 @@ jobs: +@@ -68,7 +68,7 @@ jobs: @@ -41 +41 @@ -@@ -81,13 +81,13 @@ jobs: +@@ -76,13 +76,13 @@ jobs: @@ -57 +57 @@ -@@ -134,7 +134,7 @@ jobs: +@@ -119,7 +119,7 @@ jobs: @@ -65,45 +64,0 @@ - path: | -@@ -161,7 +161,7 @@ jobs: - echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) - - name: Retrieve image cache - id: image_cache -- uses: actions/cache@v2 -+ uses: actions/cache@v3 - with: - path: ~/.image - key: ${{ steps.get_keys.outputs.image }} -@@ -207,7 +207,7 @@ jobs: - - steps: - - name: Checkout sources -- uses: actions/checkout@v2 -+ uses: actions/checkout@v3 - - name: Generate various keys - id: get_keys - run: | -@@ -219,7 +219,7 @@ jobs: - echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' - - name: Retrieve image cache - id: image_cache -- uses: actions/cache@v2 -+ uses: actions/cache@v3 - with: - path: ~/.image - key: ${{ steps.get_keys.outputs.image }} -@@ -229,7 +229,7 @@ jobs: - echo 'Image ${{ matrix.config.image }} is not cached.' - false - - name: Retrieve ccache cache -- uses: actions/cache@v2 -+ uses: actions/cache@v3 - with: - path: ~/.ccache - key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }} -@@ -266,7 +266,7 @@ jobs: - run: docker kill dpdk - - name: Upload logs on failure - if: failure() -- uses: actions/upload-artifact@v2 -+ uses: actions/upload-artifact@v3 - with: - name: ${{ steps.get_keys.outputs.logs }} ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'ci: update to new API for step outputs in GHA' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (21 preceding siblings ...) 2022-11-17 23:08 ` patch 'ci: bump versions of actions in GHA' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix event timer adapter guide' " luca.boccassi ` (9 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: David Marchand; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2ad7fc8469d554256a0e1e8429845ee70f99c122 Thanks. Luca Boccassi --- From 2ad7fc8469d554256a0e1e8429845ee70f99c122 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Wed, 12 Oct 2022 18:29:42 +0200 Subject: [PATCH] ci: update to new API for step outputs in GHA [ upstream commit 1e249e0b47456b164a3139cdc85dc0ea20cbfeff ] GitHub actions deprecated use of set-output [1], replaced with GITHUB_OUTPUT. 1: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Signed-off-by: David Marchand <david.marchand@redhat.com> --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ce691a0bd..5cf5312d04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,12 +61,9 @@ jobs: - name: Generate cache keys id: get_ref_keys run: | - echo -n '::set-output name=ccache::' - echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) - echo -n '::set-output name=libabigail::' - echo 'libabigail-${{ matrix.config.os }}' - echo -n '::set-output name=abi::' - echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' + echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT + echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT + echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT - name: Retrieve ccache cache uses: actions/cache@v3 with: -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.523730021 +0000 +++ 0024-ci-update-to-new-API-for-step-outputs-in-GHA.patch 2022-11-17 23:07:55.532331268 +0000 @@ -1 +1 @@ -From 1e249e0b47456b164a3139cdc85dc0ea20cbfeff Mon Sep 17 00:00:00 2001 +From 2ad7fc8469d554256a0e1e8429845ee70f99c122 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1e249e0b47456b164a3139cdc85dc0ea20cbfeff ] + @@ -11,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -15,2 +15,2 @@ - .github/workflows/build.yml | 21 +++++++-------------- - 1 file changed, 7 insertions(+), 14 deletions(-) + .github/workflows/build.yml | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) @@ -19 +19 @@ -index e27a2642c8..82d83f4030 100644 +index 3ce691a0bd..5cf5312d04 100644 @@ -22 +22 @@ -@@ -66,12 +66,9 @@ jobs: +@@ -61,12 +61,9 @@ jobs: @@ -38,26 +37,0 @@ -@@ -157,8 +154,7 @@ jobs: - - name: Generate various keys - id: get_keys - run: | -- echo -n '::set-output name=image::' -- echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) -+ echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT - - name: Retrieve image cache - id: image_cache - uses: actions/cache@v3 -@@ -211,12 +207,9 @@ jobs: - - name: Generate various keys - id: get_keys - run: | -- echo -n '::set-output name=ccache::' -- echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W) -- echo -n '::set-output name=image::' -- echo 'image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) -- echo -n '::set-output name=logs::' -- echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' -+ echo 'ccache=ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT -+ echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT -+ echo 'logs=meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' >> $GITHUB_OUTPUT - - name: Retrieve image cache - id: image_cache - uses: actions/cache@v3 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix event timer adapter guide' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (22 preceding siblings ...) 2022-11-17 23:08 ` patch 'ci: update to new API for step outputs " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'examples/fips_validation: fix typo in error log' " luca.boccassi ` (8 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Mattias Rönnblom; +Cc: Erik Gabriel Carrillo, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ee9f2135b591690dddd9b4f7de6530ff67750548 Thanks. Luca Boccassi --- From ee9f2135b591690dddd9b4f7de6530ff67750548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com> Date: Fri, 4 Nov 2022 07:52:37 +0100 Subject: [PATCH] doc: fix event timer adapter guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 4109d71e5211e107e0524c40f77bccc32af7a3d8 ] In the example: * Properly initialize the socket id field. * Remove comments redundant and/or not consistent with the code. 180 seconds is not 2 minutes. * Remove redundant pointer initialization. In both the example and text, the flags field of the conf struct was erroneously referred to as timer_adapter_flags and the max_tmo_ns field as max_tmo_nsec. Fixes: 30e7fbd62839 ("doc: add event timer adapter guide") Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com> --- doc/guides/prog_guide/event_timer_adapter.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst index a95efbe0d8..5364db1ed6 100644 --- a/doc/guides/prog_guide/event_timer_adapter.rst +++ b/doc/guides/prog_guide/event_timer_adapter.rst @@ -107,18 +107,19 @@ to ``rte_event_timer_adapter_create()``. .. code-block:: c - #define NSECPERSEC 1E9 // No of ns in 1 sec + #define NSECPERSEC 1E9 const struct rte_event_timer_adapter_conf adapter_config = { .event_dev_id = event_dev_id, .timer_adapter_id = 0, + .socket_id = rte_socket_id(), .clk_src = RTE_EVENT_TIMER_ADAPTER_CPU_CLK, - .timer_tick_ns = NSECPERSEC / 10, // 100 milliseconds - .max_tmo_nsec = 180 * NSECPERSEC // 2 minutes + .timer_tick_ns = NSECPERSEC / 10, + .max_tmo_ns = 180 * NSECPERSEC, .nb_timers = 40000, - .timer_adapter_flags = 0, + .flags = 0, }; - struct rte_event_timer_adapter *adapter = NULL; + struct rte_event_timer_adapter *adapter; adapter = rte_event_timer_adapter_create(&adapter_config); if (adapter == NULL) { ... }; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.558250105 +0000 +++ 0025-doc-fix-event-timer-adapter-guide.patch 2022-11-17 23:07:55.532331268 +0000 @@ -1 +1 @@ -From 4109d71e5211e107e0524c40f77bccc32af7a3d8 Mon Sep 17 00:00:00 2001 +From ee9f2135b591690dddd9b4f7de6530ff67750548 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 4109d71e5211e107e0524c40f77bccc32af7a3d8 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -25,2 +26,2 @@ - doc/guides/prog_guide/event_timer_adapter.rst | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) + doc/guides/prog_guide/event_timer_adapter.rst | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) @@ -29 +30 @@ -index 7547059a05..d7307a29bb 100644 +index a95efbe0d8..5364db1ed6 100644 @@ -57,12 +57,0 @@ -@@ -145,9 +146,9 @@ to support timers of the respective type. A periodic timer expires at a fixed - time interval repeatedly till it is cancelled. A non-periodic timer expires only - once. The periodic capability flag, ``RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC``, - can be set for implementations that support periodic mode if desired. To --configure an adapter in periodic mode, ``timer_adapter_flags`` of -+configure an adapter in periodic mode, ``flags`` of - ``rte_event_timer_adapter_conf`` is set to include the periodic flag --``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. Maximum timeout (``max_tmo_nsec``) does -+``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. Maximum timeout (``max_tmo_ns``) does - not apply to periodic mode. - - Retrieve Event Timer Adapter Contextual Information ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'examples/fips_validation: fix typo in error log' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (23 preceding siblings ...) 2022-11-17 23:08 ` patch 'doc: fix event timer adapter guide' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'baseband/acc100: fix input error related to padding' " luca.boccassi ` (7 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Pablo de Lara; +Cc: Brian Dooley, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5122a61a73660c61a26193c6bfac967a0bf7ccf7 Thanks. Luca Boccassi --- From 5122a61a73660c61a26193c6bfac967a0bf7ccf7 Mon Sep 17 00:00:00 2001 From: Pablo de Lara <pablo.de.lara.guarch@intel.com> Date: Mon, 7 Nov 2022 10:03:30 +0000 Subject: [PATCH] examples/fips_validation: fix typo in error log [ upstream commit 8782b3b64b4c38c0e2d4cf5bda2795ddd268cf41 ] Digest length is being printed out, not IV length. Fixes: ac026f4668d0 ("examples/fips_validation: support CMAC parsing") Fixes: f64adb6714e0 ("examples/fips_validation: support HMAC parsing") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Reviewed-by: Brian Dooley <brian.dooley@intel.com> --- examples/fips_validation/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 7f4beef94c..f746812980 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -848,7 +848,7 @@ prepare_hmac_xform(struct rte_crypto_sym_xform *xform) if (rte_cryptodev_sym_capability_check_auth(cap, auth_xform->key.length, auth_xform->digest_length, 0) != 0) { - RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n", + RTE_LOG(ERR, USER1, "PMD %s key length %u Digest length %u\n", info.device_name, auth_xform->key.length, auth_xform->digest_length); return -EPERM; @@ -977,7 +977,7 @@ prepare_cmac_xform(struct rte_crypto_sym_xform *xform) if (rte_cryptodev_sym_capability_check_auth(cap, auth_xform->key.length, auth_xform->digest_length, 0) != 0) { - RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n", + RTE_LOG(ERR, USER1, "PMD %s key length %u Digest length %u\n", info.device_name, auth_xform->key.length, auth_xform->digest_length); return -EPERM; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.592807401 +0000 +++ 0026-examples-fips_validation-fix-typo-in-error-log.patch 2022-11-17 23:07:55.532331268 +0000 @@ -1 +1 @@ -From 8782b3b64b4c38c0e2d4cf5bda2795ddd268cf41 Mon Sep 17 00:00:00 2001 +From 5122a61a73660c61a26193c6bfac967a0bf7ccf7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8782b3b64b4c38c0e2d4cf5bda2795ddd268cf41 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 404a29d7b6..9a9babb53a 100644 +index 7f4beef94c..f746812980 100644 @@ -22 +23 @@ -@@ -1210,7 +1210,7 @@ prepare_hmac_xform(struct rte_crypto_sym_xform *xform) +@@ -848,7 +848,7 @@ prepare_hmac_xform(struct rte_crypto_sym_xform *xform) @@ -31 +32 @@ -@@ -1339,7 +1339,7 @@ prepare_cmac_xform(struct rte_crypto_sym_xform *xform) +@@ -977,7 +977,7 @@ prepare_cmac_xform(struct rte_crypto_sym_xform *xform) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'baseband/acc100: fix input error related to padding' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (24 preceding siblings ...) 2022-11-17 23:08 ` patch 'examples/fips_validation: fix typo in error log' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix application name in procinfo guide' " luca.boccassi ` (6 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Nicolas Chautru; +Cc: Maxime Coquelin, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/173a7334a4ef20279c0eba4128e87fb681055d05 Thanks. Luca Boccassi --- From 173a7334a4ef20279c0eba4128e87fb681055d05 Mon Sep 17 00:00:00 2001 From: Nicolas Chautru <nicolas.chautru@intel.com> Date: Mon, 7 Nov 2022 15:45:32 -0800 Subject: [PATCH] baseband/acc100: fix input error related to padding [ upstream commit e77d682aad4ccd8b78cc19194c15703fc78f807e ] Previous commit includes some padding for some cases, which may cause input warning from the HW which should be safely ignored to avoid false alarm. Fixes: 6f3325bbfa ("baseband/acc100: add LDPC encoder padding function") Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> --- drivers/baseband/acc100/rte_acc100_pmd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 6d02fd12a8..1d4b25328a 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -3710,8 +3710,6 @@ dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op, /* Clearing status, it will be set based on response */ op->status = 0; - op->status |= ((rsp.input_err) - ? (1 << RTE_BBDEV_DATA_ERROR) : 0); op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0); op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0); @@ -3782,8 +3780,6 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op, rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val); - op->status |= ((rsp.input_err) - ? (1 << RTE_BBDEV_DATA_ERROR) : 0); op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0); op->status |= ((rsp.fcw_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.629818617 +0000 +++ 0027-baseband-acc100-fix-input-error-related-to-padding.patch 2022-11-17 23:07:55.536331358 +0000 @@ -1 +1 @@ -From e77d682aad4ccd8b78cc19194c15703fc78f807e Mon Sep 17 00:00:00 2001 +From 173a7334a4ef20279c0eba4128e87fb681055d05 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e77d682aad4ccd8b78cc19194c15703fc78f807e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -16,2 +17,2 @@ - drivers/baseband/acc/rte_acc100_pmd.c | 3 --- - 1 file changed, 3 deletions(-) + drivers/baseband/acc100/rte_acc100_pmd.c | 4 ---- + 1 file changed, 4 deletions(-) @@ -19,5 +20,5 @@ -diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c -index 96daef87bc..ba8247d47e 100644 ---- a/drivers/baseband/acc/rte_acc100_pmd.c -+++ b/drivers/baseband/acc/rte_acc100_pmd.c -@@ -3779,7 +3779,6 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op, +diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c +index 6d02fd12a8..1d4b25328a 100644 +--- a/drivers/baseband/acc100/rte_acc100_pmd.c ++++ b/drivers/baseband/acc100/rte_acc100_pmd.c +@@ -3710,8 +3710,6 @@ dequeue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op, @@ -27 +28,2 @@ -- op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0); +- op->status |= ((rsp.input_err) +- ? (1 << RTE_BBDEV_DATA_ERROR) : 0); @@ -31,3 +33,3 @@ -@@ -3853,8 +3852,6 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op, - rte_bbdev_log_debug("Resp. desc %p: %x descs %d cbs %d\n", - desc, rsp.val, descs_in_tb, desc->req.numCBs); +@@ -3782,8 +3780,6 @@ dequeue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op **ref_op, + rte_bbdev_log_debug("Resp. desc %p: %x", desc, + rsp.val); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix application name in procinfo guide' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (25 preceding siblings ...) 2022-11-17 23:08 ` patch 'baseband/acc100: fix input error related to padding' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'test/crypto: fix bitwise operator in a SNOW3G case' " luca.boccassi ` (5 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Dongdong Liu; +Cc: David Marchand, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1ff5303f279e7a474afc6921f08711181b82456b Thanks. Luca Boccassi --- From 1ff5303f279e7a474afc6921f08711181b82456b Mon Sep 17 00:00:00 2001 From: Dongdong Liu <liudongdong3@huawei.com> Date: Tue, 11 Oct 2022 19:18:43 +0800 Subject: [PATCH] doc: fix application name in procinfo guide [ upstream commit 2a65f12f6ab461e2cb81192c6bdd136191c82ea9 ] In commit 996ef1176111 ("app: add all remaining apps to meson build"), building the procinfo application through Meson has been done with a binary name different from the previous Makefile build system [1]. When we dropped Makefile support, the documentation was not updated. Fixes: 3cc6ecfdfe85 ("build: remove makefiles") Signed-off-by: Dongdong Liu <liudongdong3@huawei.com> Signed-off-by: David Marchand <david.marchand@redhat.com> --- doc/guides/tools/proc_info.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst index 9772d97ef0..e4f0c83f1b 100644 --- a/doc/guides/tools/proc_info.rst +++ b/doc/guides/tools/proc_info.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2015 Intel Corporation. -dpdk-procinfo Application -========================= +dpdk-proc-info Application +========================== -The dpdk-procinfo application is a Data Plane Development Kit (DPDK) application +The dpdk-proc-info application is a Data Plane Development Kit (DPDK) application that runs as a DPDK secondary process and is capable of retrieving port statistics, resetting port statistics, printing DPDK memory information and displaying debug information for port. @@ -17,7 +17,7 @@ The application has a number of command line options: .. code-block:: console - ./<build_dir>/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats | + ./<build_dir>/app/dpdk-proc-info -- -m | [-p PORTMASK] [--stats | --xstats | --stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto | --show-ring[=name] | --show-mempool[=name] | --iter-mempool=name ] @@ -72,14 +72,14 @@ by name. For invalid or no mempool name no elements are displayed. Limitations ----------- -* dpdk-procinfo should run alongside primary process with same DPDK version. +* dpdk-proc-info should run alongside primary process with same DPDK version. -* When running ``dpdk-procinfo`` with shared library mode, it is required to +* When running ``dpdk-proc-info`` with shared library mode, it is required to pass the same NIC PMD libraries as used for the primary application. Any mismatch in PMD library arguments can lead to undefined behavior and results affecting primary application too. -* Stats retrieval using ``dpdk-procinfo`` is not supported for virtual devices like PCAP and TAP. +* Stats retrieval using ``dpdk-proc-info`` is not supported for virtual devices like PCAP and TAP. -* Since default DPDK EAL arguments for ``dpdk-procinfo`` are ``-c1, -n4 & --proc-type=secondary``, +* Since default DPDK EAL arguments for ``dpdk-proc-info`` are ``-c1, -n4 & --proc-type=secondary``, It is not expected that the user passes any EAL arguments. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.668536003 +0000 +++ 0028-doc-fix-application-name-in-procinfo-guide.patch 2022-11-17 23:07:55.536331358 +0000 @@ -1 +1 @@ -From 2a65f12f6ab461e2cb81192c6bdd136191c82ea9 Mon Sep 17 00:00:00 2001 +From 1ff5303f279e7a474afc6921f08711181b82456b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2a65f12f6ab461e2cb81192c6bdd136191c82ea9 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/crypto: fix bitwise operator in a SNOW3G case' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (26 preceding siblings ...) 2022-11-17 23:08 ` patch 'doc: fix application name in procinfo guide' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix typo depreciated instead of deprecated' " luca.boccassi ` (4 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Kai Ji; +Cc: Ciara Power, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/326e988672aa5c8d4c8f2bb471599289b2811690 Thanks. Luca Boccassi --- From 326e988672aa5c8d4c8f2bb471599289b2811690 Mon Sep 17 00:00:00 2001 From: Kai Ji <kai.ji@intel.com> Date: Sat, 12 Nov 2022 00:27:15 +0800 Subject: [PATCH] test/crypto: fix bitwise operator in a SNOW3G case [ upstream commit e23eccfd281e056eac4f287e9993d2b26d440134 ] This patch remove incorrect bitwise and operator used in the return function of sw snow3g testcase Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted") Signed-off-by: Kai Ji <kai.ji@intel.com> Acked-by: Ciara Power <ciara.power@intel.com> --- app/test/test_cryptodev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index bba040078b..15675df2d5 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -6394,8 +6394,10 @@ test_snow3g_decryption_with_digest_test_case_1(void) */ snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data); - return test_snow3g_decryption(&snow3g_test_case_7) & - test_snow3g_authentication_verify(&snow3g_hash_data); + if (test_snow3g_decryption(&snow3g_test_case_7)) + return TEST_FAILED; + + return test_snow3g_authentication_verify(&snow3g_hash_data); } static int -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.703188876 +0000 +++ 0029-test-crypto-fix-bitwise-operator-in-a-SNOW3G-case.patch 2022-11-17 23:07:55.548331629 +0000 @@ -1 +1 @@ -From e23eccfd281e056eac4f287e9993d2b26d440134 Mon Sep 17 00:00:00 2001 +From 326e988672aa5c8d4c8f2bb471599289b2811690 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e23eccfd281e056eac4f287e9993d2b26d440134 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index e1122fcd7c..d6ae762df9 100644 +index bba040078b..15675df2d5 100644 @@ -22 +23 @@ -@@ -6870,8 +6870,10 @@ test_snow3g_decryption_with_digest_test_case_1(void) +@@ -6394,8 +6394,10 @@ test_snow3g_decryption_with_digest_test_case_1(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix typo depreciated instead of deprecated' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (27 preceding siblings ...) 2022-11-17 23:08 ` patch 'test/crypto: fix bitwise operator in a SNOW3G case' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'drivers: fix typos found by Lintian' " luca.boccassi ` (3 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Stephen Coleman; +Cc: Ray Kinsella, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c3c9f7a73b90c881f961c98d3066daa29554054e Thanks. Luca Boccassi --- From c3c9f7a73b90c881f961c98d3066daa29554054e Mon Sep 17 00:00:00 2001 From: Stephen Coleman <omegacoleman@gmail.com> Date: Tue, 19 Apr 2022 17:01:02 +0800 Subject: [PATCH] doc: fix typo depreciated instead of deprecated [ upstream commit 98afdb15626841dd6580816678a6df63d12f22b9 ] Same issue was fixed in ABI policy in ec5c0f8, but more of this misuse persist in comments and docs. 'depreciated' means diminish in value over a period of time. It should not appear here. Signed-off-by: Stephen Coleman <omegacoleman@gmail.com> Acked-by: Ray Kinsella <mdr@ashroe.eu> --- doc/guides/contributing/abi_policy.rst | 2 +- doc/guides/contributing/abi_versioning.rst | 2 +- lib/librte_kni/rte_kni.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst index 4ad87dbfed..d172409d52 100644 --- a/doc/guides/contributing/abi_policy.rst +++ b/doc/guides/contributing/abi_policy.rst @@ -165,7 +165,7 @@ The requirements for changing the ABI are: API becomes non-experimental, then the old one is marked with ``__rte_deprecated``. - - The depreciated API should follow the notification process to be removed, + - The deprecated API should follow the notification process to be removed, see :ref:`deprecation_notices`. - At the declaration of the next major ABI version, those ABI changes then diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst index 91ada18dd7..8d346fb656 100644 --- a/doc/guides/contributing/abi_versioning.rst +++ b/doc/guides/contributing/abi_versioning.rst @@ -94,7 +94,7 @@ that library. ... However when a new ABI version is declared, for example DPDK ``22``, old -depreciated functions may be safely removed at this point and the entire old +deprecated functions may be safely removed at this point and the entire old major ABI version removed, see the section :ref:`deprecating_entire_abi` on how this may be done. diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index b0eaf46104..62fa4c792b 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -66,8 +66,8 @@ struct rte_kni_conf { uint32_t core_id; /* Core ID to bind kernel thread on */ uint16_t group_id; /* Group ID */ unsigned mbuf_size; /* mbuf size */ - struct rte_pci_addr addr; /* depreciated */ - struct rte_pci_id id; /* depreciated */ + struct rte_pci_addr addr; /* deprecated */ + struct rte_pci_id id; /* deprecated */ __extension__ uint8_t force_bind : 1; /* Flag to bind kernel thread */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.749715059 +0000 +++ 0030-doc-fix-typo-depreciated-instead-of-deprecated.patch 2022-11-17 23:07:55.548331629 +0000 @@ -1 +1 @@ -From 98afdb15626841dd6580816678a6df63d12f22b9 Mon Sep 17 00:00:00 2001 +From c3c9f7a73b90c881f961c98d3066daa29554054e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 98afdb15626841dd6580816678a6df63d12f22b9 ] + @@ -16 +18 @@ - lib/kni/rte_kni.h | 4 ++-- + lib/librte_kni/rte_kni.h | 4 ++-- @@ -20 +22 @@ -index 64919b6a2b..5fd4052585 100644 +index 4ad87dbfed..d172409d52 100644 @@ -23 +25 @@ -@@ -167,7 +167,7 @@ The requirements for changing the ABI are: +@@ -165,7 +165,7 @@ The requirements for changing the ABI are: @@ -33 +35 @@ -index dd96527ee5..7afd1c1886 100644 +index 91ada18dd7..8d346fb656 100644 @@ -45,5 +47,5 @@ -diff --git a/lib/kni/rte_kni.h b/lib/kni/rte_kni.h -index 37d67509a0..1e508acc82 100644 ---- a/lib/kni/rte_kni.h -+++ b/lib/kni/rte_kni.h -@@ -65,8 +65,8 @@ struct rte_kni_conf { +diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h +index b0eaf46104..62fa4c792b 100644 +--- a/lib/librte_kni/rte_kni.h ++++ b/lib/librte_kni/rte_kni.h +@@ -66,8 +66,8 @@ struct rte_kni_conf { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'drivers: fix typos found by Lintian' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (28 preceding siblings ...) 2022-11-17 23:08 ` patch 'doc: fix typo depreciated instead of deprecated' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix net drivers ordering' " luca.boccassi ` (2 subsequent siblings) 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Luca Boccassi; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ea385e04cdac27bc2ffb649838a25a68bd0f3421 Thanks. Luca Boccassi --- From ea385e04cdac27bc2ffb649838a25a68bd0f3421 Mon Sep 17 00:00:00 2001 From: Luca Boccassi <bluca@debian.org> Date: Mon, 14 Nov 2022 14:21:53 +0000 Subject: [PATCH] drivers: fix typos found by Lintian [ upstream commit bdab5309193d8e1ed1a60b604677c86c322364e0 ] Signed-off-by: Luca Boccassi <bluca@debian.org> --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/qede/base/ecore_int.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 5a9b9cc4b9..164a1d1575 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -198,7 +198,7 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev, if (slave_info.max_rx_queues < bond_dev->data->nb_rx_queues || slave_info.max_tx_queues < bond_dev->data->nb_tx_queues) { RTE_BOND_LOG(ERR, - "%s: Slave %d capabilities doesn't allow to allocate additional queues", + "%s: Slave %d capabilities doesn't allow allocating additional queues", __func__, slave_port); return -1; } diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 07b77d8b99..08422474a5 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -1711,7 +1711,7 @@ err_pause_addr_cfg: rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, mac_addr); hns3_warn(hw, - "Failed to roll back to del setted mac addr(%s): %d", + "Failed to roll back to del set mac addr(%s): %d", mac_str, ret_val); } diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c index 2c4aac9418..d9faf6bfcd 100644 --- a/drivers/net/qede/base/ecore_int.c +++ b/drivers/net/qede/base/ecore_int.c @@ -366,7 +366,7 @@ enum _ecore_status_t ecore_pglueb_rbc_attn_handler(struct ecore_hwfn *p_hwfn, tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL); if (tmp & ECORE_PGLUE_ATTENTION_ICPL_VALID) - DP_NOTICE(p_hwfn, false, "ICPL erorr - %08x\n", tmp); + DP_NOTICE(p_hwfn, false, "ICPL error - %08x\n", tmp); tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS); if (tmp & ECORE_PGLUE_ATTENTION_ZLR_VALID) { @@ -378,7 +378,7 @@ enum _ecore_status_t ecore_pglueb_rbc_attn_handler(struct ecore_hwfn *p_hwfn, PGLUE_B_REG_MASTER_ZLR_ERR_ADD_63_32); DP_NOTICE(p_hwfn, false, - "ICPL erorr - %08x [Address %08x:%08x]\n", + "ICPL error - %08x [Address %08x:%08x]\n", tmp, addr_hi, addr_lo); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.786929801 +0000 +++ 0031-drivers-fix-typos-found-by-Lintian.patch 2022-11-17 23:07:55.556331809 +0000 @@ -1 +1 @@ -From bdab5309193d8e1ed1a60b604677c86c322364e0 Mon Sep 17 00:00:00 2001 +From ea385e04cdac27bc2ffb649838a25a68bd0f3421 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bdab5309193d8e1ed1a60b604677c86c322364e0 ] + @@ -8 +9,0 @@ - drivers/crypto/dpaa_sec/dpaa_sec.c | 4 ++-- @@ -12 +13 @@ - 4 files changed, 6 insertions(+), 6 deletions(-) + 3 files changed, 4 insertions(+), 4 deletions(-) @@ -14,21 +14,0 @@ -diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c -index b1e7027823..db52683847 100644 ---- a/drivers/crypto/dpaa_sec/dpaa_sec.c -+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c -@@ -754,14 +754,14 @@ mbuf_dump: - printf("ctx info:\n"); - printf("job->sg[0] output info:\n"); - memcpy(&sg[0], &job->sg[0], sizeof(sg[0])); -- printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textention = %d" -+ printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" - "\n\tbpid = %d\n\toffset = %d\n", - (uint64_t)sg[0].addr, sg[0].length, sg[0].final, - sg[0].extension, sg[0].bpid, sg[0].offset); - printf("\njob->sg[1] input info:\n"); - memcpy(&sg[1], &job->sg[1], sizeof(sg[1])); - hw_sg_to_cpu(&sg[1]); -- printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textention = %d" -+ printf("\taddr = %"PRIx64",\n\tlen = %d,\n\tfinal = %d,\n\textension = %d" - "\n\tbpid = %d\n\toffset = %d\n", - (uint64_t)sg[1].addr, sg[1].length, sg[1].final, - sg[1].extension, sg[1].bpid, sg[1].offset); @@ -36 +16 @@ -index 2efaad1e8e..b9bcebc6cb 100644 +index 5a9b9cc4b9..164a1d1575 100644 @@ -49 +29 @@ -index b4365b78be..d326f70129 100644 +index 07b77d8b99..08422474a5 100644 @@ -52,3 +32,3 @@ -@@ -1661,7 +1661,7 @@ err_pause_addr_cfg: - hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, - mac_addr); +@@ -1711,7 +1711,7 @@ err_pause_addr_cfg: + rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, + mac_addr); ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix net drivers ordering' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (29 preceding siblings ...) 2022-11-17 23:08 ` patch 'drivers: fix typos found by Lintian' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'ring: fix description' " luca.boccassi 2022-11-17 23:08 ` patch 'ring: remove leftover comment about watermark' " luca.boccassi 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5ae609e3f60b9ee4a08ab8210067e0a57862442b Thanks. Luca Boccassi --- From 5ae609e3f60b9ee4a08ab8210067e0a57862442b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Tue, 11 Oct 2022 14:48:35 -0700 Subject: [PATCH] doc: fix net drivers ordering [ upstream commit 5135eedeea910920f3351cb570dc40dd4fde23af ] The list was not quite in alpha order, and it looked like it should be. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/nics/index.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index 3443617755..8c7b0e7351 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -26,6 +26,7 @@ Network Interface Controller Drivers ena enetc enic + fail_safe fm10k hinic hns3 @@ -33,10 +34,10 @@ Network Interface Controller Drivers ice igb igc + intel_vf ionic ipn3ke ixgbe - intel_vf kni liquidio memif @@ -50,6 +51,7 @@ Network Interface Controller Drivers null octeontx octeontx2 + pcap_ring pfe qede sfc_efx @@ -59,8 +61,6 @@ Network Interface Controller Drivers thunderx txgbe vdev_netvsc - virtio vhost + virtio vmxnet3 - pcap_ring - fail_safe -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.836109105 +0000 +++ 0032-doc-fix-net-drivers-ordering.patch 2022-11-17 23:07:55.560331899 +0000 @@ -1 +1 @@ -From 5135eedeea910920f3351cb570dc40dd4fde23af Mon Sep 17 00:00:00 2001 +From 5ae609e3f60b9ee4a08ab8210067e0a57862442b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5135eedeea910920f3351cb570dc40dd4fde23af ] + @@ -11,2 +13,2 @@ - doc/guides/nics/index.rst | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + doc/guides/nics/index.rst | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) @@ -15 +17 @@ -index 12841ce407..df58a237ca 100644 +index 3443617755..8c7b0e7351 100644 @@ -18 +20,2 @@ -@@ -28,6 +28,7 @@ Network Interface Controller Drivers +@@ -26,6 +26,7 @@ Network Interface Controller Drivers + ena @@ -20 +22,0 @@ - enetfec @@ -24 +25,0 @@ - gve @@ -26,2 +27,3 @@ -@@ -37,10 +38,10 @@ Network Interface Controller Drivers - idpf + hns3 +@@ -33,10 +34,10 @@ Network Interface Controller Drivers + ice @@ -37,4 +39,2 @@ - mana -@@ -54,8 +55,9 @@ Network Interface Controller Drivers - nfp - ngbe + memif +@@ -50,6 +51,7 @@ Network Interface Controller Drivers @@ -42,3 +42,2 @@ -- octeontx - octeon_ep -+ octeontx + octeontx + octeontx2 @@ -49 +48 @@ -@@ -64,8 +66,6 @@ Network Interface Controller Drivers +@@ -59,8 +61,6 @@ Network Interface Controller Drivers ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'ring: fix description' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (30 preceding siblings ...) 2022-11-17 23:08 ` patch 'doc: fix net drivers ordering' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-17 23:08 ` patch 'ring: remove leftover comment about watermark' " luca.boccassi 32 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Haiyue Wang; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/229138af8427090e3693c3a2332667149315b8d9 Thanks. Luca Boccassi --- From 229138af8427090e3693c3a2332667149315b8d9 Mon Sep 17 00:00:00 2001 From: Haiyue Wang <haiyue.wang@intel.com> Date: Fri, 8 Apr 2022 20:40:42 +0800 Subject: [PATCH] ring: fix description [ upstream commit a2248c87e2ba9aa0b455e8b4b90ec713aa212749 ] The index description isn't right, correct it as the Programmer's guide said. Also correct the guide's figure description about 'Dequeue First Step'. Fixes: 4a22e6ee3d2f ("doc: refactor figure numbers into references") Fixes: af75078fece3 ("first public release") Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> --- doc/guides/prog_guide/ring_lib.rst | 2 +- lib/librte_ring/rte_ring_core.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/ring_lib.rst b/doc/guides/prog_guide/ring_lib.rst index 54e0bb4b68..515a715266 100644 --- a/doc/guides/prog_guide/ring_lib.rst +++ b/doc/guides/prog_guide/ring_lib.rst @@ -172,7 +172,7 @@ If there are not enough objects in the ring (this is detected by checking prod_t .. figure:: img/ring-dequeue1.* - Dequeue last step + Dequeue first step Dequeue Second Step diff --git a/lib/librte_ring/rte_ring_core.h b/lib/librte_ring/rte_ring_core.h index 25d2244a69..0503d5798e 100644 --- a/lib/librte_ring/rte_ring_core.h +++ b/lib/librte_ring/rte_ring_core.h @@ -114,8 +114,8 @@ struct rte_ring_hts_headtail { * An RTE ring structure. * * The producer and the consumer have a head and a tail index. The particularity - * of these index is that they are not between 0 and size(ring). These indexes - * are between 0 and 2^32, and we mask their value when we access the ring[] + * of these index is that they are not between 0 and size(ring)-1. These indexes + * are between 0 and 2^32 -1, and we mask their value when we access the ring[] * field. Thanks to this assumption, we can do subtractions between 2 index * values in a modulo-32bit base: that's why the overflow of the indexes is not * a problem. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.870092112 +0000 +++ 0033-ring-fix-description.patch 2022-11-17 23:07:55.560331899 +0000 @@ -1 +1 @@ -From a2248c87e2ba9aa0b455e8b4b90ec713aa212749 Mon Sep 17 00:00:00 2001 +From 229138af8427090e3693c3a2332667149315b8d9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a2248c87e2ba9aa0b455e8b4b90ec713aa212749 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - lib/ring/rte_ring_core.h | 4 ++-- + lib/librte_ring/rte_ring_core.h | 4 ++-- @@ -34,5 +35,5 @@ -diff --git a/lib/ring/rte_ring_core.h b/lib/ring/rte_ring_core.h -index 1252ca9546..82b237091b 100644 ---- a/lib/ring/rte_ring_core.h -+++ b/lib/ring/rte_ring_core.h -@@ -111,8 +111,8 @@ struct rte_ring_hts_headtail { +diff --git a/lib/librte_ring/rte_ring_core.h b/lib/librte_ring/rte_ring_core.h +index 25d2244a69..0503d5798e 100644 +--- a/lib/librte_ring/rte_ring_core.h ++++ b/lib/librte_ring/rte_ring_core.h +@@ -114,8 +114,8 @@ struct rte_ring_hts_headtail { ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'ring: remove leftover comment about watermark' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi ` (31 preceding siblings ...) 2022-11-17 23:08 ` patch 'ring: fix description' " luca.boccassi @ 2022-11-17 23:08 ` luca.boccassi 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi 32 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-17 23:08 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/19/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/93e9188a15569bab40c8254e1528d1aac95d7b65 Thanks. Luca Boccassi --- From 93e9188a15569bab40c8254e1528d1aac95d7b65 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Tue, 31 May 2022 10:20:41 -0700 Subject: [PATCH] ring: remove leftover comment about watermark [ upstream commit 21dc24b746a7135dd799b462d9a6479dfd54a92f ] The watermark support was removed from rte_ring since version 17.02 but there is leftover in comments. Fixes: 77dd3064270c ("ring: remove watermark support") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/librte_ring/rte_ring.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index 937cfbb7a0..6f040dba55 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -66,10 +66,9 @@ ssize_t rte_ring_get_memsize(unsigned int count); * object table. It is advised to use rte_ring_get_memsize() to get the * appropriate size. * - * The ring size is set to *count*, which must be a power of two. Water - * marking is disabled by default. The real usable ring size is - * *count-1* instead of *count* to differentiate a free ring from an - * empty ring. + * The ring size is set to *count*, which must be a power of two. + * The real usable ring size is *count-1* instead of *count* to + * differentiate a full ring from an empty ring. * * The ring is not added in RTE_TAILQ_RING global list. Indeed, the * memory given by the caller may not be shareable among dpdk @@ -119,10 +118,9 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, * This function uses ``memzone_reserve()`` to allocate memory. Then it * calls rte_ring_init() to initialize an empty ring. * - * The new ring size is set to *count*, which must be a power of - * two. Water marking is disabled by default. The real usable ring size - * is *count-1* instead of *count* to differentiate a free ring from an - * empty ring. + * The new ring size is set to *count*, which must be a power of two. + * The real usable ring size is *count-1* instead of *count* to + * differentiate a full ring from an empty ring. * * The ring is added in RTE_TAILQ_RING list. * -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-17 23:07:56.904237065 +0000 +++ 0034-ring-remove-leftover-comment-about-watermark.patch 2022-11-17 23:07:55.560331899 +0000 @@ -1 +1 @@ -From 21dc24b746a7135dd799b462d9a6479dfd54a92f Mon Sep 17 00:00:00 2001 +From 93e9188a15569bab40c8254e1528d1aac95d7b65 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 21dc24b746a7135dd799b462d9a6479dfd54a92f ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -14 +15 @@ - lib/ring/rte_ring.h | 14 ++++++-------- + lib/librte_ring/rte_ring.h | 14 ++++++-------- @@ -17,4 +18,4 @@ -diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h -index 7c48e35d27..7e4cd60650 100644 ---- a/lib/ring/rte_ring.h -+++ b/lib/ring/rte_ring.h +diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h +index 937cfbb7a0..6f040dba55 100644 +--- a/lib/librte_ring/rte_ring.h ++++ b/lib/librte_ring/rte_ring.h @@ -27 +28 @@ -- * *count-1* instead of *count* to differentiate a full ring from an +- * *count-1* instead of *count* to differentiate a free ring from an @@ -35 +36 @@ -@@ -127,10 +126,9 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, +@@ -119,10 +118,9 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, @@ -41 +42 @@ -- * is *count-1* instead of *count* to differentiate a full ring from an +- * is *count-1* instead of *count* to differentiate a free ring from an ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'vdpa/ifc: handle data path update failure' has been queued to stable release 20.11.7 2022-11-17 23:08 ` patch 'ring: remove leftover comment about watermark' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'service: fix build with clang 15' " luca.boccassi ` (15 more replies) 0 siblings, 16 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Taekyung Kim; +Cc: Chenbo Xia, Maxime Coquelin, Andy Pei, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/67792ab2fd401cb62c5b0d64dbf1b3e01e1a854c Thanks. Luca Boccassi --- From 67792ab2fd401cb62c5b0d64dbf1b3e01e1a854c Mon Sep 17 00:00:00 2001 From: Taekyung Kim <kim.tae.kyung@navercorp.com> Date: Thu, 10 Nov 2022 13:09:43 +0900 Subject: [PATCH] vdpa/ifc: handle data path update failure [ upstream commit 903ec2b1b49e496815c016b0104fd655cd972661 ] Stop and return the error code when update_datapath fails. update_datapath prepares resources for the vdpa device. The driver should not perform any further actions if update_datapath returns an error. Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver") Signed-off-by: Taekyung Kim <kim.tae.kyung@navercorp.com> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Andy Pei <andy.pei@intel.com> --- drivers/vdpa/ifc/ifcvf_vdpa.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index 85bca09377..4dbfd1a71d 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -894,7 +894,12 @@ ifcvf_dev_config(int vid) internal = list->internal; internal->vid = vid; rte_atomic32_set(&internal->dev_attached, 1); - update_datapath(internal); + if (update_datapath(internal) < 0) { + DRV_LOG(ERR, "failed to update datapath for vDPA device %s", + vdev->device->name); + rte_atomic32_set(&internal->dev_attached, 0); + return -1; + } if (rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, true) != 0) DRV_LOG(NOTICE, "vDPA (%s): software relay is used.", @@ -936,7 +941,12 @@ ifcvf_dev_close(int vid) internal->sw_fallback_running = false; } else { rte_atomic32_set(&internal->dev_attached, 0); - update_datapath(internal); + if (update_datapath(internal) < 0) { + DRV_LOG(ERR, "failed to update datapath for vDPA device %s", + vdev->device->name); + internal->configured = 0; + return -1; + } } internal->configured = 0; @@ -1255,7 +1265,15 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, pthread_mutex_unlock(&internal_list_lock); rte_atomic32_set(&internal->started, 1); - update_datapath(internal); + if (update_datapath(internal) < 0) { + DRV_LOG(ERR, "failed to update datapath %s", pci_dev->name); + rte_atomic32_set(&internal->started, 0); + rte_vdpa_unregister_device(internal->vdev); + pthread_mutex_lock(&internal_list_lock); + TAILQ_REMOVE(&internal_list, list, next); + pthread_mutex_unlock(&internal_list_lock); + goto error; + } rte_kvargs_free(kvlist); return 0; @@ -1284,7 +1302,8 @@ ifcvf_pci_remove(struct rte_pci_device *pci_dev) internal = list->internal; rte_atomic32_set(&internal->started, 0); - update_datapath(internal); + if (update_datapath(internal) < 0) + DRV_LOG(ERR, "failed to update datapath %s", pci_dev->name); rte_pci_unmap_device(internal->pdev); rte_vfio_container_destroy(internal->vfio_container_fd); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.598338961 +0000 +++ 0001-vdpa-ifc-handle-data-path-update-failure.patch 2022-11-22 22:01:31.443523419 +0000 @@ -1 +1 @@ -From 903ec2b1b49e496815c016b0104fd655cd972661 Mon Sep 17 00:00:00 2001 +From 67792ab2fd401cb62c5b0d64dbf1b3e01e1a854c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 903ec2b1b49e496815c016b0104fd655cd972661 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 8dfd49336e..49d68ad1b1 100644 +index 85bca09377..4dbfd1a71d 100644 @@ -26 +27 @@ -@@ -1098,7 +1098,12 @@ ifcvf_dev_config(int vid) +@@ -894,7 +894,12 @@ ifcvf_dev_config(int vid) @@ -38,3 +39,3 @@ - hw = &internal->hw; - for (i = 0; i < hw->nr_vring; i++) { -@@ -1146,7 +1151,12 @@ ifcvf_dev_close(int vid) + if (rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, true) != 0) + DRV_LOG(NOTICE, "vDPA (%s): software relay is used.", +@@ -936,7 +941,12 @@ ifcvf_dev_close(int vid) @@ -54,2 +55,2 @@ -@@ -1752,7 +1762,15 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, - } +@@ -1255,7 +1265,15 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, + pthread_mutex_unlock(&internal_list_lock); @@ -71 +72 @@ -@@ -1781,7 +1799,8 @@ ifcvf_pci_remove(struct rte_pci_device *pci_dev) +@@ -1284,7 +1302,8 @@ ifcvf_pci_remove(struct rte_pci_device *pci_dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'service: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'bus/dpaa: " luca.boccassi ` (14 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Harry van Haaren, Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/10aa7c960a200954ad0a2d4f88779fc849acbea3 Thanks. Luca Boccassi --- From 10aa7c960a200954ad0a2d4f88779fc849acbea3 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:03 +0100 Subject: [PATCH] service: fix build with clang 15 [ upstream commit b41e574c2d2e8d82ec5e22a950e385c73efda850 ] This variable is not used. Bugzilla ID: 1130 Fixes: 21698354c832 ("service: introduce service cores concept") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- lib/librte_eal/common/rte_service.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index e1ff0d2636..4bfa781fd6 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -110,14 +110,12 @@ rte_service_init(void) } int i; - int count = 0; struct rte_config *cfg = rte_eal_get_configuration(); for (i = 0; i < RTE_MAX_LCORE; i++) { if (lcore_config[i].core_role == ROLE_SERVICE) { if ((unsigned int)i == cfg->main_lcore) continue; rte_service_lcore_add(i); - count++; } } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.652940929 +0000 +++ 0002-service-fix-build-with-clang-15.patch 2022-11-22 22:01:31.447523496 +0000 @@ -1 +1 @@ -From b41e574c2d2e8d82ec5e22a950e385c73efda850 Mon Sep 17 00:00:00 2001 +From 10aa7c960a200954ad0a2d4f88779fc849acbea3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b41e574c2d2e8d82ec5e22a950e385c73efda850 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/eal/common/rte_service.c | 2 -- + lib/librte_eal/common/rte_service.c | 2 -- @@ -19,5 +20,5 @@ -diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c -index bcc2e19077..42ca1d001d 100644 ---- a/lib/eal/common/rte_service.c -+++ b/lib/eal/common/rte_service.c -@@ -107,14 +107,12 @@ rte_service_init(void) +diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c +index e1ff0d2636..4bfa781fd6 100644 +--- a/lib/librte_eal/common/rte_service.c ++++ b/lib/librte_eal/common/rte_service.c +@@ -110,14 +110,12 @@ rte_service_init(void) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'bus/dpaa: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi 2022-11-22 22:02 ` patch 'service: fix build with clang 15' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'net/atlantic: " luca.boccassi ` (13 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/efbe9a07aecd8f18186935bcc3298ed1e08c2ccb Thanks. Luca Boccassi --- From efbe9a07aecd8f18186935bcc3298ed1e08c2ccb Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:05 +0100 Subject: [PATCH] bus/dpaa: fix build with clang 15 [ upstream commit 6d58990561fbfc04e2bd53e1778352ad1d117edf ] This variable is not used. Fixes: f38f61e982f8 ("bus/dpaa: add BMAN hardware interfaces") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- drivers/bus/dpaa/base/qbman/bman.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/bman.h b/drivers/bus/dpaa/base/qbman/bman.h index 21a6bee778..b2aa93e046 100644 --- a/drivers/bus/dpaa/base/qbman/bman.h +++ b/drivers/bus/dpaa/base/qbman/bman.h @@ -519,7 +519,6 @@ static inline int bm_shutdown_pool(struct bm_portal *p, u32 bpid) struct bm_mc_command *bm_cmd; struct bm_mc_result *bm_res; - int aq_count = 0; bool stop = false; while (!stop) { @@ -532,8 +531,7 @@ static inline int bm_shutdown_pool(struct bm_portal *p, u32 bpid) if (!(bm_res->verb & BM_MCR_VERB_ACQUIRE_BUFCOUNT)) { /* Pool is empty */ stop = true; - } else - ++aq_count; + } }; return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.723652332 +0000 +++ 0003-bus-dpaa-fix-build-with-clang-15.patch 2022-11-22 22:01:31.455523649 +0000 @@ -1 +1 @@ -From 6d58990561fbfc04e2bd53e1778352ad1d117edf Mon Sep 17 00:00:00 2001 +From efbe9a07aecd8f18186935bcc3298ed1e08c2ccb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6d58990561fbfc04e2bd53e1778352ad1d117edf ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/atlantic: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi 2022-11-22 22:02 ` patch 'service: fix build with clang 15' " luca.boccassi 2022-11-22 22:02 ` patch 'bus/dpaa: " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'app/testpmd: " luca.boccassi ` (12 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0774d494be72108ed40fb9b87dc799e1114ccb7a Thanks. Luca Boccassi --- From 0774d494be72108ed40fb9b87dc799e1114ccb7a Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:06 +0100 Subject: [PATCH] net/atlantic: fix build with clang 15 [ upstream commit f25fa03ad1a9df09870b55efa8b543ca60ab1b88 ] This variable is not used. Fixes: 2b1472d7150c ("net/atlantic: implement Tx path") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- drivers/net/atlantic/atl_rxtx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 8b3c74ece0..fd2aedc64c 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atlantic/atl_rxtx.c @@ -1132,10 +1132,9 @@ atl_xmit_cleanup(struct atl_tx_queue *txq) if (txq != NULL) { sw_ring = txq->sw_ring; int head = txq->tx_head; - int cnt; - int i; + int cnt = head; - for (i = 0, cnt = head; ; i++) { + while (true) { txd = &txq->hw_ring[cnt]; if (txd->dd) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.793419931 +0000 +++ 0004-net-atlantic-fix-build-with-clang-15.patch 2022-11-22 22:01:31.463523804 +0000 @@ -1 +1 @@ -From f25fa03ad1a9df09870b55efa8b543ca60ab1b88 Mon Sep 17 00:00:00 2001 +From 0774d494be72108ed40fb9b87dc799e1114ccb7a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f25fa03ad1a9df09870b55efa8b543ca60ab1b88 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index aeb79bf5a2..cb6f8141a8 100644 +index 8b3c74ece0..fd2aedc64c 100644 @@ -21 +22 @@ -@@ -1127,10 +1127,9 @@ atl_xmit_cleanup(struct atl_tx_queue *txq) +@@ -1132,10 +1132,9 @@ atl_xmit_cleanup(struct atl_tx_queue *txq) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'app/testpmd: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (2 preceding siblings ...) 2022-11-22 22:02 ` patch 'net/atlantic: " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'app/testpmd: fix build with clang 15 in flow code' " luca.boccassi ` (11 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/d81102bcb08f00000d7950bf5069e96111b795d1 Thanks. Luca Boccassi --- From d81102bcb08f00000d7950bf5069e96111b795d1 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:09 +0100 Subject: [PATCH] app/testpmd: fix build with clang 15 [ upstream commit ff3cc8657549a313d7d3199bc38fbcd0d8090bff ] This variable is used to create some artificial load. Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- app/test-pmd/noisy_vnf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c index a92e810190..d70940006d 100644 --- a/app/test-pmd/noisy_vnf.c +++ b/app/test-pmd/noisy_vnf.c @@ -56,8 +56,8 @@ do_write(char *vnf_mem) static inline void do_read(char *vnf_mem) { + uint64_t r __rte_unused; uint64_t i = rte_rand(); - uint64_t r; r = vnf_mem[i % ((noisy_lkup_mem_sz * 1024 * 1024) / RTE_CACHE_LINE_SIZE)]; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.862745289 +0000 +++ 0005-app-testpmd-fix-build-with-clang-15.patch 2022-11-22 22:01:31.467523881 +0000 @@ -1 +1 @@ -From ff3cc8657549a313d7d3199bc38fbcd0d8090bff Mon Sep 17 00:00:00 2001 +From d81102bcb08f00000d7950bf5069e96111b795d1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ff3cc8657549a313d7d3199bc38fbcd0d8090bff ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index b17a1febd3..c65ec6f06a 100644 +index a92e810190..d70940006d 100644 @@ -21 +22 @@ -@@ -57,8 +57,8 @@ do_write(char *vnf_mem) +@@ -56,8 +56,8 @@ do_write(char *vnf_mem) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'app/testpmd: fix build with clang 15 in flow code' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (3 preceding siblings ...) 2022-11-22 22:02 ` patch 'app/testpmd: " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'test/efd: fix build with clang 15' " luca.boccassi ` (10 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1b0e836662deb509ba4d1010ee1f9bbdd5556d72 Thanks. Luca Boccassi --- From 1b0e836662deb509ba4d1010ee1f9bbdd5556d72 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:10 +0100 Subject: [PATCH] app/testpmd: fix build with clang 15 in flow code [ upstream commit 2809981e858f5cfa3ea9182e400a2c67f7c4744d ] This variable is not used and has been copy/pasted in a lot of other code. Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API") Fixes: 55509e3a49fb ("app/testpmd: support shared flow action") Fixes: 04cc665fab38 ("app/testpmd: add flow template management") Fixes: c4b38873346b ("app/testpmd: add flow table management") Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations") Fixes: d906fff51878 ("app/testpmd: add async indirect actions operations") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- app/test-pmd/config.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f3ffc23ecd..9e2e8aeb8f 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1842,7 +1842,6 @@ port_shared_action_destroy(portid_t port_id, { struct rte_port *port; struct port_shared_action **tmp; - uint32_t c = 0; int ret = 0; if (port_id_is_invalid(port_id, ENABLED_WARN) || @@ -1877,7 +1876,6 @@ port_shared_action_destroy(portid_t port_id, } if (i == n) tmp = &(*tmp)->next; - ++c; } return ret; } @@ -2186,7 +2184,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) { struct rte_port *port; struct port_flow **tmp; - uint32_t c = 0; int ret = 0; if (port_id_is_invalid(port_id, ENABLED_WARN) || @@ -2219,7 +2216,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) } if (i == n) tmp = &(*tmp)->next; - ++c; } return ret; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.922900641 +0000 +++ 0006-app-testpmd-fix-build-with-clang-15-in-flow-code.patch 2022-11-22 22:01:31.483524189 +0000 @@ -1 +1 @@ -From 2809981e858f5cfa3ea9182e400a2c67f7c4744d Mon Sep 17 00:00:00 2001 +From 1b0e836662deb509ba4d1010ee1f9bbdd5556d72 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2809981e858f5cfa3ea9182e400a2c67f7c4744d ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -20,2 +21,2 @@ - app/test-pmd/config.c | 14 -------------- - 1 file changed, 14 deletions(-) + app/test-pmd/config.c | 4 ---- + 1 file changed, 4 deletions(-) @@ -24 +25 @@ -index 982549ffed..9103ba6c77 100644 +index f3ffc23ecd..9e2e8aeb8f 100644 @@ -27,33 +28 @@ -@@ -1787,7 +1787,6 @@ port_action_handle_destroy(portid_t port_id, - { - struct rte_port *port; - struct port_indirect_action **tmp; -- uint32_t c = 0; - int ret = 0; - - if (port_id_is_invalid(port_id, ENABLED_WARN) || -@@ -1822,7 +1821,6 @@ port_action_handle_destroy(portid_t port_id, - } - if (i == n) - tmp = &(*tmp)->next; -- ++c; - } - return ret; - } -@@ -2251,7 +2249,6 @@ port_flow_pattern_template_destroy(portid_t port_id, uint32_t n, - { - struct rte_port *port; - struct port_template **tmp; -- uint32_t c = 0; - int ret = 0; - - if (port_id_is_invalid(port_id, ENABLED_WARN) || -@@ -2288,7 +2285,6 @@ port_flow_pattern_template_destroy(portid_t port_id, uint32_t n, - } - if (i == n) - tmp = &(*tmp)->next; -- ++c; - } - return ret; - } -@@ -2368,7 +2364,6 @@ port_flow_actions_template_destroy(portid_t port_id, uint32_t n, +@@ -1842,7 +1842,6 @@ port_shared_action_destroy(portid_t port_id, @@ -62 +31 @@ - struct port_template **tmp; + struct port_shared_action **tmp; @@ -67,49 +36 @@ -@@ -2404,7 +2399,6 @@ port_flow_actions_template_destroy(portid_t port_id, uint32_t n, - } - if (i == n) - tmp = &(*tmp)->next; -- ++c; - } - return ret; - } -@@ -2534,7 +2528,6 @@ port_flow_template_table_destroy(portid_t port_id, - { - struct rte_port *port; - struct port_table **tmp; -- uint32_t c = 0; - int ret = 0; - - if (port_id_is_invalid(port_id, ENABLED_WARN) || -@@ -2571,7 +2564,6 @@ port_flow_template_table_destroy(portid_t port_id, - } - if (i == n) - tmp = &(*tmp)->next; -- ++c; - } - return ret; - } -@@ -2719,7 +2711,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id, - struct rte_flow_op_attr op_attr = { .postpone = postpone }; - struct rte_port *port; - struct port_flow **tmp; -- uint32_t c = 0; - int ret = 0; - struct queue_job *job; - -@@ -2768,7 +2759,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id, - } - if (i == n) - tmp = &(*tmp)->next; -- ++c; - } - return ret; - } -@@ -2836,7 +2826,6 @@ port_queue_action_handle_destroy(portid_t port_id, - const struct rte_flow_op_attr attr = { .postpone = postpone}; - struct rte_port *port; - struct port_indirect_action **tmp; -- uint32_t c = 0; - int ret = 0; - struct queue_job *job; - -@@ -2886,7 +2875,6 @@ port_queue_action_handle_destroy(portid_t port_id, +@@ -1877,7 +1876,6 @@ port_shared_action_destroy(portid_t port_id, @@ -123 +44 @@ -@@ -3304,7 +3292,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) +@@ -2186,7 +2184,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) @@ -131 +52 @@ -@@ -3337,7 +3324,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) +@@ -2219,7 +2216,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/efd: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (4 preceding siblings ...) 2022-11-22 22:02 ` patch 'app/testpmd: fix build with clang 15 in flow code' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'test/member: " luca.boccassi ` (9 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4551b84ba2c9ff0b04eb341d31af11616267e147 Thanks. Luca Boccassi --- From 4551b84ba2c9ff0b04eb341d31af11616267e147 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:11 +0100 Subject: [PATCH] test/efd: fix build with clang 15 [ upstream commit 94ec062953778f986af4261c7f6eb31af7c84202 ] This local variable hides the more global one. The original intent was probably to use the global one. Fixes: 0e925aef2779 ("app/test: add EFD functional and perf tests") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- app/test/test_efd_perf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c index 1c47704475..85d39490fc 100644 --- a/app/test/test_efd_perf.c +++ b/app/test/test_efd_perf.c @@ -143,7 +143,6 @@ setup_keys_and_data(struct efd_perf_params *params, unsigned int cycle) qsort(keys, KEYS_TO_ADD, MAX_KEYSIZE, key_compare); /* Sift through the list of keys and look for duplicates */ - int num_duplicates = 0; for (i = 0; i < KEYS_TO_ADD - 1; i++) { if (memcmp(keys[i], keys[i + 1], params->key_size) == 0) { /* This key already exists, try again */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:31.987479280 +0000 +++ 0007-test-efd-fix-build-with-clang-15.patch 2022-11-22 22:01:31.483524189 +0000 @@ -1 +1 @@ -From 94ec062953778f986af4261c7f6eb31af7c84202 Mon Sep 17 00:00:00 2001 +From 4551b84ba2c9ff0b04eb341d31af11616267e147 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 94ec062953778f986af4261c7f6eb31af7c84202 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d7f4d83549..4d04ed93e3 100644 +index 1c47704475..85d39490fc 100644 @@ -22 +23 @@ -@@ -153,7 +153,6 @@ setup_keys_and_data(struct efd_perf_params *params, unsigned int cycle) +@@ -143,7 +143,6 @@ setup_keys_and_data(struct efd_perf_params *params, unsigned int cycle) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/member: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (5 preceding siblings ...) 2022-11-22 22:02 ` patch 'test/efd: fix build with clang 15' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'test/event: " luca.boccassi ` (8 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/89baaef40e6a301bcd658d41a0b21c09ab4a202c Thanks. Luca Boccassi --- From 89baaef40e6a301bcd658d41a0b21c09ab4a202c Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:12 +0100 Subject: [PATCH] test/member: fix build with clang 15 [ upstream commit 8f8ed0c1f7f20d821eba41f51243e805b66e2579 ] This local variable hides the more global one. The original intent was probably to use the global one. Fixes: 0cc67a96e486 ("test/member: add functional and perf tests") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> --- app/test/test_member.c | 1 - app/test/test_member_perf.c | 1 - 2 files changed, 2 deletions(-) diff --git a/app/test/test_member.c b/app/test/test_member.c index af9d50915c..bb9b0228df 100644 --- a/app/test/test_member.c +++ b/app/test/test_member.c @@ -545,7 +545,6 @@ setup_keys_and_data(void) qsort(generated_keys, MAX_ENTRIES, KEY_SIZE, key_compare); /* Sift through the list of keys and look for duplicates */ - int num_duplicates = 0; for (i = 0; i < MAX_ENTRIES - 1; i++) { if (memcmp(generated_keys[i], generated_keys[i + 1], KEY_SIZE) == 0) { diff --git a/app/test/test_member_perf.c b/app/test/test_member_perf.c index e2840f12d3..a312401992 100644 --- a/app/test/test_member_perf.c +++ b/app/test/test_member_perf.c @@ -150,7 +150,6 @@ setup_keys_and_data(struct member_perf_params *params, unsigned int cycle, qsort(keys, KEYS_TO_ADD, MAX_KEYSIZE, key_compare); /* Sift through the list of keys and look for duplicates */ - int num_duplicates = 0; for (i = 0; i < KEYS_TO_ADD - 1; i++) { if (memcmp(keys[i], keys[i + 1], params->key_size) == 0) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.053217072 +0000 +++ 0008-test-member-fix-build-with-clang-15.patch 2022-11-22 22:01:31.491524342 +0000 @@ -1 +1 @@ -From 8f8ed0c1f7f20d821eba41f51243e805b66e2579 Mon Sep 17 00:00:00 2001 +From 89baaef40e6a301bcd658d41a0b21c09ab4a202c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8f8ed0c1f7f20d821eba41f51243e805b66e2579 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index c1b6a7d8b9..4a93f8bff4 100644 +index af9d50915c..bb9b0228df 100644 @@ -23 +24 @@ -@@ -573,7 +573,6 @@ setup_keys_and_data(void) +@@ -545,7 +545,6 @@ setup_keys_and_data(void) @@ -32 +33 @@ -index 7b6adf913e..2f79888fbd 100644 +index e2840f12d3..a312401992 100644 @@ -35 +36 @@ -@@ -178,7 +178,6 @@ setup_keys_and_data(struct member_perf_params *params, unsigned int cycle, +@@ -150,7 +150,6 @@ setup_keys_and_data(struct member_perf_params *params, unsigned int cycle, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'test/event: fix build with clang 15' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (6 preceding siblings ...) 2022-11-22 22:02 ` patch 'test/member: " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'net/ixgbevf: fix promiscuous and allmulti' " luca.boccassi ` (7 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: David Marchand; +Cc: Tyler Retzlaff, Daxue Gao, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/56ef2f93d408eba8184ceed2109849c28b7d7011 Thanks. Luca Boccassi --- From 56ef2f93d408eba8184ceed2109849c28b7d7011 Mon Sep 17 00:00:00 2001 From: David Marchand <david.marchand@redhat.com> Date: Fri, 18 Nov 2022 09:53:13 +0100 Subject: [PATCH] test/event: fix build with clang 15 [ upstream commit ff5b90f9d0675f1fa92b449ed086b6641301be51 ] This variable is not used. Fixes: d1f3385d0076 ("test: add event timer adapter auto-test") Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Tested-by: Daxue Gao <daxuex.gao@intel.com> --- app/test/test_event_timer_adapter.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c index efd86cad58..622c62f914 100644 --- a/app/test/test_event_timer_adapter.c +++ b/app/test/test_event_timer_adapter.c @@ -764,7 +764,6 @@ _cancel_thread(void *args) { RTE_SET_USED(args); struct rte_event_timer *ev_tim = NULL; - uint64_t cancel_count = 0; uint16_t ret; while (!arm_done || rte_ring_count(timer_producer_ring) > 0) { @@ -774,7 +773,6 @@ _cancel_thread(void *args) ret = rte_event_timer_cancel_burst(timdev, &ev_tim, 1); TEST_ASSERT_EQUAL(ret, 1, "Failed to cancel timer"); rte_mempool_put(eventdev_test_mempool, (void *)ev_tim); - cancel_count++; } return TEST_SUCCESS; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.117529031 +0000 +++ 0009-test-event-fix-build-with-clang-15.patch 2022-11-22 22:01:31.491524342 +0000 @@ -1 +1 @@ -From ff5b90f9d0675f1fa92b449ed086b6641301be51 Mon Sep 17 00:00:00 2001 +From 56ef2f93d408eba8184ceed2109849c28b7d7011 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ff5b90f9d0675f1fa92b449ed086b6641301be51 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 654c412836..1a440dfd10 100644 +index efd86cad58..622c62f914 100644 @@ -22 +23 @@ -@@ -911,7 +911,6 @@ _cancel_thread(void *args) +@@ -764,7 +764,6 @@ _cancel_thread(void *args) @@ -30 +31 @@ -@@ -921,7 +920,6 @@ _cancel_thread(void *args) +@@ -774,7 +773,6 @@ _cancel_thread(void *args) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/ixgbevf: fix promiscuous and allmulti' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (7 preceding siblings ...) 2022-11-22 22:02 ` patch 'test/event: " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'net/mlx5: fix maximum LRO message size' " luca.boccassi ` (6 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Olivier Matz; +Cc: Wenjun Wu, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Thanks. Luca Boccassi --- From 035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:21:55 +0200 Subject: [PATCH] net/ixgbevf: fix promiscuous and allmulti [ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ] The configuration of allmulti and promiscuous modes conflicts together. For instance, if we enable promiscuous mode, then enable and disable allmulti, then the promiscuous mode is wrongly disabled. Fix this behavior by: - doing nothing when we set/unset allmulti if promiscuous mode is on - restorting the proper mode (none or allmulti) when we disable promiscuous mode Fixes: 1f4564ed7696 ("net/ixgbevf: enable promiscuous mode") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Wenjun Wu <wenjun1.wu@intel.com> --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 3bd4a838e5..cee7ee33f3 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -8033,9 +8033,13 @@ static int ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + int mode = IXGBEVF_XCAST_MODE_NONE; int ret; - switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE)) { + if (dev->data->all_multicast) + mode = IXGBEVF_XCAST_MODE_ALLMULTI; + + switch (hw->mac.ops.update_xcast_mode(hw, mode)) { case IXGBE_SUCCESS: ret = 0; break; @@ -8057,6 +8061,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) int ret; int mode = IXGBEVF_XCAST_MODE_ALLMULTI; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, mode)) { case IXGBE_SUCCESS: ret = 0; @@ -8078,6 +8085,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); int ret; + if (dev->data->promiscuous) + return 0; + switch (hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_MULTI)) { case IXGBE_SUCCESS: ret = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.181832353 +0000 +++ 0010-net-ixgbevf-fix-promiscuous-and-allmulti.patch 2022-11-22 22:01:31.507524649 +0000 @@ -1 +1 @@ -From 21e471abb548f91190479c75da0c28ebc25dec36 Mon Sep 17 00:00:00 2001 +From 035d9a8422e0f1a00fda7bfc8503efe7bbf08966 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 21e471abb548f91190479c75da0c28ebc25dec36 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index fd06ddbe35..ae9f65b334 100644 +index 3bd4a838e5..cee7ee33f3 100644 @@ -28 +29 @@ -@@ -7787,9 +7787,13 @@ static int +@@ -8033,9 +8033,13 @@ static int @@ -43 +44 @@ -@@ -7811,6 +7815,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) +@@ -8057,6 +8061,9 @@ ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) @@ -53 +54 @@ -@@ -7832,6 +7839,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) +@@ -8078,6 +8085,9 @@ ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/mlx5: fix maximum LRO message size' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (8 preceding siblings ...) 2022-11-22 22:02 ` patch 'net/ixgbevf: fix promiscuous and allmulti' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'doc: add LRO size limitation in mlx5 guide' " luca.boccassi ` (5 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ee96651e5a998f0b84e7f84936ae676281876fe5 Thanks. Luca Boccassi --- From ee96651e5a998f0b84e7f84936ae676281876fe5 Mon Sep 17 00:00:00 2001 From: Gregory Etelson <getelson@nvidia.com> Date: Thu, 17 Nov 2022 16:39:00 +0200 Subject: [PATCH] net/mlx5: fix maximum LRO message size [ upstream commit a23640047c361500c0fe4a3e52394bb7b2e9faa5 ] The PMD analyzes each Rx queue maximal LRO size and selects one that fits all queues to configure TIR LRO attribute. TIR LRO attribute is number of 256 bytes chunks that match the selected maximal LRO size. PMD used `priv->max_lro_msg_size` for selected maximal LRO size and number of TIR chunks. Fixes: b9f1f4c239 ("net/mlx5: fix port initialization with small LRO") Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- drivers/net/mlx5/mlx5.h | 2 +- drivers/net/mlx5/mlx5_devx.c | 3 ++- drivers/net/mlx5/mlx5_rxq.c | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 69fb34826d..1f47c433eb 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -981,7 +981,7 @@ struct mlx5_priv { uint32_t refcnt; /**< Reference counter. */ /**< Verbs modify header action object. */ uint8_t ft_type; /**< Flow table type, Rx or Tx. */ - uint8_t max_lro_msg_size; + uint32_t max_lro_msg_size; /* Tags resources cache. */ uint32_t link_speed_capa; /* Link speed capabilities. */ struct mlx5_xstats_ctrl xstats_ctrl; /* Extended stats control. */ diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c index b2c770f537..b0bc61bd7b 100644 --- a/drivers/net/mlx5/mlx5_devx.c +++ b/drivers/net/mlx5/mlx5_devx.c @@ -905,7 +905,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST; if (lro) { tir_attr->lro_timeout_period_usecs = priv->config.lro.timeout; - tir_attr->lro_max_msg_sz = priv->max_lro_msg_size; + tir_attr->lro_max_msg_sz = + priv->max_lro_msg_size / MLX5_LRO_SEG_CHUNK_SIZE; tir_attr->lro_enable_mask = MLX5_TIRC_LRO_ENABLE_MASK_IPV4_LRO | MLX5_TIRC_LRO_ENABLE_MASK_IPV6_LRO; diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 048d1c571b..5d659738fe 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, MLX5_MAX_TCP_HDR_OFFSET) max_lro_size -= MLX5_MAX_TCP_HDR_OFFSET; max_lro_size = RTE_MIN(max_lro_size, MLX5_MAX_LRO_SIZE); - max_lro_size /= MLX5_LRO_SEG_CHUNK_SIZE; if (priv->max_lro_msg_size) priv->max_lro_msg_size = RTE_MIN((uint32_t)priv->max_lro_msg_size, max_lro_size); @@ -1386,8 +1385,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, priv->max_lro_msg_size = max_lro_size; DRV_LOG(DEBUG, "port %u Rx Queue %u max LRO message size adjusted to %u bytes", - dev->data->port_id, idx, - priv->max_lro_msg_size * MLX5_LRO_SEG_CHUNK_SIZE); + dev->data->port_id, idx, priv->max_lro_msg_size); } /** -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.257195291 +0000 +++ 0011-net-mlx5-fix-maximum-LRO-message-size.patch 2022-11-22 22:01:31.515524803 +0000 @@ -1 +1 @@ -From a23640047c361500c0fe4a3e52394bb7b2e9faa5 Mon Sep 17 00:00:00 2001 +From ee96651e5a998f0b84e7f84936ae676281876fe5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a23640047c361500c0fe4a3e52394bb7b2e9faa5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 02bee5808d..31982002ee 100644 +index 69fb34826d..1f47c433eb 100644 @@ -29 +30 @@ -@@ -1711,7 +1711,7 @@ struct mlx5_priv { +@@ -981,7 +981,7 @@ struct mlx5_priv { @@ -34,0 +36 @@ + /* Tags resources cache. */ @@ -37 +38,0 @@ - struct mlx5_stats_ctrl stats_ctrl; /* Stats control. */ @@ -39 +40 @@ -index c1305836cf..02deaac612 100644 +index b2c770f537..b0bc61bd7b 100644 @@ -42 +43,2 @@ -@@ -870,7 +870,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, +@@ -905,7 +905,8 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, + MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST; @@ -44,2 +46 @@ - MLX5_ASSERT(priv->sh->config.lro_allowed); - tir_attr->lro_timeout_period_usecs = priv->config.lro_timeout; + tir_attr->lro_timeout_period_usecs = priv->config.lro.timeout; @@ -53 +54 @@ -index 724cd6c7e6..81aa3f074a 100644 +index 048d1c571b..5d659738fe 100644 @@ -56 +57 @@ -@@ -1533,7 +1533,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, +@@ -1378,7 +1378,6 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, @@ -64 +65 @@ -@@ -1541,8 +1540,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, +@@ -1386,8 +1385,7 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx, ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: add LRO size limitation in mlx5 guide' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (9 preceding siblings ...) 2022-11-22 22:02 ` patch 'net/mlx5: fix maximum LRO message size' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix underlines in testpmd " luca.boccassi ` (4 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/aaa746b08d0f6d03475701001a126be48079119c Thanks. Luca Boccassi --- From aaa746b08d0f6d03475701001a126be48079119c Mon Sep 17 00:00:00 2001 From: Gregory Etelson <getelson@nvidia.com> Date: Thu, 17 Nov 2022 16:39:01 +0200 Subject: [PATCH] doc: add LRO size limitation in mlx5 guide [ upstream commit ea75808941c8020c568e47d1ef9b25223258c131 ] Maximal LRO message size must be multiply of 256. Otherwise, TCP payload may not fit into a single WQE. Fixes: 1c7e57f9bd33 ("net/mlx5: set maximum LRO packet size") Signed-off-by: Gregory Etelson <getelson@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com> --- doc/guides/nics/mlx5.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 9322c5327a..6df0bb7e62 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -306,6 +306,8 @@ Limitations TCP header (122B). - Rx queue with LRO offload enabled, receiving a non-LRO packet, can forward it with size limited to max LRO size, not to max RX packet length. + - The driver rounds down the port configuration value ``max_lro_pkt_size`` + (from ``rte_eth_rxmode``) to a multiple of 256 due to hardware limitation. - LRO can be used with outer header of TCP packets of the standard format: eth (with or without vlan) / ipv4 or ipv6 / tcp / payload -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.331111532 +0000 +++ 0012-doc-add-LRO-size-limitation-in-mlx5-guide.patch 2022-11-22 22:01:31.519524881 +0000 @@ -1 +1 @@ -From ea75808941c8020c568e47d1ef9b25223258c131 Mon Sep 17 00:00:00 2001 +From aaa746b08d0f6d03475701001a126be48079119c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ea75808941c8020c568e47d1ef9b25223258c131 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 4f0db21dde..ab9498a91e 100644 +index 9322c5327a..6df0bb7e62 100644 @@ -22 +23 @@ -@@ -404,6 +404,8 @@ Limitations +@@ -306,6 +306,8 @@ Limitations ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix underlines in testpmd guide' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (10 preceding siblings ...) 2022-11-22 22:02 ` patch 'doc: add LRO size limitation in mlx5 guide' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix colons in testpmd aged flow rules' " luca.boccassi ` (3 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Michael Baum; +Cc: Thomas Monjalon, Yuying Zhang, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f6e1845b0c9fa899ee66ac3024ac7f44038b0644 Thanks. Luca Boccassi --- From f6e1845b0c9fa899ee66ac3024ac7f44038b0644 Mon Sep 17 00:00:00 2001 From: Michael Baum <michaelba@nvidia.com> Date: Wed, 16 Nov 2022 14:56:23 +0200 Subject: [PATCH] doc: fix underlines in testpmd guide [ upstream commit fb360c75062d71014c1bba90db64f493fb0ae9e2 ] In testpmd documentation, there are two underlines which do not match the length of the text above. This patch update them to be align with the guideline [1]. [1] https://doc.dpdk.org/guides/contributing/documentation.html#section-headers Fixes: a69c335d56b5 ("doc: add flow dump command in testpmd guide") Fixes: 0e459ffa0889 ("app/testpmd: support flow aging") Signed-off-by: Michael Baum <michaelba@nvidia.com> Reviewed-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Yuying Zhang <yuying.zhang@intel.com> --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 3487e1718c..7d68b8918d 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4241,7 +4241,7 @@ Disabling isolated mode:: testpmd> Dumping HW internal information -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``flow dump`` dumps the hardware's internal representation information of all flows. It is bound to ``rte_flow_dev_dump()``:: @@ -4257,7 +4257,7 @@ Otherwise, it will complain error occurred:: Caught error type [...] ([...]): [...] Listing and destroying aged flow rules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``flow aged`` simply lists aged flow rules be get from api ``rte_flow_get_aged_flows``, and ``destroy`` parameter can be used to destroy those flow rules in PMD. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.393690248 +0000 +++ 0013-doc-fix-underlines-in-testpmd-guide.patch 2022-11-22 22:01:31.527525034 +0000 @@ -1 +1 @@ -From fb360c75062d71014c1bba90db64f493fb0ae9e2 Mon Sep 17 00:00:00 2001 +From f6e1845b0c9fa899ee66ac3024ac7f44038b0644 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fb360c75062d71014c1bba90db64f493fb0ae9e2 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 96c5ae0fe4..b5649d9d9a 100644 +index 3487e1718c..7d68b8918d 100644 @@ -29 +30 @@ -@@ -4240,7 +4240,7 @@ Disabling isolated mode:: +@@ -4241,7 +4241,7 @@ Disabling isolated mode:: @@ -38 +39 @@ -@@ -4256,7 +4256,7 @@ Otherwise, it will complain error occurred:: +@@ -4257,7 +4257,7 @@ Otherwise, it will complain error occurred:: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix colons in testpmd aged flow rules' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (11 preceding siblings ...) 2022-11-22 22:02 ` patch 'doc: fix underlines in testpmd " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'net/nfp: fix Rx descriptor DMA address' " luca.boccassi ` (2 subsequent siblings) 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Michael Baum; +Cc: Thomas Monjalon, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b13e54269eb172b1cbd8ff0060666eb71255b580 Thanks. Luca Boccassi --- From b13e54269eb172b1cbd8ff0060666eb71255b580 Mon Sep 17 00:00:00 2001 From: Michael Baum <michaelba@nvidia.com> Date: Wed, 16 Nov 2022 14:56:24 +0200 Subject: [PATCH] doc: fix colons in testpmd aged flow rules [ upstream commit ea30023e5232084c2a455235487aa862a301fc22 ] In testpmd documentation, for listing aged-out flow rules there is some boxes of examples. In Sphinx syntax, those boxes are achieved by "::" before. However, in two places it uses ":" instead and the example looks like a regular text. This patch replace the ":" with "::" to get code box. Fixes: 0e459ffa0889 ("app/testpmd: support flow aging") Signed-off-by: Michael Baum <michaelba@nvidia.com> Reviewed-by: Thomas Monjalon <thomas@monjalon.net> --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 7d68b8918d..854157ba2c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4260,7 +4260,7 @@ Listing and destroying aged flow rules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``flow aged`` simply lists aged flow rules be get from api ``rte_flow_get_aged_flows``, -and ``destroy`` parameter can be used to destroy those flow rules in PMD. +and ``destroy`` parameter can be used to destroy those flow rules in PMD:: flow aged {port_id} [destroy] @@ -4295,7 +4295,7 @@ will be ID 3, ID 1, ID 0:: 1 0 0 i-- 0 0 0 i-- -If attach ``destroy`` parameter, the command will destroy all the list aged flow rules. +If attach ``destroy`` parameter, the command will destroy all the list aged flow rules:: testpmd> flow aged 0 destroy Port 0 total aged flows: 4 -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.455689012 +0000 +++ 0014-doc-fix-colons-in-testpmd-aged-flow-rules.patch 2022-11-22 22:01:31.535525188 +0000 @@ -1 +1 @@ -From ea30023e5232084c2a455235487aa862a301fc22 Mon Sep 17 00:00:00 2001 +From b13e54269eb172b1cbd8ff0060666eb71255b580 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ea30023e5232084c2a455235487aa862a301fc22 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index b5649d9d9a..b5fea1396c 100644 +index 7d68b8918d..854157ba2c 100644 @@ -28 +29 @@ -@@ -4259,7 +4259,7 @@ Listing and destroying aged flow rules +@@ -4260,7 +4260,7 @@ Listing and destroying aged flow rules @@ -37 +38 @@ -@@ -4294,7 +4294,7 @@ will be ID 3, ID 1, ID 0:: +@@ -4295,7 +4295,7 @@ will be ID 3, ID 1, ID 0:: ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'net/nfp: fix Rx descriptor DMA address' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (12 preceding siblings ...) 2022-11-22 22:02 ` patch 'doc: fix colons in testpmd aged flow rules' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix maximum packet size of virtio driver' " luca.boccassi 2022-11-22 22:02 ` patch 'doc: avoid meson deprecation in setup' " luca.boccassi 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Chaoyong He; +Cc: Niklas Söderlund, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Thanks. Luca Boccassi --- From 6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Mon Sep 17 00:00:00 2001 From: Chaoyong He <chaoyong.he@corigine.com> Date: Fri, 18 Nov 2022 09:44:06 +0800 Subject: [PATCH] net/nfp: fix Rx descriptor DMA address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 0c48f5ad446d17d3039432d629b1537d2b2d1b98 ] When receiving a packet that is larger than the mbuf size, the Rx function will break the receive loop and sent a free list descriptor with random DMA address. Fix this by moving the increment of the free list descriptor counter to after the packet size have been checked and acted on. Fixes: bb340f56fcb7 ("net/nfp: fix memory leak in Rx") Signed-off-by: Chaoyong He <chaoyong.he@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com> --- drivers/net/nfp/nfp_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 1c2b676676..b09ccac345 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2087,8 +2087,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) break; } - nb_hold++; - /* * Grab the mbuf and refill the descriptor with the * previously allocated mbuf @@ -2159,6 +2157,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxds->fld.dd = 0; rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; rxds->fld.dma_addr_lo = dma_addr & 0xffffffff; + nb_hold++; rxq->rd_p++; if (unlikely(rxq->rd_p == rxq->rx_count)) /* wrapping?*/ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.520144669 +0000 +++ 0015-net-nfp-fix-Rx-descriptor-DMA-address.patch 2022-11-22 22:01:31.539525264 +0000 @@ -1 +1 @@ -From 0c48f5ad446d17d3039432d629b1537d2b2d1b98 Mon Sep 17 00:00:00 2001 +From 6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 0c48f5ad446d17d3039432d629b1537d2b2d1b98 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - drivers/net/nfp/nfp_rxtx.c | 3 +-- + drivers/net/nfp/nfp_net.c | 3 +-- @@ -25,5 +26,5 @@ -diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c -index b8c874d315..38377ca218 100644 ---- a/drivers/net/nfp/nfp_rxtx.c -+++ b/drivers/net/nfp/nfp_rxtx.c -@@ -293,8 +293,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c +index 1c2b676676..b09ccac345 100644 +--- a/drivers/net/nfp/nfp_net.c ++++ b/drivers/net/nfp/nfp_net.c +@@ -2087,8 +2087,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) @@ -38 +39 @@ -@@ -365,6 +363,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -2159,6 +2157,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: fix maximum packet size of virtio driver' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (13 preceding siblings ...) 2022-11-22 22:02 ` patch 'net/nfp: fix Rx descriptor DMA address' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-22 22:02 ` patch 'doc: avoid meson deprecation in setup' " luca.boccassi 15 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Yi Li; +Cc: dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a582fbbe16137891a8c68d3130c4a9f85d2cc59d Thanks. Luca Boccassi --- From a582fbbe16137891a8c68d3130c4a9f85d2cc59d Mon Sep 17 00:00:00 2001 From: Yi Li <liyi1@chinatelecom.cn> Date: Sat, 19 Nov 2022 16:24:20 +0800 Subject: [PATCH] doc: fix maximum packet size of virtio driver [ upstream commit c4c1b97670602a616f7fcf3a6613967a2c730df6 ] According to VIRTIO_MAX_RX_PKTLEN macro definition, for virtio driver currently supported pkt size is 9728. Fixes: fc1f2750a3ec ("doc: programmers guide") Signed-off-by: Yi Li <liyi1@chinatelecom.cn> --- doc/guides/nics/virtio.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index f96df3fb62..30a99be534 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -43,7 +43,7 @@ Features and Limitations of virtio PMD In this release, the virtio PMD provides the basic functionality of packet reception and transmission. * It supports merge-able buffers per packet when receiving packets and scattered buffer per packet - when transmitting packets. The packet size supported is from 64 to 1518. + when transmitting packets. The packet size supported is from 64 to 9728. * It supports multicast packets and promiscuous mode. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.577269465 +0000 +++ 0016-doc-fix-maximum-packet-size-of-virtio-driver.patch 2022-11-22 22:01:31.539525264 +0000 @@ -1 +1 @@ -From c4c1b97670602a616f7fcf3a6613967a2c730df6 Mon Sep 17 00:00:00 2001 +From a582fbbe16137891a8c68d3130c4a9f85d2cc59d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c4c1b97670602a616f7fcf3a6613967a2c730df6 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index aace780249..c422e7347a 100644 +index f96df3fb62..30a99be534 100644 ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'doc: avoid meson deprecation in setup' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi ` (14 preceding siblings ...) 2022-11-22 22:02 ` patch 'doc: fix maximum packet size of virtio driver' " luca.boccassi @ 2022-11-22 22:02 ` luca.boccassi 2022-11-28 10:47 ` patch 'devtools: fix checkpatch header retrieval from stdin' " luca.boccassi 15 siblings, 1 reply; 207+ messages in thread From: luca.boccassi @ 2022-11-22 22:02 UTC (permalink / raw) To: Stephen Hemminger Cc: Bruce Richardson, Zhangfei Gao, David Marchand, Stanislaw Kardach, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/73a02ad7e25853971deb192c77ac94390204fe0e Thanks. Luca Boccassi --- From 73a02ad7e25853971deb192c77ac94390204fe0e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger <stephen@networkplumber.org> Date: Tue, 15 Nov 2022 09:35:16 -0800 Subject: [PATCH] doc: avoid meson deprecation in setup [ upstream commit e24b8ad46b2124d09a97d2f9e911ba197b4f83d1 ] The command "meson build" causes a deprecation warning with meson 0.64.0. WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. Therefore fix the examples in the documentation. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Stanislaw Kardach <kda@semihalf.com> --- doc/guides/cryptodevs/armv8.rst | 2 +- doc/guides/cryptodevs/bcmfs.rst | 2 +- doc/guides/freebsd_gsg/build_dpdk.rst | 2 +- doc/guides/howto/openwrt.rst | 2 +- doc/guides/linux_gsg/build_dpdk.rst | 8 ++-- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 4 +- doc/guides/nics/ark.rst | 2 +- doc/guides/nics/mvneta.rst | 3 +- doc/guides/nics/mvpp2.rst | 3 +- doc/guides/platform/bluefield.rst | 4 +- doc/guides/platform/octeontx.rst | 8 ++-- doc/guides/platform/octeontx2.rst | 4 +- doc/guides/prog_guide/build-sdk-meson.rst | 39 +++++++++++-------- doc/guides/prog_guide/lto.rst | 2 +- doc/guides/prog_guide/profile_app.rst | 2 +- .../sample_app_ug/vm_power_management.rst | 4 +- doc/guides/windows_gsg/build_dpdk.rst | 4 +- 17 files changed, 51 insertions(+), 44 deletions(-) diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst index 8963f66a20..1a006754cb 100644 --- a/doc/guides/cryptodevs/armv8.rst +++ b/doc/guides/cryptodevs/armv8.rst @@ -47,7 +47,7 @@ To build DPDK with this virtual crypto PMD, the user is required to: .. code-block:: console - meson build + meson setup build ninja -C build The corresponding device can be created only if the following features diff --git a/doc/guides/cryptodevs/bcmfs.rst b/doc/guides/cryptodevs/bcmfs.rst index f5dcd59c87..d18a253913 100644 --- a/doc/guides/cryptodevs/bcmfs.rst +++ b/doc/guides/cryptodevs/bcmfs.rst @@ -70,7 +70,7 @@ for cross compiling on x86 platform. .. code-block:: console cd <DPDK-source-directory> - meson <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc + meson setup <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc cd <dest-dir> ninja diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst index e3005a7f3c..1a4c4b88ef 100644 --- a/doc/guides/freebsd_gsg/build_dpdk.rst +++ b/doc/guides/freebsd_gsg/build_dpdk.rst @@ -41,7 +41,7 @@ Building DPDK The following commands can be used to build and install DPDK on a system. The final, install, step generally needs to be run as root:: - meson build + meson setup build cd build ninja ninja install diff --git a/doc/guides/howto/openwrt.rst b/doc/guides/howto/openwrt.rst index e1d7db2a90..be902c505f 100644 --- a/doc/guides/howto/openwrt.rst +++ b/doc/guides/howto/openwrt.rst @@ -100,7 +100,7 @@ first. ar = 'x86_64-openwrt-linux-ar' strip = 'x86_64-openwrt-linux-strip' - meson builddir --cross-file openwrt-cross + meson setup builddir --cross-file openwrt-cross ninja -C builddir Running DPDK application on OpenWrt diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index f78eef2517..2b3c5826e9 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -42,7 +42,7 @@ To configure a DPDK build use: .. code-block:: console - meson <options> build + meson setup <options> build where "build" is the desired output build directory, and "<options>" can be empty or one of a number of meson or DPDK-specific build options, described @@ -100,7 +100,7 @@ automatically built as part of a meson build too. To do so, pass a comma-separated list of the examples to build to the `-Dexamples` meson option as below:: - meson -Dexamples=l2fwd,l3fwd build + meson setup -Dexamples=l2fwd,l3fwd build As with other meson options, this can also be set post-initial-config using `meson configure` in the build directory. There is also a special value "all" to request that all example applications whose @@ -126,12 +126,12 @@ The following meson command can be used on RHEL/Fedora systems to configure a 32 assuming the relevant 32-bit development packages, such as a 32-bit libc, are installed:: PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \ - meson -Dc_args='-m32' -Dc_link_args='-m32' build + meson setup -Dc_args='-m32' -Dc_link_args='-m32' build For Debian/Ubuntu systems, the equivalent command is:: PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig \ - meson -Dc_args='-m32' -Dc_link_args='-m32' build + meson setup -Dc_args='-m32' -Dc_link_args='-m32' build Once the build directory has been configured, DPDK can be compiled using ``ninja`` as described above. diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst index 8a1d0e88b0..d9f7915836 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -91,11 +91,11 @@ To install it in Ubuntu:: To cross-compile DPDK on a desired target machine we can use the following command:: - meson cross-build --cross-file <target_machine_configuration> + meson setup cross-build --cross-file <target_machine_configuration> ninja -C cross-build For example if the target machine is arm64 we can use the following command:: - meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc + meson setup arm64-build --cross-file config/arm/arm64_armv8_linux_gcc ninja -C arm64-build diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst index 18434c7a48..383ab8b79c 100644 --- a/doc/guides/nics/ark.rst +++ b/doc/guides/nics/ark.rst @@ -145,7 +145,7 @@ To build with a non-zero minimum tx packet length, set the above macro in your CFLAGS environment prior to the meson build step. I.e., export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60" - meson build + meson setup build Supported ARK RTL PCIe Instances diff --git a/doc/guides/nics/mvneta.rst b/doc/guides/nics/mvneta.rst index 4238b00066..1c36af8f9b 100644 --- a/doc/guides/nics/mvneta.rst +++ b/doc/guides/nics/mvneta.rst @@ -114,7 +114,8 @@ following command: .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + meson setup build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example diff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst index 17e8e347bb..1845508ed8 100644 --- a/doc/guides/nics/mvpp2.rst +++ b/doc/guides/nics/mvpp2.rst @@ -130,7 +130,8 @@ For additional instructions regarding DPDK cross compilation please refer to :do .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + meson setup build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example diff --git a/doc/guides/platform/bluefield.rst b/doc/guides/platform/bluefield.rst index 824f2bde64..50b74c5e2e 100644 --- a/doc/guides/platform/bluefield.rst +++ b/doc/guides/platform/bluefield.rst @@ -62,7 +62,7 @@ rdma-core library with corresponding kernel drivers is required. .. code-block:: console - meson build + meson setup build ninja -C build Cross Compilation @@ -117,5 +117,5 @@ Then, untar the tarball at the cross toolchain directory on the x86 host. .. code-block:: console - meson build --cross-file config/arm/arm64_bluefield_linux_gcc + meson setup build --cross-file config/arm/arm64_bluefield_linux_gcc ninja -C build diff --git a/doc/guides/platform/octeontx.rst b/doc/guides/platform/octeontx.rst index 42ddb1762e..1459dc7109 100644 --- a/doc/guides/platform/octeontx.rst +++ b/doc/guides/platform/octeontx.rst @@ -94,14 +94,14 @@ drivers can be compiled with the following steps, .. code-block:: console - meson build -Dexamples=<application> + meson setup build -Dexamples=<application> ninja -C build The example applications can be compiled using the following: .. code-block:: console - meson build -Dexamples=<application> + meson setup build -Dexamples=<application> ninja -C build Cross Compilation @@ -127,7 +127,7 @@ Now this build system can be used to build applications for **OCTEON TX** :sup:` .. code-block:: console cd <dpdk directory> - meson build --cross-file config/arm/arm64_thunderx_linux_gcc + meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc ninja -C build The example applications can be compiled using the following: @@ -135,7 +135,7 @@ The example applications can be compiled using the following: .. code-block:: console cd <dpdk directory> - meson build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application> + meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application> ninja -C build .. note:: diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst index 8b5991f03b..69925f5fae 100644 --- a/doc/guides/platform/octeontx2.rst +++ b/doc/guides/platform/octeontx2.rst @@ -505,7 +505,7 @@ Native Compilation .. code-block:: console - meson build + meson setup build ninja -C build Cross Compilation @@ -515,7 +515,7 @@ Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` for generic arm64 detail .. code-block:: console - meson build --cross-file config/arm/arm64_octeontx2_linux_gcc + meson setup build --cross-file config/arm/arm64_octeontx2_linux_gcc ninja -C build .. note:: diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst index 3429e26479..db25f76aef 100644 --- a/doc/guides/prog_guide/build-sdk-meson.rst +++ b/doc/guides/prog_guide/build-sdk-meson.rst @@ -9,7 +9,7 @@ Summary For many platforms, compiling and installing DPDK should work using the following set of commands:: - meson build + meson setup build cd build ninja ninja install @@ -51,12 +51,12 @@ Configuring the Build ---------------------- To configure a build, run the meson tool, passing the path to the directory -to be used for the build e.g. ``meson build``, as shown above. If calling +to be used for the build e.g. ``meson setup build``, as shown above. If calling meson from somewhere other than the root directory of the DPDK project the path to the root directory should be passed as the first parameter, and the build path as the second. For example, to build DPDK in /tmp/dpdk-build:: - user@host:/tmp$ meson ~user/dpdk dpdk-build + user@host:/tmp$ meson setup ~user/dpdk dpdk-build Meson will then configure the build based on settings in the project's meson.build files, and by checking the build environment for e.g. compiler @@ -74,24 +74,29 @@ available run ``meson configure`` in the build directory. Examples of adjusting the defaults when doing initial meson configuration. Project-specific options are passed used -Doption=value:: - meson --werror werrorbuild # build with warnings as errors + # build with warnings as errors + meson setup --werror werrorbuild - meson --buildtype=debug debugbuild # build for debugging + # build for debugging + meson setup --buildtype=debug debugbuild - meson -Dexamples=l3fwd,l2fwd fwdbuild # build some examples as - # part of the normal DPDK build + # build some examples as part of the normal DPDK build + meson setup -Dexamples=l3fwd,l2fwd fwdbuild - meson -Dmax_lcores=8 smallbuild # scale build for smaller systems + # scale build for smaller systems + meson setup -Dmax_lcores=8 smallbuild - meson -Denable_docs=true fullbuild # build and install docs + # build and install docs + meson setup -Denable_docs=true fullbuild - meson -Dmachine=default # use builder-independent baseline -march + # use builder-independent baseline -march + meson setup -Dcpu_instruction_set=generic - meson -Ddisable_drivers=event/*,net/tap # disable tap driver and all - # eventdev PMDs for a smaller build + # disable tap driver and all eventdev PMDs for a smaller build + meson setup -Ddisable_drivers=event/*,net/tap - meson -Denable_trace_fp=true tracebuild # build with fast path traces - # enabled + # build with fast path traces enabled + meson setup -Denable_trace_fp=true tracebuild Examples of setting some of the same options using meson configure:: @@ -121,7 +126,7 @@ As well as those settings taken from ``meson configure``, other options such as the compiler to use can be passed via environment variables. For example:: - CC=clang meson clang-build + CC=clang meson setup clang-build .. note:: @@ -174,12 +179,12 @@ Cross Compiling DPDK To cross-compile DPDK on a desired target machine we can use the following command:: - meson cross-build --cross-file <target_machine_configuration> + meson setup cross-build --cross-file <target_machine_configuration> For example if the target machine is arm64 we can use the following command:: - meson arm-build --cross-file config/arm/arm64_armv8_linux_gcc + meson setup arm-build --cross-file config/arm/arm64_armv8_linux_gcc where config/arm/arm64_armv8_linux_gcc contains settings for the compilers and other build tools to be used, as well as characteristics of the target diff --git a/doc/guides/prog_guide/lto.rst b/doc/guides/prog_guide/lto.rst index f79c449598..ff9f47a8f4 100644 --- a/doc/guides/prog_guide/lto.rst +++ b/doc/guides/prog_guide/lto.rst @@ -30,4 +30,4 @@ Link time optimization can be enabled by setting meson built-in 'b_lto' option: .. code-block:: console - meson build -Db_lto=true + meson setup build -Db_lto=true diff --git a/doc/guides/prog_guide/profile_app.rst b/doc/guides/prog_guide/profile_app.rst index 52f85bb9e0..44cdee31a7 100644 --- a/doc/guides/prog_guide/profile_app.rst +++ b/doc/guides/prog_guide/profile_app.rst @@ -42,7 +42,7 @@ and recompile the DPDK: .. code-block:: console - meson build + meson setup build meson configure build -Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE ninja -C build diff --git a/doc/guides/sample_app_ug/vm_power_management.rst b/doc/guides/sample_app_ug/vm_power_management.rst index 9ce87956c9..e0af729e66 100644 --- a/doc/guides/sample_app_ug/vm_power_management.rst +++ b/doc/guides/sample_app_ug/vm_power_management.rst @@ -255,7 +255,7 @@ To build just the ``vm_power_manager`` application using ``meson``/``ninja``: .. code-block:: console cd dpdk - meson build + meson setup build cd build ninja meson configure -Dexamples=vm_power_manager @@ -494,7 +494,7 @@ To build just the ``vm_power_manager`` application using ``meson``/``ninja``: .. code-block:: console cd dpdk - meson build + meson setup build cd build ninja meson configure -Dexamples=vm_power_manager/guest_cli diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst index 5f1395f3d4..f8b7c7acde 100644 --- a/doc/guides/windows_gsg/build_dpdk.rst +++ b/doc/guides/windows_gsg/build_dpdk.rst @@ -100,7 +100,7 @@ To compile the examples, the flag ``-Dexamples`` is required. .. code-block:: console cd C:\Users\me\dpdk - meson -Dexamples=helloworld build + meson setup -Dexamples=helloworld build ninja -C build Option 2. Cross-Compile with MinGW-w64 @@ -111,5 +111,5 @@ Depending on the distribution, paths in this file may need adjustments. .. code-block:: console - meson --cross-file config/x86/cross-mingw -Dexamples=helloworld build + meson setup --cross-file config/x86/cross-mingw -Dexamples=helloworld build ninja -C build -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.636259641 +0000 +++ 0017-doc-avoid-meson-deprecation-in-setup.patch 2022-11-22 22:01:31.551525496 +0000 @@ -1 +1 @@ -From e24b8ad46b2124d09a97d2f9e911ba197b4f83d1 Mon Sep 17 00:00:00 2001 +From 73a02ad7e25853971deb192c77ac94390204fe0e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e24b8ad46b2124d09a97d2f9e911ba197b4f83d1 ] + @@ -13,2 +14,0 @@ -Cc: stable@dpdk.org - @@ -23 +22,0 @@ - doc/guides/cryptodevs/uadk.rst | 2 +- @@ -25 +23,0 @@ - doc/guides/gpus/cuda.rst | 6 +-- @@ -28,3 +26 @@ - .../linux_gsg/cross_build_dpdk_for_arm64.rst | 12 +++--- - .../cross_build_dpdk_for_loongarch.rst | 2 +- - .../linux_gsg/cross_build_dpdk_for_riscv.rst | 4 +- + .../linux_gsg/cross_build_dpdk_for_arm64.rst | 4 +- @@ -32,2 +28,2 @@ - doc/guides/nics/mvneta.rst | 2 +- - doc/guides/nics/mvpp2.rst | 2 +- + doc/guides/nics/mvneta.rst | 3 +- + doc/guides/nics/mvpp2.rst | 3 +- @@ -35 +30,0 @@ - doc/guides/platform/cnxk.rst | 8 ++-- @@ -36,0 +32 @@ + doc/guides/platform/octeontx2.rst | 4 +- @@ -39 +35 @@ - doc/guides/prog_guide/profile_app.rst | 4 +- + doc/guides/prog_guide/profile_app.rst | 2 +- @@ -42 +38 @@ - 21 files changed, 63 insertions(+), 58 deletions(-) + 17 files changed, 51 insertions(+), 44 deletions(-) @@ -70,13 +65,0 @@ -diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst -index 1325eaca3f..9af6b88a5a 100644 ---- a/doc/guides/cryptodevs/uadk.rst -+++ b/doc/guides/cryptodevs/uadk.rst -@@ -87,7 +87,7 @@ Test steps - - cd dpdk - mkdir build -- meson build (--reconfigure) -+ meson setup build (--reconfigure) - cd build - ninja - sudo ninja install @@ -84 +67 @@ -index d335b97cfc..514d18c870 100644 +index e3005a7f3c..1a4c4b88ef 100644 @@ -87 +70 @@ -@@ -44,7 +44,7 @@ Building DPDK +@@ -41,7 +41,7 @@ Building DPDK @@ -96,24 +78,0 @@ -diff --git a/doc/guides/gpus/cuda.rst b/doc/guides/gpus/cuda.rst -index 55fc7d1e86..114e3bc8cb 100644 ---- a/doc/guides/gpus/cuda.rst -+++ b/doc/guides/gpus/cuda.rst -@@ -24,8 +24,8 @@ You need to indicate to meson where CUDA headers files are through the CFLAGS va - Three ways: - - - Set ``export CFLAGS=-I/usr/local/cuda/include`` before building --- Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson build`` --- Add the ``-Dc_args`` in meson command line ``meson build -Dc_args=-I/usr/local/cuda/include`` -+- Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson setup build`` -+- Add the ``-Dc_args`` in meson command line ``meson setup build -Dc_args=-I/usr/local/cuda/include`` - - If headers are not found, the CUDA GPU driver library is not built. - -@@ -51,7 +51,7 @@ An example would be: - - .. code-block:: console - -- $ meson build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include" -+ $ meson setup build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include" - - If headers are not found, the CUDA GPU driver library is built without the CPU map capability - and will return error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function. @@ -134 +93 @@ -index 4f2def15ed..bbd2efc9d8 100644 +index f78eef2517..2b3c5826e9 100644 @@ -137 +96 @@ -@@ -53,7 +53,7 @@ To configure a DPDK build use: +@@ -42,7 +42,7 @@ To configure a DPDK build use: @@ -146 +105 @@ -@@ -140,7 +140,7 @@ automatically built as part of a meson build too. +@@ -100,7 +100,7 @@ automatically built as part of a meson build too. @@ -155 +114 @@ -@@ -166,12 +166,12 @@ The following meson command can be used on RHEL/Fedora systems to configure a 32 +@@ -126,12 +126,12 @@ The following meson command can be used on RHEL/Fedora systems to configure a 32 @@ -171 +130 @@ -index cbe9d171f8..e4de5c8d18 100644 +index 8a1d0e88b0..d9f7915836 100644 @@ -174 +133 @@ -@@ -167,19 +167,19 @@ Cross Compiling DPDK with GNU toolchain using Meson +@@ -91,11 +91,11 @@ To install it in Ubuntu:: @@ -178,70 +137,3 @@ -- meson cross-build --cross-file <target_machine_configuration> -+ meson setup cross-build --cross-file <target_machine_configuration> - ninja -C cross-build - - For example if the target machine is aarch64 we can use the following - command, provided the cross file has been modified accordingly:: - -- meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc -+ meson setup aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc - ninja -C aarch64-build-gcc - - If the target machine is aarch32 we can use the following command, - provided the cross file has been modified accordingly:: - -- meson aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc -+ meson setup aarch32-build --cross-file config/arm/arm32_armv8_linux_gcc - ninja -C aarch32-build - - LLVM/Clang toolchain -@@ -230,7 +230,7 @@ Assuming the file with augmented ``c_args`` and ``c_link_args`` - is named ``arm64_armv8_linux_clang``, - use the following command to cross-compile DPDK for the target machine:: - -- meson aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang -+ meson setup aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang - ninja -C aarch64-build-clang - - Cross Compiling DPDK with LLVM/Clang toolchain using Meson on Ubuntu 18.04 -@@ -247,7 +247,7 @@ On Ubuntu 18.04, these packages are needed: - - Use the following command to cross-compile DPDK for the target machine:: - -- meson aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804 -+ meson setup aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804 - ninja -C aarch64-build-clang - - Building for an aarch64 SoC on an aarch64 build machine -@@ -258,7 +258,7 @@ you don't need a separate cross toolchain, just a different set of - configuration options. To build for an aarch64 SoC, use the -Dplatform meson - option:: - -- meson soc_build -Dplatform=<target_soc> -+ meson setup soc_build -Dplatform=<target_soc> - - Substitute <target_soc> with one of the supported SoCs - -diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_loongarch.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_loongarch.rst -index 1549cc86d5..7f75960e9e 100644 ---- a/doc/guides/linux_gsg/cross_build_dpdk_for_loongarch.rst -+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_loongarch.rst -@@ -81,7 +81,7 @@ To cross-compile DPDK for generic LoongArch we can use the following command: - - .. code-block:: console - -- meson cross-build --cross-file config/loongarch/loongarch_loongarch64_linux_gcc -+ meson setup cross-build --cross-file config/loongarch/loongarch_loongarch64_linux_gcc - ninja -C cross-build - - Supported cross-compilation targets -diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_riscv.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_riscv.rst -index 9e121645a8..7d7f7ac72b 100644 ---- a/doc/guides/linux_gsg/cross_build_dpdk_for_riscv.rst -+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_riscv.rst -@@ -68,13 +68,13 @@ Cross Compiling DPDK with GNU toolchain using Meson - - To cross-compile DPDK for a desired target machine use the following command:: - -- meson cross-build --cross-file <target_machine_configuration> -+ meson setup cross-build --cross-file <target_machine_configuration> - ninja -C cross-build +- meson cross-build --cross-file <target_machine_configuration> ++ meson setup cross-build --cross-file <target_machine_configuration> + ninja -C cross-build @@ -249 +141 @@ - For example if the target machine is a generic rv64gc RISC-V, use the following + For example if the target machine is arm64 we can use the following @@ -252,5 +144,3 @@ -- meson riscv64-build-gcc --cross-file config/riscv/riscv64_linux_gcc -+ meson setup riscv64-build-gcc --cross-file config/riscv/riscv64_linux_gcc - ninja -C riscv64-build-gcc - - If riscv-gnu-toolchain is used, binary names should be updated to match. Update +- meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc ++ meson setup arm64-build --cross-file config/arm/arm64_armv8_linux_gcc + ninja -C arm64-build @@ -258 +148 @@ -index 591e41799c..ba00f14e80 100644 +index 18434c7a48..383ab8b79c 100644 @@ -261,2 +151,2 @@ -@@ -282,7 +282,7 @@ CFLAGS environment prior to the meson build step. I.e., - .. code-block:: console +@@ -145,7 +145,7 @@ To build with a non-zero minimum tx packet length, set the above macro in your + CFLAGS environment prior to the meson build step. I.e., @@ -271 +161 @@ -index b7f279c3cb..2ee2637a58 100644 +index 4238b00066..1c36af8f9b 100644 @@ -274 +164,2 @@ -@@ -117,7 +117,7 @@ Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable. +@@ -114,7 +114,8 @@ following command: + @@ -277,2 +168 @@ - export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH -- meson build --cross-file config/arm/arm64_armada_linux_gcc +- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build @@ -280 +170 @@ - ninja -C build ++ ninja -C build @@ -282,0 +173 @@ + Usage Example @@ -284 +175 @@ -index e40fed7286..cbfa47afd8 100644 +index 17e8e347bb..1845508ed8 100644 @@ -287 +178 @@ -@@ -133,7 +133,7 @@ Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable. +@@ -130,7 +130,8 @@ For additional instructions regarding DPDK cross compilation please refer to :do @@ -289 +180 @@ - export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH + .. code-block:: console @@ -291 +182 @@ -- meson build --cross-file config/arm/arm64_armada_linux_gcc +- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build @@ -293 +184 @@ - ninja -C build ++ ninja -C build @@ -295,0 +187 @@ + Usage Example @@ -297 +189 @@ -index 3e3078c85e..09486747b1 100644 +index 824f2bde64..50b74c5e2e 100644 @@ -300 +192 @@ -@@ -61,7 +61,7 @@ rdma-core library with corresponding kernel drivers is required. +@@ -62,7 +62,7 @@ rdma-core library with corresponding kernel drivers is required. @@ -309 +201 @@ -@@ -115,5 +115,5 @@ Then, untar the tarball at the cross toolchain directory on the x86 host. +@@ -117,5 +117,5 @@ Then, untar the tarball at the cross toolchain directory on the x86 host. @@ -316,38 +207,0 @@ -diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst -index 562ed7d7a6..aadd60b5d4 100644 ---- a/doc/guides/platform/cnxk.rst -+++ b/doc/guides/platform/cnxk.rst -@@ -587,14 +587,14 @@ CN9K: - - .. code-block:: console - -- meson -Dplatform=cn9k build -+ meson setup -Dplatform=cn9k build - ninja -C build - - CN10K: - - .. code-block:: console - -- meson -Dplatform=cn10k build -+ meson setup -Dplatform=cn10k build - ninja -C build - - Cross Compilation -@@ -606,14 +606,14 @@ CN9K: - - .. code-block:: console - -- meson build --cross-file config/arm/arm64_cn9k_linux_gcc -+ meson setup build --cross-file config/arm/arm64_cn9k_linux_gcc - ninja -C build - - CN10K: - - .. code-block:: console - -- meson build --cross-file config/arm/arm64_cn10k_linux_gcc -+ meson setup build --cross-file config/arm/arm64_cn10k_linux_gcc - ninja -C build - - .. note:: @@ -392,0 +247,22 @@ +diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst +index 8b5991f03b..69925f5fae 100644 +--- a/doc/guides/platform/octeontx2.rst ++++ b/doc/guides/platform/octeontx2.rst +@@ -505,7 +505,7 @@ Native Compilation + + .. code-block:: console + +- meson build ++ meson setup build + ninja -C build + + Cross Compilation +@@ -515,7 +515,7 @@ Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` for generic arm64 detail + + .. code-block:: console + +- meson build --cross-file config/arm/arm64_octeontx2_linux_gcc ++ meson setup build --cross-file config/arm/arm64_octeontx2_linux_gcc + ninja -C build + + .. note:: @@ -394 +270 @@ -index 58d9b553a0..5deabbe54c 100644 +index 3429e26479..db25f76aef 100644 @@ -406 +282 @@ -@@ -57,12 +57,12 @@ Configuring the Build +@@ -51,12 +51,12 @@ Configuring the Build @@ -421 +297 @@ -@@ -80,24 +80,29 @@ available run ``meson configure`` in the build directory. +@@ -74,24 +74,29 @@ available run ``meson configure`` in the build directory. @@ -446 +322 @@ -- meson -Dcpu_instruction_set=generic # use builder-independent baseline -march +- meson -Dmachine=default # use builder-independent baseline -march @@ -462 +338 @@ -@@ -135,7 +140,7 @@ As well as those settings taken from ``meson configure``, other options +@@ -121,7 +126,7 @@ As well as those settings taken from ``meson configure``, other options @@ -471 +347 @@ -@@ -188,12 +193,12 @@ Cross Compiling DPDK +@@ -174,12 +179,12 @@ Cross Compiling DPDK @@ -497 +373 @@ -index bd6700ef85..14292d4c25 100644 +index 52f85bb9e0..44cdee31a7 100644 @@ -509,9 +384,0 @@ -@@ -103,7 +103,7 @@ Example: - - .. code-block:: console - -- meson --cross config/arm/arm64_armv8_linux_gcc -Dc_args='-DRTE_ARM_EAL_RDTSC_USE_PMU' build -+ meson setup --cross config/arm/arm64_armv8_linux_gcc -Dc_args='-DRTE_ARM_EAL_RDTSC_USE_PMU' build - - .. warning:: - @@ -541 +408 @@ -index 38b3068d7b..29f2b38feb 100644 +index 5f1395f3d4..f8b7c7acde 100644 @@ -544 +411 @@ -@@ -104,7 +104,7 @@ To compile the examples, the flag ``-Dexamples`` is required. +@@ -100,7 +100,7 @@ To compile the examples, the flag ``-Dexamples`` is required. @@ -553 +420 @@ -@@ -115,5 +115,5 @@ Depending on the distribution, paths in this file may need adjustments. +@@ -111,5 +111,5 @@ Depending on the distribution, paths in this file may need adjustments. ^ permalink raw reply [flat|nested] 207+ messages in thread
* patch 'devtools: fix checkpatch header retrieval from stdin' has been queued to stable release 20.11.7 2022-11-22 22:02 ` patch 'doc: avoid meson deprecation in setup' " luca.boccassi @ 2022-11-28 10:47 ` luca.boccassi 0 siblings, 0 replies; 207+ messages in thread From: luca.boccassi @ 2022-11-28 10:47 UTC (permalink / raw) To: Olivier Matz; +Cc: Thomas Monjalon, dpdk stable Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/2fa54fa0da7bde8487bac3e3a0e688504527cb8e Thanks. Luca Boccassi --- From 2fa54fa0da7bde8487bac3e3a0e688504527cb8e Mon Sep 17 00:00:00 2001 From: Olivier Matz <olivier.matz@6wind.com> Date: Thu, 29 Sep 2022 14:04:03 +0200 Subject: [PATCH] devtools: fix checkpatch header retrieval from stdin [ upstream commit 9cb8326456317264a7d085978634661c520af706 ] When passing the patch to checkpatches.sh through stdin, the subject is retrieved by reading the input until a "Subject:" entry is found. The rest of the input is piped to checkpatch.pl. Since the "From:" line is before the "Subject:" line, it won't be sent to checkpatch.pl, which won't be able to get the author of the commit. The following error will appear: ERROR:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author '' Do the subject lookup on the temporary file instead of stdin, and send the whole lines to checkpatch.pl. The problem is visible since the introduction of this check in linux checkpatch.pl in version 4.19 (see link below). Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd2614967d8b Fixes: 8005feef421d ("scripts: add standard input to checkpatch") Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Thomas Monjalon <thomas@monjalon.net> --- devtools/checkpatches.sh | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index db4c7d8301..267780ff7a 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -229,12 +229,12 @@ print_headline() { # <title> total=0 status=0 -check () { # <patch> <commit> <title> +check () { # <patch-file> <commit> local ret=0 + local subject='' headline_printed=false total=$(($total + 1)) - ! $verbose || print_headline "$3" if [ -n "$1" ] ; then tmpinput=$1 else @@ -249,10 +249,14 @@ check () { # <patch> <commit> <title> fi fi + # Subject can be on 2 lines + subject=$(sed '/^Subject: */!d;s///;N;s,\n[[:space:]]\+, ,;s,\n.*,,;q' "$tmpinput") + ! $verbose || print_headline "$subject" + ! $verbose || printf 'Running checkpatch.pl:\n' report=$($DPDK_CHECKPATCH_PATH $options "$tmpinput" 2>/dev/null) if [ $? -ne 0 ] ; then - $headline_printed || print_headline "$3" + $headline_printed || print_headline "$subject" printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p' ret=1 fi @@ -260,7 +264,7 @@ check () { # <patch> <commit> <title> ! $verbose || printf '\nChecking API additions/removals:\n' report=$($VALIDATE_NEW_API "$tmpinput") if [ $? -ne 0 ] ; then - $headline_printed || print_headline "$3" + $headline_printed || print_headline "$subject" printf '%s\n' "$report" ret=1 fi @@ -268,7 +272,7 @@ check () { # <patch> <commit> <title> ! $verbose || printf '\nChecking forbidden tokens additions:\n' report=$(check_forbidden_additions "$tmpinput") if [ $? -ne 0 ] ; then - $headline_printed || print_headline "$3" + $headline_printed || print_headline "$subject" printf '%s\n' "$report" ret=1 fi @@ -276,7 +280,7 @@ check () { # <patch> <commit> <title> ! $verbose || printf '\nChecking __rte_experimental tags:\n' report=$(check_experimental_tags "$tmpinput") if [ $? -ne 0 ] ; then - $headline_printed || print_headline "$3" + $headline_printed || print_headline "$subject" printf '%s\n' "$report" ret=1 fi @@ -284,7 +288,7 @@ check () { # <patch> <commit> <title> ! $verbose || printf '\nChecking __rte_internal tags:\n' report=$(check_internal_tags "$tmpinput") if [ $? -ne 0 ] ; then - $headline_printed || print_headline "$3" + $headline_printed || print_headline "$subject" printf '%s\n' "$report" ret=1 fi @@ -300,20 +304,10 @@ check () { # <patch> <commit> <title> if [ -n "$1" ] ; then for patch in "$@" ; do - # Subject can be on 2 lines - subject=$(sed '/^Subject: */!d;s///;N;s,\n[[:space:]]\+, ,;s,\n.*,,;q' "$patch") - check "$patch" '' "$subject" + check "$patch" '' done elif [ ! -t 0 ] ; then # stdin - subject=$(while read header value ; do - if [ "$header" = 'Subject:' ] ; then - IFS= read next - continuation=$(echo "$next" | sed -n 's,^[[:space:]]\+, ,p') - echo $value$continuation - break - fi - done) - check '' '' "$subject" + check '' '' else if [ $number -eq 0 ] ; then commits=$(git rev-list --reverse $range) @@ -321,8 +315,7 @@ else commits=$(git rev-list --reverse --max-count=$number HEAD) fi for commit in $commits ; do - subject=$(git log --format='%s' -1 $commit) - check '' $commit "$subject" + check '' $commit done fi pass=$(($total - $status)) -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-28 10:21:06.680250858 +0000 +++ 0001-devtools-fix-checkpatch-header-retrieval-from-stdin.patch 2022-11-28 10:21:06.602968835 +0000 @@ -1 +1 @@ -From 9cb8326456317264a7d085978634661c520af706 Mon Sep 17 00:00:00 2001 +From 2fa54fa0da7bde8487bac3e3a0e688504527cb8e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9cb8326456317264a7d085978634661c520af706 ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -29,2 +30,2 @@ - devtools/checkpatches.sh | 37 +++++++++++++++---------------------- - 1 file changed, 15 insertions(+), 22 deletions(-) + devtools/checkpatches.sh | 35 ++++++++++++++--------------------- + 1 file changed, 14 insertions(+), 21 deletions(-) @@ -33 +34 @@ -index 1f1175c4f1..a07bbc83cb 100755 +index db4c7d8301..267780ff7a 100755 @@ -36 +37 @@ -@@ -284,12 +284,12 @@ print_headline() { # <title> +@@ -229,12 +229,12 @@ print_headline() { # <title> @@ -51 +52 @@ -@@ -304,10 +304,14 @@ check () { # <patch> <commit> <title> +@@ -249,10 +249,14 @@ check () { # <patch> <commit> <title> @@ -67 +68 @@ -@@ -315,7 +319,7 @@ check () { # <patch> <commit> <title> +@@ -260,7 +264,7 @@ check () { # <patch> <commit> <title> @@ -76 +77 @@ -@@ -323,7 +327,7 @@ check () { # <patch> <commit> <title> +@@ -268,7 +272,7 @@ check () { # <patch> <commit> <title> @@ -85 +86 @@ -@@ -331,7 +335,7 @@ check () { # <patch> <commit> <title> +@@ -276,7 +280,7 @@ check () { # <patch> <commit> <title> @@ -94 +95 @@ -@@ -339,7 +343,7 @@ check () { # <patch> <commit> <title> +@@ -284,7 +288,7 @@ check () { # <patch> <commit> <title> @@ -103,10 +104 @@ -@@ -347,7 +351,7 @@ check () { # <patch> <commit> <title> - ! $verbose || printf '\nChecking release notes updates:\n' - report=$(check_release_notes "$tmpinput") - if [ $? -ne 0 ] ; then -- $headline_printed || print_headline "$3" -+ $headline_printed || print_headline "$subject" - printf '%s\n' "$report" - ret=1 - fi -@@ -363,20 +367,10 @@ check () { # <patch> <commit> <title> +@@ -300,20 +304,10 @@ check () { # <patch> <commit> <title> @@ -135 +127 @@ -@@ -384,8 +378,7 @@ else +@@ -321,8 +315,7 @@ else ^ permalink raw reply [flat|nested] 207+ messages in thread
end of thread, other threads:[~2022-11-28 10:47 UTC | newest] Thread overview: 207+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-11-03 9:26 patch 'net: accept unaligned data in checksum routines' has been queued to stable release 20.11.7 luca.boccassi 2022-11-03 9:26 ` patch 'eal: fix side effect in some pointer arithmetic macros' " luca.boccassi 2022-11-03 9:26 ` patch 'app/testpmd: restore ixgbe bypass commands' " luca.boccassi 2022-11-03 9:26 ` patch 'net/bonding: fix array overflow in Rx burst' " luca.boccassi 2022-11-03 9:26 ` patch 'net/bonding: fix double slave link status query' " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix scattered Rx' " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix mbuf lengths in " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix length of each segment " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: fix checksum and RSS " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: optimise " luca.boccassi 2022-11-03 9:26 ` patch 'net/axgbe: remove freeing buffer in " luca.boccassi 2022-11-03 9:26 ` patch 'net/nfp: improve HW info header log readability' " luca.boccassi 2022-11-03 9:26 ` patch 'net/txgbe: remove semaphore between SW/FW' " luca.boccassi 2022-11-03 9:26 ` patch 'net/txgbe: rename some extended statistics' " luca.boccassi 2022-11-03 9:26 ` patch 'net/mvneta: fix build with GCC 12' " luca.boccassi 2022-11-03 9:26 ` patch 'malloc: fix storage size for some allocations' " luca.boccassi 2022-11-03 9:26 ` patch 'telemetry: fix escaping of invalid json characters' " luca.boccassi 2022-11-03 9:26 ` patch 'event/dsw: fix flow migration' " luca.boccassi 2022-11-03 9:26 ` patch 'event/sw: fix device name in dump' " luca.boccassi 2022-11-03 9:26 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " luca.boccassi 2022-11-03 9:26 ` patch 'eventdev/eth_tx: fix adapter stop' " luca.boccassi 2022-11-03 9:26 ` patch 'test/ipsec: skip if no compatible device' " luca.boccassi 2022-11-03 9:26 ` patch 'examples/ipsec-secgw: use Tx checksum offload conditionally' " luca.boccassi 2022-11-03 9:26 ` patch 'test/crypto: fix debug messages' " luca.boccassi 2022-11-03 9:26 ` patch 'test/ipsec: fix build with GCC 12' " luca.boccassi 2022-11-03 9:26 ` patch 'ipsec: " luca.boccassi 2022-11-03 9:26 ` patch 'crypto/qat: " luca.boccassi 2022-11-03 9:26 ` patch 'eventdev: fix name of Rx conf type in documentation' " luca.boccassi 2022-11-03 9:26 ` patch 'net/i40e: fix VF representor release' " luca.boccassi 2022-11-03 9:26 ` patch 'net/ice: fix RSS hash update' " luca.boccassi 2022-11-03 9:26 ` patch 'net/iavf: fix pattern check for flow director parser' " luca.boccassi 2022-11-03 9:26 ` patch 'net/iavf: fix Tx done descriptors cleanup' " luca.boccassi 2022-11-03 9:26 ` patch 'net/igc: remove unnecessary PHY ID checks' " luca.boccassi 2022-11-03 9:26 ` patch 'common/iavf: avoid copy in async mode' " luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix array overflow in add switch recipe' " luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: fix add MAC rule' " luca.boccassi 2022-11-03 9:26 ` patch 'net/ice/base: ignore promiscuous already exist' " luca.boccassi 2022-11-03 9:26 ` patch 'net/virtio: fix crash when configured twice' " luca.boccassi 2022-11-03 9:26 ` patch 'examples/vhost: fix use after free' " luca.boccassi 2022-11-03 9:26 ` patch 'eal/x86: add 256 bytes copy for AVX2' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix check for orphan wait descriptor' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix single not inline packet storing' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix inline length exceeding descriptor limit' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix Tx check for hardware descriptor length' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix modify action with tunnel decapsulation' " luca.boccassi 2022-11-03 9:27 ` patch 'net/mlx5: fix meter profile delete after disable' " luca.boccassi 2022-11-03 9:27 ` patch 'net/iavf: check illegal packet sizes' " luca.boccassi 2022-11-03 9:27 ` patch 'net/ice: " luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: reset end of packet in scattered Rx' " luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: clear buffer on scattered Rx chaining failure' " luca.boccassi 2022-11-03 9:27 ` patch 'net/axgbe: save segment data in scattered Rx' " luca.boccassi 2022-11-03 9:27 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " luca.boccassi 2022-11-03 9:27 ` patch 'event/dlb2: handle enqueuing more than maximum depth' " luca.boccassi 2022-11-03 16:20 ` Sevincer, Abdullah 2022-11-03 9:27 ` patch 'cryptodev: fix unduly newlines in logs' " luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix null pointer dereference in LED config' " luca.boccassi 2022-11-17 9:10 ` 答复: " Mao,Yingming 2022-11-03 9:27 ` patch 'net/bnxt: remove unnecessary check' " luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix representor info freeing' " luca.boccassi 2022-11-03 9:27 ` patch 'net/bnxt: fix build with GCC 13' " luca.boccassi 2022-11-03 9:27 ` patch 'mem: fix API doc about allocation on secondary processes' " luca.boccassi 2022-11-03 9:27 ` patch 'examples/vm_power_manager: use safe list iterator' " luca.boccassi 2022-11-03 9:27 ` patch 'gro: fix chain index for more than 2 packets' " luca.boccassi 2022-11-03 9:27 ` patch 'timer: fix stopping all timers' " luca.boccassi 2022-11-03 9:27 ` patch 'service: fix stats race condition for MT safe service' " luca.boccassi 2022-11-03 9:27 ` patch 'net/qede/base: fix 32-bit build with GCC 12' " luca.boccassi 2022-11-03 9:27 ` patch 'test/service: fix spurious failures by extending timeout' " luca.boccassi 2022-11-03 9:27 ` patch 'net/tap: fix overflow of network interface index' " luca.boccassi 2022-11-03 9:27 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix code check warnings' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in SVE Tx' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix next-to-use overflow in simple " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: optimize SVE Tx performance' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix crash when secondary process access FW' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: delete unused markup' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix RSS filter restore' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix lock protection of RSS flow rule' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix RSS flow rule restore' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: move flow direction rule recovery' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix restore filter function input' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix build with gcov' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix packet type for GENEVE' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix header files includes' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 and IPv6 RSS' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix typos in IPv6 SCTP fields' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix IPv4 RSS' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: add L3 and L4 RSS types' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: revert fix mailbox communication with HW' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix VF mailbox message handling' " luca.boccassi 2022-11-03 9:27 ` patch 'net/hns3: fix minimum Tx frame length' " luca.boccassi 2022-11-03 9:27 ` patch 'net/nfp: fix memory leak in Rx' " luca.boccassi 2022-11-03 9:27 ` patch 'net/dpaa: fix jumbo packet Rx in case of VSP' " luca.boccassi 2022-11-03 9:27 ` patch 'net/dpaa: fix buffer freeing in slow path' " luca.boccassi 2022-11-03 9:27 ` patch 'mempool: fix get objects from mempool with cache' " luca.boccassi 2022-11-03 9:27 ` patch 'gro: trim tail padding bytes' " luca.boccassi 2022-11-03 9:27 ` patch 'net/bonding: fix Tx hash for TCP' " luca.boccassi 2022-11-03 9:27 ` patch 'eal: fix data race in multi-process support' " luca.boccassi 2022-11-03 9:27 ` patch 'graph: fix node objects allocation' " luca.boccassi 2022-11-03 9:27 ` patch 'node: check Rx element " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode for new trace point' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix mode change' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix leak with regexp' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix dynamically enabling trace points' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix race in debug dump' " luca.boccassi 2022-11-05 17:11 ` patch 'trace: fix metadata " luca.boccassi 2022-11-05 17:11 ` patch 'pdump: do not allow enable/disable in primary process' " luca.boccassi 2022-11-05 17:11 ` patch 'service: fix early move to inactive status' " luca.boccassi 2022-11-05 17:11 ` patch 'event/sw: fix flow ID init in self test' " luca.boccassi 2022-11-05 17:11 ` patch 'event/sw: fix log " luca.boccassi 2022-11-05 17:11 ` patch 'eventdev/crypto: fix multi-process' " luca.boccassi 2022-11-05 17:11 ` patch 'eventdev/eth_tx: fix queue delete' " luca.boccassi 2022-11-05 17:11 ` patch 'gro: check payload length after trim' " luca.boccassi 2022-11-05 17:11 ` patch 'license: fix paths' " luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix mode 4 with dedicated queues' " luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix descriptor limit reporting' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for Rx and Tx' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix endianness for RSS' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix adapter name for logging' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ionic: fix reported error stats' " luca.boccassi 2022-11-05 17:11 ` patch 'net/bonding: fix flow flush order on close' " luca.boccassi 2022-11-05 17:11 ` patch 'vhost: add non-blocking API for posting interrupt' " luca.boccassi 2022-11-05 17:11 ` patch 'net/virtio: remove declaration of undefined function' " luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix thread workspace memory leak' " luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix RSS expansion buffer size' " luca.boccassi 2022-11-05 17:11 ` patch 'net/mlx5: fix tunnel header with IPIP offload' " luca.boccassi 2022-11-05 17:11 ` patch 'sched: fix subport profile configuration' " luca.boccassi 2022-11-05 17:11 ` patch 'examples/qos_sched: fix number of subport profiles' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ixgbe: fix broadcast Rx on VF after promisc removal' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' " luca.boccassi 2022-11-05 17:11 ` patch 'net/ice: fix null function pointer call' " luca.boccassi 2022-11-05 17:11 ` patch 'net/iavf: add thread for event callbacks' " luca.boccassi 2022-11-05 17:11 ` patch 'net/iavf: fix queue stop for large VF' " luca.boccassi 2022-11-05 17:11 ` patch 'examples/l2fwd-crypto: fix typo in error message' " luca.boccassi 2022-11-05 17:11 ` patch 'test/crypto: fix wireless auth digest segment' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix memory leak' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: add LDPC encoder padding function' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: check turbo dec/enc input' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: add null checks' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix ring/queue allocation' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix input length for CRC24B' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix clearing PF IR outside handler' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix device minimum alignment' " luca.boccassi 2022-11-05 17:11 ` patch 'baseband/acc100: fix close cleanup' " luca.boccassi 2022-11-05 17:11 ` patch 'test/crypto: fix PDCP vectors' " luca.boccassi 2022-11-05 17:11 ` patch 'examples/ipsec-secgw: fix Tx checksum offload flag' " luca.boccassi 2022-11-05 17:11 ` patch 'crypto/qat: fix null hash algorithm digest size' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: set initial value of descriptor count alignment' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix slave device Rx/Tx offload configuration' " luca.boccassi 2022-11-17 23:08 ` patch 'app/testpmd: fix MAC header in checksum forward engine' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix dropping valid MAC packets' " luca.boccassi 2022-11-17 23:08 ` patch 'app/testpmd: make quit flag volatile' " luca.boccassi 2022-11-17 23:08 ` patch 'net/bonding: fix mbuf fast free handling' " luca.boccassi 2022-11-17 23:08 ` patch 'eal: fix doxygen comments for UUID' " luca.boccassi 2022-11-17 23:08 ` patch 'power: fix some doxygen comments' " luca.boccassi 2022-11-17 23:08 ` patch 'hash: fix RCU configuration memory leak' " luca.boccassi 2022-11-17 23:08 ` patch 'test/hash: remove dead code in extendable bucket test' " luca.boccassi 2022-11-17 23:08 ` patch 'test/hash: fix bulk lookup check' " luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix race condition in counter pool resizing' " luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix hairpin split with set VLAN VID action' " luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix first segment inline length' " luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix port initialization with small LRO' " luca.boccassi 2022-11-17 23:08 ` patch 'net/mlx5: fix port event cleaning order' " luca.boccassi 2022-11-18 12:53 ` Michael Baum 2022-11-18 14:27 ` Luca Boccassi 2022-11-20 7:28 ` Michael Baum 2022-11-21 14:12 ` Luca Boccassi 2022-11-21 14:17 ` Michael Baum 2022-11-21 20:36 ` Michael Baum 2022-11-17 23:08 ` patch 'net/mlx5: fix drop action validation' " luca.boccassi 2022-11-17 23:08 ` patch 'net/ice/base: fix duplicate flow rules' " luca.boccassi 2022-11-17 23:08 ` patch 'net/i40e: fix jumbo frame Rx with X722' " luca.boccassi 2022-11-17 23:08 ` patch 'net/iavf: fix tainted scalar' " luca.boccassi 2022-11-17 23:08 ` patch 'net/ice: fix scalar Rx path segment' " luca.boccassi 2022-11-17 23:08 ` patch 'net/ice: fix scalar Tx " luca.boccassi 2022-11-17 23:08 ` patch 'ci: bump versions of actions in GHA' " luca.boccassi 2022-11-17 23:08 ` patch 'ci: update to new API for step outputs " luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix event timer adapter guide' " luca.boccassi 2022-11-17 23:08 ` patch 'examples/fips_validation: fix typo in error log' " luca.boccassi 2022-11-17 23:08 ` patch 'baseband/acc100: fix input error related to padding' " luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix application name in procinfo guide' " luca.boccassi 2022-11-17 23:08 ` patch 'test/crypto: fix bitwise operator in a SNOW3G case' " luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix typo depreciated instead of deprecated' " luca.boccassi 2022-11-17 23:08 ` patch 'drivers: fix typos found by Lintian' " luca.boccassi 2022-11-17 23:08 ` patch 'doc: fix net drivers ordering' " luca.boccassi 2022-11-17 23:08 ` patch 'ring: fix description' " luca.boccassi 2022-11-17 23:08 ` patch 'ring: remove leftover comment about watermark' " luca.boccassi 2022-11-22 22:02 ` patch 'vdpa/ifc: handle data path update failure' " luca.boccassi 2022-11-22 22:02 ` patch 'service: fix build with clang 15' " luca.boccassi 2022-11-22 22:02 ` patch 'bus/dpaa: " luca.boccassi 2022-11-22 22:02 ` patch 'net/atlantic: " luca.boccassi 2022-11-22 22:02 ` patch 'app/testpmd: " luca.boccassi 2022-11-22 22:02 ` patch 'app/testpmd: fix build with clang 15 in flow code' " luca.boccassi 2022-11-22 22:02 ` patch 'test/efd: fix build with clang 15' " luca.boccassi 2022-11-22 22:02 ` patch 'test/member: " luca.boccassi 2022-11-22 22:02 ` patch 'test/event: " luca.boccassi 2022-11-22 22:02 ` patch 'net/ixgbevf: fix promiscuous and allmulti' " luca.boccassi 2022-11-22 22:02 ` patch 'net/mlx5: fix maximum LRO message size' " luca.boccassi 2022-11-22 22:02 ` patch 'doc: add LRO size limitation in mlx5 guide' " luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix underlines in testpmd " luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix colons in testpmd aged flow rules' " luca.boccassi 2022-11-22 22:02 ` patch 'net/nfp: fix Rx descriptor DMA address' " luca.boccassi 2022-11-22 22:02 ` patch 'doc: fix maximum packet size of virtio driver' " luca.boccassi 2022-11-22 22:02 ` patch 'doc: avoid meson deprecation in setup' " luca.boccassi 2022-11-28 10:47 ` patch 'devtools: fix checkpatch header retrieval from stdin' " luca.boccassi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).