* [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1
@ 2020-02-11 11:19 luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " luca.boccassi
` (188 more replies)
0 siblings, 189 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From fbb6b70fc5f255c28c18ae1ac7acc5474dfda8d5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 27 Nov 2019 14:32:32 -0800
Subject: [PATCH] eal/linux: fix uninitialized data valgrind warning
[ upstream commit e0ab8020ac2a5b379bb91fbe882ac3b08d333586 ]
Valgrind reports that eal interrupt thread is calling epoll_ctl
with uninitialized data.
This is a false positive, because the kernel is not going to care about
the unused bits in the union but trivial to fix by initializing it.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
index 1955324d30..2cd537ba44 100644
--- a/lib/librte_eal/linux/eal/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal/eal_interrupts.c
@@ -1045,7 +1045,7 @@ eal_intr_handle_interrupts(int pfd, unsigned totalfds)
static __attribute__((noreturn)) void *
eal_intr_thread_main(__rte_unused void *arg)
{
- struct epoll_event ev;
+ struct epoll_event ev = { };
/* host thread, never break out */
for (;;) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:38.895759488 +0000
+++ 0001-eal-linux-fix-uninitialized-data-valgrind-warning.patch 2020-02-11 11:17:38.295999402 +0000
@@ -1,15 +1,16 @@
-From e0ab8020ac2a5b379bb91fbe882ac3b08d333586 Mon Sep 17 00:00:00 2001
+From fbb6b70fc5f255c28c18ae1ac7acc5474dfda8d5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 27 Nov 2019 14:32:32 -0800
Subject: [PATCH] eal/linux: fix uninitialized data valgrind warning
+[ upstream commit e0ab8020ac2a5b379bb91fbe882ac3b08d333586 ]
+
Valgrind reports that eal interrupt thread is calling epoll_ctl
with uninitialized data.
This is a false positive, because the kernel is not going to care about
the unused bits in the union but trivial to fix by initializing it.
Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " luca.boccassi
` (187 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 202ec22ea3bec11baeaddd6a3648aa487313e00e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 4 Dec 2019 14:16:22 +0100
Subject: [PATCH] eal/linux: fix build error on RHEL 7.6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit aef1d0733179afb56916e95058a4f1398b81af04 ]
Previous fix gives hiccups to gcc on RHEL 7.6:
== Build lib/librte_eal/linux/eal
CC eal_interrupts.o
...lib/librte_eal/linux/eal/eal_interrupts.c: In function
‘eal_intr_thread_main’:
...lib/librte_eal/linux/eal/eal_interrupts.c:1048:9: error: missing
initializer for field ‘events’ of ‘struct epoll_event’
[-Werror=missing-field-initializers]
struct epoll_event ev = { };
^
In file included from ...lib/librte_eal/linux/eal/eal_interrupts.c:15:0:
/usr/include/sys/epoll.h:89:12: note: ‘events’ declared here
uint32_t events; /* Epoll events */
^
...lib/librte_eal/linux/eal/eal_interrupts.c: At top level:
cc1: error: unrecognized command line option
"-Wno-address-of-packed-member" [-Werror]
cc1: all warnings being treated as errors
Fixes: e0ab8020ac2a ("eal/linux: fix uninitialized data valgrind warning")
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/linux/eal/eal_interrupts.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
index 2cd537ba44..14ebb108ce 100644
--- a/lib/librte_eal/linux/eal/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal/eal_interrupts.c
@@ -1045,8 +1045,6 @@ eal_intr_handle_interrupts(int pfd, unsigned totalfds)
static __attribute__((noreturn)) void *
eal_intr_thread_main(__rte_unused void *arg)
{
- struct epoll_event ev = { };
-
/* host thread, never break out */
for (;;) {
/* build up the epoll fd with all descriptors we are to
@@ -1078,8 +1076,11 @@ eal_intr_thread_main(__rte_unused void *arg)
rte_spinlock_lock(&intr_lock);
TAILQ_FOREACH(src, &intr_sources, next) {
+ struct epoll_event ev;
+
if (src->callbacks.tqh_first == NULL)
continue; /* skip those with no callbacks */
+ memset(&ev, 0, sizeof(ev));
ev.events = EPOLLIN | EPOLLPRI | EPOLLRDHUP | EPOLLHUP;
ev.data.fd = src->intr_handle.fd;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:38.946327562 +0000
+++ 0002-eal-linux-fix-build-error-on-RHEL-7.6.patch 2020-02-11 11:17:38.299999477 +0000
@@ -1,4 +1,4 @@
-From aef1d0733179afb56916e95058a4f1398b81af04 Mon Sep 17 00:00:00 2001
+From 202ec22ea3bec11baeaddd6a3648aa487313e00e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 4 Dec 2019 14:16:22 +0100
Subject: [PATCH] eal/linux: fix build error on RHEL 7.6
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit aef1d0733179afb56916e95058a4f1398b81af04 ]
+
Previous fix gives hiccups to gcc on RHEL 7.6:
== Build lib/librte_eal/linux/eal
@@ -27,7 +29,6 @@
cc1: all warnings being treated as errors
Fixes: e0ab8020ac2a ("eal/linux: fix uninitialized data valgrind warning")
-Cc: stable@dpdk.org
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix build with python 3.8' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx: fix build with clang 9' " luca.boccassi
` (186 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2b5e45fcf3a08f09ff1db0ff2a08927cac751295 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 9 Dec 2019 21:43:12 +0100
Subject: [PATCH] doc: fix build with python 3.8
[ upstream commit 878f99d1142d861ad9e301a461ed7a05b32b7900 ]
After upgrading to python-3.8.0, a syntax mismatch is revealed:
doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal.
Did you mean "!="?
if value is not '':
Removing "is not ''" seems the right thing to do.
A patch may also be needed in the RTD theme package:
https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c.diff
(not included in release 0.4.3)
Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index e2b52e2df9..0892c06dec 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -237,7 +237,7 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl
ini_filename))
continue
- if value is not '':
+ if value:
# Get the first letter only.
ini_data[ini_filename][name] = value[0]
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:38.998656931 +0000
+++ 0003-doc-fix-build-with-python-3.8.patch 2020-02-11 11:17:38.299999477 +0000
@@ -1,8 +1,10 @@
-From 878f99d1142d861ad9e301a461ed7a05b32b7900 Mon Sep 17 00:00:00 2001
+From 2b5e45fcf3a08f09ff1db0ff2a08927cac751295 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 9 Dec 2019 21:43:12 +0100
Subject: [PATCH] doc: fix build with python 3.8
+[ upstream commit 878f99d1142d861ad9e301a461ed7a05b32b7900 ]
+
After upgrading to python-3.8.0, a syntax mismatch is revealed:
doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal.
@@ -16,7 +18,6 @@
(not included in release 0.4.3)
Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
-Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx: fix build with clang 9' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'devtools: fix debug build test' " luca.boccassi
` (185 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Ali Alnubani; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 91a56fda7ef201133fb23fb53cd0f03fbf72ac38 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Wed, 11 Dec 2019 06:49:25 +0000
Subject: [PATCH] net/mlx: fix build with clang 9
[ upstream commit c3e89f69facbbfe131b6a6723665d48801ac943d ]
This rewrites the MKSTR macro appending an empty string to its arguments
to resolve build failures similar to:
drivers/net/mlx4/mlx4.c:461:14: fatal error: format string is not a
string literal [-Wformat-nonliteral]
MKSTR(path, "%s/device/uevent", device->ibdev_path);
drivers/net/mlx4/mlx4_utils.h:82:30: note: expanded from macro 'MKSTR'
char name[snprintf(NULL, 0, __VA_ARGS__) + 1]; \
drivers/net/mlx5/mlx5_stats.c:144:15: fatal error: format string is not a
string literal [-Wformat-nonliteral]
MKSTR(path, "%s/ports/%d/hw_counters/%s",
drivers/net/mlx5/mlx5_utils.h:149:30: note: expanded from macro 'MKSTR'
char name[snprintf(NULL, 0, __VA_ARGS__) + 1]; \
The errors reproduce with clang version 9.0.0, and the release notes
don't mention what could have caused them.
Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx4/mlx4_utils.h | 5 +++--
drivers/net/mlx5/mlx5_utils.h | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index 74b9d2ecdc..5718b9c742 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -79,9 +79,10 @@ pmd_drv_log_basename(const char *s)
/** Allocate a buffer on the stack and fill it with a printf format string. */
#define MKSTR(name, ...) \
- char name[snprintf(NULL, 0, __VA_ARGS__) + 1]; \
+ int mkstr_size_##name = snprintf(NULL, 0, "" __VA_ARGS__); \
+ char name[mkstr_size_##name + 1]; \
\
- snprintf(name, sizeof(name), __VA_ARGS__)
+ snprintf(name, sizeof(name), "" __VA_ARGS__)
/** Generate a string out of the provided arguments. */
#define MLX4_STR(...) # __VA_ARGS__
diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
index b4ed8c6dad..ebf79b80a4 100644
--- a/drivers/net/mlx5/mlx5_utils.h
+++ b/drivers/net/mlx5/mlx5_utils.h
@@ -146,9 +146,10 @@ extern int mlx5_logtype;
/* Allocate a buffer on the stack and fill it with a printf format string. */
#define MKSTR(name, ...) \
- char name[snprintf(NULL, 0, __VA_ARGS__) + 1]; \
+ int mkstr_size_##name = snprintf(NULL, 0, "" __VA_ARGS__); \
+ char name[mkstr_size_##name + 1]; \
\
- snprintf(name, sizeof(name), __VA_ARGS__)
+ snprintf(name, sizeof(name), "" __VA_ARGS__)
/**
* Return logarithm of the nearest power of two above input value.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.047123217 +0000
+++ 0004-net-mlx-fix-build-with-clang-9.patch 2020-02-11 11:17:38.303999552 +0000
@@ -1,8 +1,10 @@
-From c3e89f69facbbfe131b6a6723665d48801ac943d Mon Sep 17 00:00:00 2001
+From 91a56fda7ef201133fb23fb53cd0f03fbf72ac38 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Wed, 11 Dec 2019 06:49:25 +0000
Subject: [PATCH] net/mlx: fix build with clang 9
+[ upstream commit c3e89f69facbbfe131b6a6723665d48801ac943d ]
+
This rewrites the MKSTR macro appending an empty string to its arguments
to resolve build failures similar to:
@@ -25,7 +27,6 @@
Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
-Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'devtools: fix debug build test' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (2 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx: fix build with clang 9' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/common: fix log2 check' " luca.boccassi
` (184 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b24bf09e457f4789f9700a14bb7feb9c696e8c58 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 16 Dec 2019 15:45:32 +0100
Subject: [PATCH] devtools: fix debug build test
[ upstream commit 924e55fb340623f03fdf2ff7fbcfd78819d1db25 ]
When testing build with +debug options, the statistics are enabled.
It was wrongly matching CONFIG_RTE_IBVERBS_LINK_STATIC.
The pattern is fixed to match only statistics config options.
Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")
Reported-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/test-build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index be565a1bea..52305fbb8c 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -149,7 +149,7 @@ config () # <directory> <target> <options>
! echo $3 | grep -q '+debug' || ( \
sed -ri="" 's,(RTE_LOG_DP_LEVEL=).*,\1RTE_LOG_DEBUG,' $1/.config
sed -ri="" 's,(_DEBUG.*=)n,\1y,' $1/.config
- sed -ri="" 's,(_STAT.*=)n,\1y,' $1/.config
+ sed -ri="" 's,(_STAT)([S_].*=|=)n,\1\2y,' $1/.config
sed -ri="" 's,(TEST_PMD_RECORD_.*=)n,\1y,' $1/.config )
# Automatic configuration
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.097124067 +0000
+++ 0005-devtools-fix-debug-build-test.patch 2020-02-11 11:17:38.303999552 +0000
@@ -1,14 +1,15 @@
-From 924e55fb340623f03fdf2ff7fbcfd78819d1db25 Mon Sep 17 00:00:00 2001
+From b24bf09e457f4789f9700a14bb7feb9c696e8c58 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 16 Dec 2019 15:45:32 +0100
Subject: [PATCH] devtools: fix debug build test
+[ upstream commit 924e55fb340623f03fdf2ff7fbcfd78819d1db25 ]
+
When testing build with +debug options, the statistics are enabled.
It was wrongly matching CONFIG_RTE_IBVERBS_LINK_STATIC.
The pattern is fixed to match only statistics config options.
Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")
-Cc: stable@dpdk.org
Reported-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/common: fix log2 check' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (3 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'devtools: fix debug build test' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " luca.boccassi
` (183 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: David Marchand; +Cc: Aaron Conole, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 80e5c632b72b582777a8615d7a2cb660b8425b27 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 20 Dec 2019 15:01:49 +0100
Subject: [PATCH] test/common: fix log2 check
[ upstream commit 30a0df64aaed5cbf33fd5d237d5812cee1cc0ef9 ]
We recently started to get random failures on the common_autotest ut with
clang on Ubuntu 16.04.6.
Example: https://travis-ci.com/DPDK/dpdk/jobs/263177424
Wrong rte_log2_u64(0) val 0, expected ffffffff
Test Failed
The ut passes 0 to log2() to get an expected value.
Quoting log2 / log(3) manual:
If x is zero, then a pole error occurs, and the functions return
-HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.
rte_log2_uXX helpers handle 0 as a special value and return 0.
Let's have dedicated tests for this case.
Fixes: 05c4345ef5c2 ("test: add unit test for integer log2 function")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
app/test/test_common.c | 14 +++++++++++++-
lib/librte_eal/common/include/rte_common.h | 6 ++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/app/test/test_common.c b/app/test/test_common.c
index 2b856f8ba5..12bd1cad90 100644
--- a/app/test/test_common.c
+++ b/app/test/test_common.c
@@ -216,7 +216,19 @@ test_log2(void)
const uint32_t max = 0x10000;
const uint32_t step = 1;
- for (i = 0; i < max; i = i + step) {
+ compare = rte_log2_u32(0);
+ if (compare != 0) {
+ printf("Wrong rte_log2_u32(0) val %x, expected 0\n", compare);
+ return TEST_FAILED;
+ }
+
+ compare = rte_log2_u64(0);
+ if (compare != 0) {
+ printf("Wrong rte_log2_u64(0) val %x, expected 0\n", compare);
+ return TEST_FAILED;
+ }
+
+ for (i = 1; i < max; i = i + step) {
uint64_t i64;
/* extend range for 64-bit */
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 459d082d14..c352838073 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -538,6 +538,9 @@ rte_bsf32_safe(uint64_t v, uint32_t *pos)
/**
* Return the rounded-up log2 of a integer.
*
+ * @note Contrary to the logarithm mathematical operation,
+ * rte_log2_u32(0) == 0 and not -inf.
+ *
* @param v
* The input parameter.
* @return
@@ -632,6 +635,9 @@ rte_fls_u64(uint64_t x)
/**
* Return the rounded-up log2 of a 64-bit integer.
*
+ * @note Contrary to the logarithm mathematical operation,
+ * rte_log2_u64(0) == 0 and not -inf.
+ *
* @param v
* The input parameter.
* @return
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.145096561 +0000
+++ 0006-test-common-fix-log2-check.patch 2020-02-11 11:17:38.303999552 +0000
@@ -1,8 +1,10 @@
-From 30a0df64aaed5cbf33fd5d237d5812cee1cc0ef9 Mon Sep 17 00:00:00 2001
+From 80e5c632b72b582777a8615d7a2cb660b8425b27 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 20 Dec 2019 15:01:49 +0100
Subject: [PATCH] test/common: fix log2 check
+[ upstream commit 30a0df64aaed5cbf33fd5d237d5812cee1cc0ef9 ]
+
We recently started to get random failures on the common_autotest ut with
clang on Ubuntu 16.04.6.
@@ -21,7 +23,6 @@
Let's have dedicated tests for this case.
Fixes: 05c4345ef5c2 ("test: add unit test for integer log2 function")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'service: don't walk out of bounds when checking services' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (4 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'test/common: fix log2 check' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " luca.boccassi
` (182 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Aaron Conole; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 09ae599c8c6bcb8dcee0c989dda75bac8ad5ee26 Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole@redhat.com>
Date: Tue, 3 Dec 2019 16:15:44 -0500
Subject: [PATCH] service: don't walk out of bounds when checking services
[ upstream commit 2e088e6f94b773233c06440763c1be43d0d705b3 ]
The service_valid call is used without properly bounds checking the
input parameter. Almost all instances of the service_valid call are
inside a for() loop that prevents excessive walks, but some of the
public APIs don't bounds check and will pass invalid arguments.
Prevent this by using SERVICE_GET_OR_ERR_RET where it makes sense,
and adding a bounds check to one service_valid() use.
Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore function")
Fixes: e9139a32f6e8 ("service: add function to run on app lcore")
Fixes: e30dd31847d2 ("service: add mechanism for quiescing")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/common/rte_service.c | 32 ++++++++++++++++++-----------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 79235c03f8..7e537b8cd2 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -137,6 +137,12 @@ service_valid(uint32_t id)
return !!(rte_services[id].internal_flags & SERVICE_F_REGISTERED);
}
+static struct rte_service_spec_impl *
+service_get(uint32_t id)
+{
+ return &rte_services[id];
+}
+
/* validate ID and retrieve service pointer, or return error value */
#define SERVICE_VALID_GET_OR_ERR_RET(id, service, retval) do { \
if (id >= RTE_SERVICE_NUM_MAX || !service_valid(id)) \
@@ -344,12 +350,14 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
}
-static inline int32_t
-service_run(uint32_t i, struct core_state *cs, uint64_t service_mask)
+/* Expects the service 's' is valid. */
+static int32_t
+service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
+ struct rte_service_spec_impl *s)
{
- if (!service_valid(i))
+ if (!s)
return -EINVAL;
- struct rte_service_spec_impl *s = &rte_services[i];
+
if (s->comp_runstate != RUNSTATE_RUNNING ||
s->app_runstate != RUNSTATE_RUNNING ||
!(service_mask & (UINT64_C(1) << i))) {
@@ -383,7 +391,7 @@ rte_service_may_be_active(uint32_t id)
int32_t lcore_count = rte_service_lcore_list(ids, RTE_MAX_LCORE);
int i;
- if (!service_valid(id))
+ if (id >= RTE_SERVICE_NUM_MAX || !service_valid(id))
return -EINVAL;
for (i = 0; i < lcore_count; i++) {
@@ -397,12 +405,10 @@ rte_service_may_be_active(uint32_t id)
int32_t
rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
{
- /* run service on calling core, using all-ones as the service mask */
- if (!service_valid(id))
- return -EINVAL;
-
struct core_state *cs = &lcore_states[rte_lcore_id()];
- struct rte_service_spec_impl *s = &rte_services[id];
+ struct rte_service_spec_impl *s;
+
+ SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
/* Atomically add this core to the mapped cores first, then examine if
* we can run the service. This avoids a race condition between
@@ -418,7 +424,7 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
return -EBUSY;
}
- int ret = service_run(id, cs, UINT64_MAX);
+ int ret = service_run(id, cs, UINT64_MAX, s);
if (serialize_mt_unsafe)
rte_atomic32_dec(&s->num_mapped_cores);
@@ -438,8 +444,10 @@ rte_service_runner_func(void *arg)
const uint64_t service_mask = cs->service_mask;
for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
+ if (!service_valid(i))
+ continue;
/* return value ignored as no change to code flow */
- service_run(i, cs, service_mask);
+ service_run(i, cs, service_mask, service_get(i));
}
cs->loops++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.196691465 +0000
+++ 0007-service-don-t-walk-out-of-bounds-when-checking-servi.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,8 +1,10 @@
-From 2e088e6f94b773233c06440763c1be43d0d705b3 Mon Sep 17 00:00:00 2001
+From 09ae599c8c6bcb8dcee0c989dda75bac8ad5ee26 Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole@redhat.com>
Date: Tue, 3 Dec 2019 16:15:44 -0500
Subject: [PATCH] service: don't walk out of bounds when checking services
+[ upstream commit 2e088e6f94b773233c06440763c1be43d0d705b3 ]
+
The service_valid call is used without properly bounds checking the
input parameter. Almost all instances of the service_valid call are
inside a for() loop that prevents excessive walks, but some of the
@@ -14,7 +16,6 @@
Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore function")
Fixes: e9139a32f6e8 ("service: add function to run on app lcore")
Fixes: e30dd31847d2 ("service: add mechanism for quiescing")
-Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'build: explicitly enable sse4 for meson' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (5 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'build: fix libm detection in " luca.boccassi
` (181 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6bcb93c8232d3ddc2547018acd18e94e93acb85c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 23 Dec 2019 10:38:40 +0000
Subject: [PATCH] build: explicitly enable sse4 for meson
[ upstream commit 10060dba6455461088d24e03d3cfeba639d53022 ]
If the compiler does not recognise the specific CPU when building with the
default "native" machine type, sse4.2 instructions can be missing, causing
a build error. Rather than advising the user to change the machine type,
we can just turn on SSE4.2 directly. This can prevent issues with running
automated tests with older compilers/distros on newer hardware.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
config/x86/meson.build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 8b0fa3e6f1..adc857ba28 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -15,11 +15,9 @@ if not is_windows
endif
# we require SSE4.2 for DPDK
-sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
-Please set the machine type to "nehalem" or "corei7" or higher value'''
-
if cc.get_define('__SSE4_2__', args: machine_args) == ''
- error(sse_errormsg)
+ message('SSE 4.2 not enabled by default, explicitly enabling')
+ machine_args += '-msse4'
endif
base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.246524312 +0000
+++ 0008-build-explicitly-enable-sse4-for-meson.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,16 +1,16 @@
-From 10060dba6455461088d24e03d3cfeba639d53022 Mon Sep 17 00:00:00 2001
+From 6bcb93c8232d3ddc2547018acd18e94e93acb85c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 23 Dec 2019 10:38:40 +0000
Subject: [PATCH] build: explicitly enable sse4 for meson
+[ upstream commit 10060dba6455461088d24e03d3cfeba639d53022 ]
+
If the compiler does not recognise the specific CPU when building with the
default "native" machine type, sse4.2 instructions can be missing, causing
a build error. Rather than advising the user to change the machine type,
we can just turn on SSE4.2 directly. This can prevent issues with running
automated tests with older compilers/distros on newer hardware.
-Cc: stable@dpdk.org
-
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'build: fix libm detection in meson' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (6 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'ci: use meson 0.47.1' " luca.boccassi
` (180 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 02433344bf7b5f4055ce432fbd3e16913a0252f7 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 9 Jan 2020 13:59:15 +0100
Subject: [PATCH] build: fix libm detection in meson
[ upstream commit 063c4c5fa0658e53d2187036532d1273acf5d645 ]
Using version 0.47.1, meson is unable to find the math library in Travis
for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.
Switching to 0.48.0, the problem disappears.
But we should pass 'm' to find_library instead of 'libm' anyway.
Fixes: 98edcbb5ab2f ("eal/windows: introduce Windows support")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index 364a8d7394..41747012df 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -105,7 +105,7 @@ add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
# on some OS, maths functions are in a separate library
-if cc.find_library('libm', required : false).found()
+if cc.find_library('m', required : false).found()
# some libs depend on maths lib
add_project_link_arguments('-lm', language: 'c')
dpdk_extra_ldflags += '-lm'
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.294220040 +0000
+++ 0009-build-fix-libm-detection-in-meson.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,8 +1,10 @@
-From 063c4c5fa0658e53d2187036532d1273acf5d645 Mon Sep 17 00:00:00 2001
+From 02433344bf7b5f4055ce432fbd3e16913a0252f7 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 9 Jan 2020 13:59:15 +0100
Subject: [PATCH] build: fix libm detection in meson
+[ upstream commit 063c4c5fa0658e53d2187036532d1273acf5d645 ]
+
Using version 0.47.1, meson is unable to find the math library in Travis
for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.
@@ -12,7 +14,6 @@
But we should pass 'm' to find_library instead of 'libm' anyway.
Fixes: 98edcbb5ab2f ("eal/windows: introduce Windows support")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -21,10 +22,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
-index 01911ecf94..28a57f56fc 100644
+index 364a8d7394..41747012df 100644
--- a/config/meson.build
+++ b/config/meson.build
-@@ -115,7 +115,7 @@ add_project_link_arguments('-pthread', language: 'c')
+@@ -105,7 +105,7 @@ add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
# on some OS, maths functions are in a separate library
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ci: use meson 0.47.1' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (7 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'build: fix libm detection in " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " luca.boccassi
` (179 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 864b67a3d9e426dffc66988a78bdb14287dbdecc Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 9 Jan 2020 13:59:16 +0100
Subject: [PATCH] ci: use meson 0.47.1
[ upstream commit a02b9406a8769247737b55dbfa50b6b5f896d946 ]
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes
in Ubuntu 16.04.
On the other hand, the minimal version supported in dpdk is 0.47.1.
Stick to this version to avoid getting hit by regressions in meson latest
shiny release.
1: https://github.com/mesonbuild/meson/issues/6427
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
.ci/linux-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
index dfb9d4a206..38bb88e15c 100755
--- a/.ci/linux-setup.sh
+++ b/.ci/linux-setup.sh
@@ -1,7 +1,7 @@
#!/bin/sh -xe
# need to install as 'root' since some of the unit tests won't run without it
-sudo python3 -m pip install --upgrade meson
+sudo python3 -m pip install --upgrade 'meson==0.47.1'
# setup hugepages
cat /proc/meminfo
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.342989932 +0000
+++ 0010-ci-use-meson-0.47.1.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,8 +1,10 @@
-From a02b9406a8769247737b55dbfa50b6b5f896d946 Mon Sep 17 00:00:00 2001
+From 864b67a3d9e426dffc66988a78bdb14287dbdecc Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 9 Jan 2020 13:59:16 +0100
Subject: [PATCH] ci: use meson 0.47.1
+[ upstream commit a02b9406a8769247737b55dbfa50b6b5f896d946 ]
+
meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes
in Ubuntu 16.04.
On the other hand, the minimal version supported in dpdk is 0.47.1.
@@ -12,8 +14,6 @@
1: https://github.com/mesonbuild/meson/issues/6427
-Cc: stable@dpdk.org
-
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'kni: fix meson warning about console keyword' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (8 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'ci: use meson 0.47.1' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix warning with meson' " luca.boccassi
` (178 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From de4ec86b4aa93965217d5a506fc8769899c06e53 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:00 +0000
Subject: [PATCH] kni: fix meson warning about console keyword
[ upstream commit 4a4ccf8a22ac39cc91f211edae0917de88d0160c ]
Since kni no longer includes the ethtool code and so is faster to build, we
no longer need the console parameter to have incremental screen updates as
it builds. Therefore, we drop the keyword which removes the warning.
Fixes: b78f32cff94d ("kni: support meson build")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
kernel/linux/kni/meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 955eec9496..f93e97fa09 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -23,7 +23,6 @@ custom_target('rte_kni',
' -I' + meson.current_source_dir(),
'modules'],
depends: kni_mkfile,
- console: true,
install: true,
install_dir: kernel_dir + '/extra/dpdk',
build_by_default: get_option('enable_kmods'))
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.390694126 +0000
+++ 0011-kni-fix-meson-warning-about-console-keyword.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,14 +1,15 @@
-From 4a4ccf8a22ac39cc91f211edae0917de88d0160c Mon Sep 17 00:00:00 2001
+From de4ec86b4aa93965217d5a506fc8769899c06e53 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:00 +0000
Subject: [PATCH] kni: fix meson warning about console keyword
+[ upstream commit 4a4ccf8a22ac39cc91f211edae0917de88d0160c ]
+
Since kni no longer includes the ethtool code and so is faster to build, we
no longer need the console parameter to have incremental screen updates as
it builds. Therefore, we drop the keyword which removes the warning.
Fixes: b78f32cff94d ("kni: support meson build")
-Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix warning with meson' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (9 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " luca.boccassi
` (177 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From efa577f3eb9b7d0cf5d9b1a41a5880bead2e8add Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:02 +0000
Subject: [PATCH] doc: fix warning with meson
[ upstream commit b1e1bd379afb89495b7d72a4edad89292c21d17a ]
The install parameter to configure_file is new in 0.50 and generates a
warning since it is newer than our minimum version of 0.47.1. The
parameter, however, is unneeded as the documentation states:
"When omitted it defaults to true when install_dir is set and not empty,
false otherwise."
Given that install_dir is not set for this file, install defaults to false
so no need to explicitly specify it.
Fixes: 720b14db3ae2 ("build: generate API documentation with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
doc/api/meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 1c48b7672e..23a7dfc759 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -38,8 +38,7 @@ if doxygen.found()
doxy_conf = configure_file(input: 'doxy-api.conf.in',
output: 'doxy-api.conf',
- configuration: cdata,
- install: false)
+ configuration: cdata)
doxy_build = custom_target('doxygen',
depends: example,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.439781108 +0000
+++ 0012-doc-fix-warning-with-meson.patch 2020-02-11 11:17:38.307999627 +0000
@@ -1,8 +1,10 @@
-From b1e1bd379afb89495b7d72a4edad89292c21d17a Mon Sep 17 00:00:00 2001
+From efa577f3eb9b7d0cf5d9b1a41a5880bead2e8add Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:02 +0000
Subject: [PATCH] doc: fix warning with meson
+[ upstream commit b1e1bd379afb89495b7d72a4edad89292c21d17a ]
+
The install parameter to configure_file is new in 0.50 and generates a
warning since it is newer than our minimum version of 0.47.1. The
parameter, however, is unneeded as the documentation states:
@@ -14,7 +16,6 @@
so no need to explicitly specify it.
Fixes: 720b14db3ae2 ("build: generate API documentation with meson")
-Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: reduce whitespace in meson build file' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (10 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix warning with meson' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce indentation " luca.boccassi
` (176 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 59f2b081a108fe568becb6cc8010b395cc61a29a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:03 +0000
Subject: [PATCH] doc: reduce whitespace in meson build file
[ upstream commit affc17c821e37e53d786a1d0b7c179f533684ac1 ]
For building the guides, we can make the meson.build easier to read by
using the subdir_done function to quit early.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
doc/guides/meson.build | 46 ++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/doc/guides/meson.build b/doc/guides/meson.build
index 7931ef3bb5..80c21d1682 100644
--- a/doc/guides/meson.build
+++ b/doc/guides/meson.build
@@ -3,26 +3,28 @@
sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
-if sphinx.found()
- htmldir = join_paths('share', 'doc', 'dpdk')
- html_guides_build = custom_target('html_guides_build',
- input: meson.current_source_dir(),
- output: 'guides',
- command: [sphinx, '-b', 'html',
- '-d', meson.current_build_dir() + '/.doctrees',
- '@INPUT@', meson.current_build_dir() + '/guides'],
- build_by_default: get_option('enable_docs'),
- install: get_option('enable_docs'),
- install_dir: htmldir)
-
- doc_targets += html_guides_build
- doc_target_names += 'HTML_Guides'
-
- # sphinx leaves a .buildinfo in the target directory, which we don't
- # want to install. Note that sh -c has to be used, otherwise the
- # env var does not get expanded if calling rm/install directly.
- meson.add_install_script('sh', '-c',
- 'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo')
- meson.add_install_script('sh', '-c',
- 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css')
+if not sphinx.found()
+ subdir_done()
endif
+
+htmldir = join_paths('share', 'doc', 'dpdk')
+html_guides = custom_target('html_guides',
+ input: meson.current_source_dir(),
+ output: 'guides',
+ command: [sphinx, '-b', 'html',
+ '-d', meson.current_build_dir() + '/.doctrees',
+ '@INPUT@', meson.current_build_dir() + '/guides'],
+ build_by_default: get_option('enable_docs'),
+ install: get_option('enable_docs'),
+ install_dir: htmldir)
+
+doc_targets += html_guides
+doc_target_names += 'HTML_Guides'
+
+# sphinx leaves a .buildinfo in the target directory, which we don't
+# want to install. Note that sh -c has to be used, otherwise the
+# env var does not get expanded if calling rm/install directly.
+meson.add_install_script('sh', '-c',
+ 'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo')
+meson.add_install_script('sh', '-c',
+ 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css')
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.489210884 +0000
+++ 0013-doc-reduce-whitespace-in-meson-build-file.patch 2020-02-11 11:17:38.311999701 +0000
@@ -1,13 +1,13 @@
-From affc17c821e37e53d786a1d0b7c179f533684ac1 Mon Sep 17 00:00:00 2001
+From 59f2b081a108fe568becb6cc8010b395cc61a29a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:03 +0000
Subject: [PATCH] doc: reduce whitespace in meson build file
+[ upstream commit affc17c821e37e53d786a1d0b7c179f533684ac1 ]
+
For building the guides, we can make the meson.build easier to read by
using the subdir_done function to quit early.
-Cc: stable@dpdk.org
-
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: reduce indentation in meson build file' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (11 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " luca.boccassi
` (175 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 323f74402f61bd29c3180aafae1268a178b26a66 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:05 +0000
Subject: [PATCH] doc: reduce indentation in meson build file
[ upstream commit bbfc94efcafab236339cd1ec73bb523275d52c60 ]
When building the API docs, we can make the meson.build file easier to
read, and allow more code per line, by using subdir_done() to quit early.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
doc/api/meson.build | 98 +++++++++++++++++++++++----------------------
1 file changed, 50 insertions(+), 48 deletions(-)
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 23a7dfc759..c72b880e10 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -3,52 +3,54 @@
doxygen = find_program('doxygen', required: get_option('enable_docs'))
-if doxygen.found()
- # due to the CSS customisation script, which needs to run on a file that
- # is in a subdirectory that is created at build time and thus it cannot
- # be an individual custom_target, we need to wrap the doxygen call in a
- # script to run the CSS modification afterwards
- generate_doxygen = find_program('generate_doxygen.sh')
- generate_examples = find_program('generate_examples.sh')
- generate_css = find_program('doxy-html-custom.sh')
-
- inputdir = join_paths(meson.source_root(), 'examples')
- htmldir = join_paths('share', 'doc', 'dpdk')
-
- # due to the following bug: https://github.com/mesonbuild/meson/issues/4107
- # if install is set to true it will override build_by_default and it will
- # cause the target to always be built. If install were to be always set to
- # false it would be impossible to install the docs.
- # So use a configure option for now.
- example = custom_target('examples.dox',
- input: inputdir,
- output: 'examples.dox',
- command: [generate_examples, '@INPUT@', '@OUTPUT@'],
- install: get_option('enable_docs'),
- install_dir: htmldir,
- build_by_default: get_option('enable_docs'))
-
- cdata = configuration_data()
- cdata.set('VERSION', meson.project_version())
- cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox'))
- cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
- cdata.set('HTML_OUTPUT', 'api')
- cdata.set('TOPDIR', meson.source_root())
- cdata.set('STRIP_FROM_PATH', meson.source_root())
-
- doxy_conf = configure_file(input: 'doxy-api.conf.in',
- output: 'doxy-api.conf',
- configuration: cdata)
-
- doxy_build = custom_target('doxygen',
- depends: example,
- input: doxy_conf,
- output: 'api',
- command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
- install: get_option('enable_docs'),
- install_dir: htmldir,
- build_by_default: get_option('enable_docs'))
-
- doc_targets += doxy_build
- doc_target_names += 'Doxygen_API'
+if not doxygen.found()
+ subdir_done()
endif
+
+# due to the CSS customisation script, which needs to run on a file that
+# is in a subdirectory that is created at build time and thus it cannot
+# be an individual custom_target, we need to wrap the doxygen call in a
+# script to run the CSS modification afterwards
+generate_doxygen = find_program('generate_doxygen.sh')
+generate_examples = find_program('generate_examples.sh')
+generate_css = find_program('doxy-html-custom.sh')
+
+inputdir = join_paths(meson.source_root(), 'examples')
+htmldir = join_paths('share', 'doc', 'dpdk')
+
+# due to the following bug: https://github.com/mesonbuild/meson/issues/4107
+# if install is set to true it will override build_by_default and it will
+# cause the target to always be built. If install were to be always set to
+# false it would be impossible to install the docs.
+# So use a configure option for now.
+example = custom_target('examples.dox',
+ input: inputdir,
+ output: 'examples.dox',
+ command: [generate_examples, '@INPUT@', '@OUTPUT@'],
+ install: get_option('enable_docs'),
+ install_dir: htmldir,
+ build_by_default: get_option('enable_docs'))
+
+cdata = configuration_data()
+cdata.set('VERSION', meson.project_version())
+cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox'))
+cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
+cdata.set('HTML_OUTPUT', 'api')
+cdata.set('TOPDIR', meson.source_root())
+cdata.set('STRIP_FROM_PATH', meson.source_root())
+
+doxy_conf = configure_file(input: 'doxy-api.conf.in',
+ output: 'doxy-api.conf',
+ configuration: cdata)
+
+doxy_build = custom_target('doxygen',
+ depends: example,
+ input: doxy_conf,
+ output: 'api',
+ command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
+ install: get_option('enable_docs'),
+ install_dir: htmldir,
+ build_by_default: get_option('enable_docs'))
+
+doc_targets += doxy_build
+doc_target_names += 'Doxygen_API'
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.537138506 +0000
+++ 0014-doc-reduce-indentation-in-meson-build-file.patch 2020-02-11 11:17:38.311999701 +0000
@@ -1,12 +1,13 @@
-From bbfc94efcafab236339cd1ec73bb523275d52c60 Mon Sep 17 00:00:00 2001
+From 323f74402f61bd29c3180aafae1268a178b26a66 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:05 +0000
Subject: [PATCH] doc: reduce indentation in meson build file
+[ upstream commit bbfc94efcafab236339cd1ec73bb523275d52c60 ]
+
When building the API docs, we can make the meson.build file easier to
read, and allow more code per line, by using subdir_done() to quit early.
-Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (12 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce indentation " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix event device config' " luca.boccassi
` (174 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Mattias Rönnblom; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9242469d0d086cec53818a5bfcf0de08c29de9eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Tue, 17 Dec 2019 12:13:44 +0100
Subject: [PATCH] event/dsw: flush buffers immediately on zero-sized enqueue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 5747c83257306ad8e546e456fcfe8e89dac48bf9 ]
Fix DSW's rte_event_enqueue_burst(), so that a call with a zero-sized
event array immediately flushes the port's output buffers. Prior to
this patch, the flush operation would be deferred to the next enqueue
or dequeue call, which is inconsistent with DSW documentation.
Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
drivers/event/dsw/dsw_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 61a66fabf3..1641c2d06e 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -1047,6 +1047,7 @@ dsw_event_enqueue_burst_generic(void *port, const struct rte_event events[],
*/
if (unlikely(events_len == 0)) {
dsw_port_note_op(source_port, DSW_MAX_PORT_OPS_PER_BG_TASK);
+ dsw_port_flush_out_buffers(dsw, port);
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.585558303 +0000
+++ 0015-event-dsw-flush-buffers-immediately-on-zero-sized-en.patch 2020-02-11 11:17:38.311999701 +0000
@@ -1,4 +1,4 @@
-From 5747c83257306ad8e546e456fcfe8e89dac48bf9 Mon Sep 17 00:00:00 2001
+From 9242469d0d086cec53818a5bfcf0de08c29de9eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Tue, 17 Dec 2019 12:13:44 +0100
Subject: [PATCH] event/dsw: flush buffers immediately on zero-sized enqueue
@@ -6,13 +6,14 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 5747c83257306ad8e546e456fcfe8e89dac48bf9 ]
+
Fix DSW's rte_event_enqueue_burst(), so that a call with a zero-sized
event array immediately flushes the port's output buffers. Prior to
this patch, the flush operation would be deferred to the next enqueue
or dequeue call, which is inconsistent with DSW documentation.
Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
-Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-event: fix event device config' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (13 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " luca.boccassi
` (173 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 807a4bdc1f226f474d3b995b42289cb8a7fd081c Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 20 Dec 2019 19:57:41 +0530
Subject: [PATCH] examples/l2fwd-event: fix event device config
[ upstream commit 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d ]
Always enable implicit release since we don't support explicit release
in datapath.
Master lcore is used only for printing stats so don't allocate event
port for it.
Fix service launch for event device without distributed scheduling.
Fixes: bcb6f841d42a ("examples/l2fwd-event: setup service core")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
examples/l2fwd-event/l2fwd_event.c | 2 +-
examples/l2fwd-event/l2fwd_event_generic.c | 9 ++++++---
examples/l2fwd-event/l2fwd_event_internal_port.c | 11 +++++------
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c
index 0379c580d6..38d590c14c 100644
--- a/examples/l2fwd-event/l2fwd_event.c
+++ b/examples/l2fwd-event/l2fwd_event.c
@@ -67,7 +67,7 @@ l2fwd_event_service_setup(struct l2fwd_resources *rsrc)
int ret, i;
rte_event_dev_info_get(evt_rsrc->event_d_id, &evdev_info);
- if (evdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED) {
+ if (!(evdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED)) {
ret = rte_event_dev_service_id_get(evt_rsrc->event_d_id,
&service_id);
if (ret != -ESRCH && ret != 0)
diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c
index b7e467c1e1..b07306a17b 100644
--- a/examples/l2fwd-event/l2fwd_event_generic.c
+++ b/examples/l2fwd-event/l2fwd_event_generic.c
@@ -42,8 +42,10 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)
/* Event device configurtion */
rte_event_dev_info_get(event_d_id, &dev_info);
- evt_rsrc->disable_implicit_release = !!(dev_info.event_dev_cap &
- RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);
+
+ /* Enable implicit release */
+ if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)
+ evt_rsrc->disable_implicit_release = 0;
if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)
event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;
@@ -70,7 +72,8 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)
event_d_conf.nb_event_port_enqueue_depth =
dev_info.max_event_port_enqueue_depth;
- num_workers = rte_lcore_count() - rte_service_lcore_count();
+ /* Ignore Master core and service cores. */
+ num_workers = rte_lcore_count() - 1 - rte_service_lcore_count();
if (dev_info.max_event_ports < num_workers)
num_workers = dev_info.max_event_ports;
diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c
index b382763dd9..5e6e8598af 100644
--- a/examples/l2fwd-event/l2fwd_event_internal_port.c
+++ b/examples/l2fwd-event/l2fwd_event_internal_port.c
@@ -27,7 +27,6 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
.nb_event_port_enqueue_depth = 128
};
struct rte_event_dev_info dev_info;
- uint8_t disable_implicit_release;
const uint8_t event_d_id = 0; /* Always use first event device only */
uint32_t event_queue_cfg = 0;
uint16_t ethdev_count = 0;
@@ -44,10 +43,9 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
/* Event device configurtion */
rte_event_dev_info_get(event_d_id, &dev_info);
- disable_implicit_release = !!(dev_info.event_dev_cap &
- RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);
- evt_rsrc->disable_implicit_release =
- disable_implicit_release;
+ /* Enable implicit release */
+ if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)
+ evt_rsrc->disable_implicit_release = 0;
if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)
event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;
@@ -73,7 +71,8 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)
event_d_conf.nb_event_port_enqueue_depth =
dev_info.max_event_port_enqueue_depth;
- num_workers = rte_lcore_count();
+ /* Ignore Master core. */
+ num_workers = rte_lcore_count() - 1;
if (dev_info.max_event_ports < num_workers)
num_workers = dev_info.max_event_ports;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.634284000 +0000
+++ 0016-examples-l2fwd-event-fix-event-device-config.patch 2020-02-11 11:17:38.311999701 +0000
@@ -1,8 +1,10 @@
-From 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d Mon Sep 17 00:00:00 2001
+From 807a4bdc1f226f474d3b995b42289cb8a7fd081c Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 20 Dec 2019 19:57:41 +0530
Subject: [PATCH] examples/l2fwd-event: fix event device config
+[ upstream commit 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d ]
+
Always enable implicit release since we don't support explicit release
in datapath.
Master lcore is used only for printing stats so don't allocate event
@@ -10,7 +12,6 @@
Fix service launch for event device without distributed scheduling.
Fixes: bcb6f841d42a ("examples/l2fwd-event: setup service core")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (14 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix event device config' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix ethdev RSS setup' " luca.boccassi
` (172 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Mattias Rönnblom; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 93757d0880c31bd6e7a98301799aba13f331b81e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Tue, 14 Jan 2020 19:03:38 +0100
Subject: [PATCH] event/dsw: avoid credit leak on oversized enqueue bursts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 0c4155c7b5b51a60f676c1d7279bfcd1b14acd38 ]
If an application issues rte_event_enqueue_new_burst() or
rte_event_enqueue_forward_burst() call with a burst of events longer
than the configured max enqueue burst size, DSW allocates credits not
only for events actually enqueued, but for the complete burst. If this
process is repeated, enough credits will have leaked to cause the
event device to backpressure (i.e. disallow) any new enqueue
operations.
In addition, the port-level enqueue xstats will log the wrong number
of events enqueued for oversized enqueues.
This patch makes DSW gracefully handle oversized enqueue bursts.
Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
drivers/event/dsw/dsw_event.c | 38 ++++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 1641c2d06e..eae53b2404 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -1018,12 +1018,12 @@ dsw_event_enqueue(void *port, const struct rte_event *ev)
}
static __rte_always_inline uint16_t
-dsw_event_enqueue_burst_generic(void *port, const struct rte_event events[],
+dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
+ const struct rte_event events[],
uint16_t events_len, bool op_types_known,
uint16_t num_new, uint16_t num_release,
uint16_t num_non_release)
{
- struct dsw_port *source_port = port;
struct dsw_evdev *dsw = source_port->dsw;
bool enough_credits;
uint16_t i;
@@ -1047,13 +1047,10 @@ dsw_event_enqueue_burst_generic(void *port, const struct rte_event events[],
*/
if (unlikely(events_len == 0)) {
dsw_port_note_op(source_port, DSW_MAX_PORT_OPS_PER_BG_TASK);
- dsw_port_flush_out_buffers(dsw, port);
+ dsw_port_flush_out_buffers(dsw, source_port);
return 0;
}
- if (unlikely(events_len > source_port->enqueue_depth))
- events_len = source_port->enqueue_depth;
-
dsw_port_note_op(source_port, events_len);
if (!op_types_known)
@@ -1109,24 +1106,41 @@ uint16_t
dsw_event_enqueue_burst(void *port, const struct rte_event events[],
uint16_t events_len)
{
- return dsw_event_enqueue_burst_generic(port, events, events_len, false,
- 0, 0, 0);
+ struct dsw_port *source_port = port;
+
+ if (unlikely(events_len > source_port->enqueue_depth))
+ events_len = source_port->enqueue_depth;
+
+ return dsw_event_enqueue_burst_generic(source_port, events,
+ events_len, false, 0, 0, 0);
}
uint16_t
dsw_event_enqueue_new_burst(void *port, const struct rte_event events[],
uint16_t events_len)
{
- return dsw_event_enqueue_burst_generic(port, events, events_len, true,
- events_len, 0, events_len);
+ struct dsw_port *source_port = port;
+
+ if (unlikely(events_len > source_port->enqueue_depth))
+ events_len = source_port->enqueue_depth;
+
+ return dsw_event_enqueue_burst_generic(source_port, events,
+ events_len, true, events_len,
+ 0, events_len);
}
uint16_t
dsw_event_enqueue_forward_burst(void *port, const struct rte_event events[],
uint16_t events_len)
{
- return dsw_event_enqueue_burst_generic(port, events, events_len, true,
- 0, 0, events_len);
+ struct dsw_port *source_port = port;
+
+ if (unlikely(events_len > source_port->enqueue_depth))
+ events_len = source_port->enqueue_depth;
+
+ return dsw_event_enqueue_burst_generic(source_port, events,
+ events_len, true, 0, 0,
+ events_len);
}
uint16_t
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.684414691 +0000
+++ 0017-event-dsw-avoid-credit-leak-on-oversized-enqueue-bur.patch 2020-02-11 11:17:38.315999776 +0000
@@ -1,4 +1,4 @@
-From 0c4155c7b5b51a60f676c1d7279bfcd1b14acd38 Mon Sep 17 00:00:00 2001
+From 93757d0880c31bd6e7a98301799aba13f331b81e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Tue, 14 Jan 2020 19:03:38 +0100
Subject: [PATCH] event/dsw: avoid credit leak on oversized enqueue bursts
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 0c4155c7b5b51a60f676c1d7279bfcd1b14acd38 ]
+
If an application issues rte_event_enqueue_new_burst() or
rte_event_enqueue_forward_burst() call with a burst of events longer
than the configured max enqueue burst size, DSW allocates credits not
@@ -20,7 +22,6 @@
This patch makes DSW gracefully handle oversized enqueue bursts.
Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
-Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-event: fix ethdev RSS setup' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (15 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix unintended vdev creation' " luca.boccassi
` (171 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Satananda Burla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f322f7e0e3e6f5f8c8e7d605390876d48c762cc1 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 14 Jan 2020 11:22:23 +0530
Subject: [PATCH] examples/l2fwd-event: fix ethdev RSS setup
[ upstream commit f09d45db53db267f82bb445572f674a8bfab4bd1 ]
Setup RSS configuration based on underlying device capabilities.
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Signed-off-by: Satananda Burla <sburla@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 181301fe6b..ab341e55b2 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -50,6 +50,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
if (ret != 0)
rte_panic("Error during getting device (port %u) info: %s\n",
port_id, strerror(-ret));
+ local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
+ dev_info.flow_type_rss_offloads;
+ if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
+ port_conf.rx_adv_conf.rss_conf.rss_hf) {
+ printf("Port %u modified RSS hash function based on hardware support,"
+ "requested:%#"PRIx64" configured:%#"PRIx64"",
+ port_id,
+ port_conf.rx_adv_conf.rss_conf.rss_hf,
+ local_port_conf.rx_adv_conf.rss_conf.rss_hf);
+ }
+
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
local_port_conf.txmode.offloads |=
DEV_TX_OFFLOAD_MBUF_FAST_FREE;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.735324992 +0000
+++ 0018-examples-l2fwd-event-fix-ethdev-RSS-setup.patch 2020-02-11 11:17:38.315999776 +0000
@@ -1,12 +1,13 @@
-From f09d45db53db267f82bb445572f674a8bfab4bd1 Mon Sep 17 00:00:00 2001
+From f322f7e0e3e6f5f8c8e7d605390876d48c762cc1 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 14 Jan 2020 11:22:23 +0530
Subject: [PATCH] examples/l2fwd-event: fix ethdev RSS setup
+[ upstream commit f09d45db53db267f82bb445572f674a8bfab4bd1 ]
+
Setup RSS configuration based on underlying device capabilities.
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
-Cc: stable@dpdk.org
Signed-off-by: Satananda Burla <sburla@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/event: fix unintended vdev creation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (16 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix ethdev RSS setup' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix OCTEON TX2 event device name' " luca.boccassi
` (170 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 20c4cd911814c361895d6eadf274cf5cceea12f8 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:12:41 +0530
Subject: [PATCH] test/event: fix unintended vdev creation
[ upstream commit 2155b9ca1a0d4aaf25d51f63034bc9357f66b96a ]
Virtual eventdevice should only be created when there is no existing
device with the same name.
Fixes: e0f4a0ed4237 ("test: skip tests when missing requirements")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
app/test/test_eventdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 427dbbf77f..56155838d8 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -996,9 +996,13 @@ test_eventdev_common(void)
static int
test_eventdev_selftest_impl(const char *pmd, const char *opts)
{
- rte_vdev_init(pmd, opts);
+ int ret = 0;
+
if (rte_event_dev_get_dev_id(pmd) == -ENODEV)
+ ret = rte_vdev_init(pmd, opts);
+ if (ret)
return TEST_SKIPPED;
+
return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd));
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.785737480 +0000
+++ 0019-test-event-fix-unintended-vdev-creation.patch 2020-02-11 11:17:38.315999776 +0000
@@ -1,13 +1,14 @@
-From 2155b9ca1a0d4aaf25d51f63034bc9357f66b96a Mon Sep 17 00:00:00 2001
+From 20c4cd911814c361895d6eadf274cf5cceea12f8 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:12:41 +0530
Subject: [PATCH] test/event: fix unintended vdev creation
+[ upstream commit 2155b9ca1a0d4aaf25d51f63034bc9357f66b96a ]
+
Virtual eventdevice should only be created when there is no existing
device with the same name.
Fixes: e0f4a0ed4237 ("test: skip tests when missing requirements")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/event: fix OCTEON TX2 event device name' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (17 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix unintended vdev creation' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/octeontx2: fix device name in device info' " luca.boccassi
` (169 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5b6ae8d175ebb902ffe9fe212df8b6358b8419e2 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:12:42 +0530
Subject: [PATCH] test/event: fix OCTEON TX2 event device name
[ upstream commit e1a3ce20d80c2d8cc01b47c4657626ea78b8930e ]
Fix octeontx2 event device name used in eventdevice test.
Fixes: 62561532ac4c ("event/octeontx2: add SSO selftest")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
app/test/test_eventdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 56155838d8..43ccb1ce97 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -1021,7 +1021,7 @@ test_eventdev_selftest_octeontx(void)
static int
test_eventdev_selftest_octeontx2(void)
{
- return test_eventdev_selftest_impl("otx2_eventdev", "");
+ return test_eventdev_selftest_impl("event_octeontx2", "");
}
static int
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.837306787 +0000
+++ 0020-test-event-fix-OCTEON-TX2-event-device-name.patch 2020-02-11 11:17:38.315999776 +0000
@@ -1,12 +1,13 @@
-From e1a3ce20d80c2d8cc01b47c4657626ea78b8930e Mon Sep 17 00:00:00 2001
+From 5b6ae8d175ebb902ffe9fe212df8b6358b8419e2 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:12:42 +0530
Subject: [PATCH] test/event: fix OCTEON TX2 event device name
+[ upstream commit e1a3ce20d80c2d8cc01b47c4657626ea78b8930e ]
+
Fix octeontx2 event device name used in eventdevice test.
Fixes: 62561532ac4c ("event/octeontx2: add SSO selftest")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'event/octeontx2: fix device name in device info' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (18 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix OCTEON TX2 event device name' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " luca.boccassi
` (168 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d064fc11dfd38ad5001198ed718d9808ae9aa3b3 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:13:18 +0530
Subject: [PATCH] event/octeontx2: fix device name in device info
[ upstream commit 28057842661a61ac8aa76c7231a1a7a0409ec86e ]
Fix imcorrect device name being used in device info.
Fixes: bebc3dbcf4a6 ("event/octeontx2: add device capabilities function")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/octeontx2/otx2_evdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h
index 231a12a52b..ef523dc9da 100644
--- a/drivers/event/octeontx2/otx2_evdev.h
+++ b/drivers/event/octeontx2/otx2_evdev.h
@@ -16,7 +16,7 @@
#include "otx2_mempool.h"
#include "otx2_tim_evdev.h"
-#define EVENTDEV_NAME_OCTEONTX2_PMD otx2_eventdev
+#define EVENTDEV_NAME_OCTEONTX2_PMD event_octeontx2
#define sso_func_trace otx2_sso_dbg
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.888506804 +0000
+++ 0021-event-octeontx2-fix-device-name-in-device-info.patch 2020-02-11 11:17:38.315999776 +0000
@@ -1,12 +1,13 @@
-From 28057842661a61ac8aa76c7231a1a7a0409ec86e Mon Sep 17 00:00:00 2001
+From d064fc11dfd38ad5001198ed718d9808ae9aa3b3 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 6 Jan 2020 13:13:18 +0530
Subject: [PATCH] event/octeontx2: fix device name in device info
+[ upstream commit 28057842661a61ac8aa76c7231a1a7a0409ec86e ]
+
Fix imcorrect device name being used in device info.
Fixes: bebc3dbcf4a6 ("event/octeontx2: add device capabilities function")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (19 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'event/octeontx2: fix device name in device info' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/crypto: fix missing operation status check' " luca.boccassi
` (167 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Gavin Hu; +Cc: Phil Yang, Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 0977647e008c421bc5ce409aca4ea3a8007ed484 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Thu, 7 Nov 2019 22:35:24 +0100
Subject: [PATCH] bus/fslmc: remove conflicting memory barrier macro
[ upstream commit 24ffb8c58963c86be5a53ce61896934a96a83234 ]
There are two definitions conflicting each other, for more
details, refer to [1].
include/rte_atomic_64.h:19: error: "dmb" redefined [-Werror]
drivers/bus/fslmc/mc/fsl_mc_sys.h:36: note: this is the location of the
previous definition
#define dmb() {__asm__ __volatile__("" : : : "memory"); }
The fix is to reuse the EAL definition to avoid conflicts.
[1] http://inbox.dpdk.org/users/VI1PR08MB537631AB25F41B8880DCCA988FDF0@
VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u
Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/fslmc/mc/fsl_mc_sys.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/fslmc/mc/fsl_mc_sys.h b/drivers/bus/fslmc/mc/fsl_mc_sys.h
index d0c7b39f8d..a310c5697e 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_sys.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_sys.h
@@ -32,11 +32,10 @@ struct fsl_mc_io {
#include <sys/uio.h>
#include <linux/byteorder/little_endian.h>
-#ifndef dmb
-#define dmb() {__asm__ __volatile__("" : : : "memory"); }
-#endif
-#define __iormb() dmb()
-#define __iowmb() dmb()
+#include <rte_atomic.h>
+
+#define __iormb() rte_io_rmb()
+#define __iowmb() rte_io_wmb()
#define __arch_getq(a) (*(volatile uint64_t *)(a))
#define __arch_putq(v, a) (*(volatile uint64_t *)(a) = (v))
#define __arch_putq32(v, a) (*(volatile uint32_t *)(a) = (v))
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.937369842 +0000
+++ 0022-bus-fslmc-remove-conflicting-memory-barrier-macro.patch 2020-02-11 11:17:38.319999851 +0000
@@ -1,8 +1,10 @@
-From 24ffb8c58963c86be5a53ce61896934a96a83234 Mon Sep 17 00:00:00 2001
+From 0977647e008c421bc5ce409aca4ea3a8007ed484 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Thu, 7 Nov 2019 22:35:24 +0100
Subject: [PATCH] bus/fslmc: remove conflicting memory barrier macro
+[ upstream commit 24ffb8c58963c86be5a53ce61896934a96a83234 ]
+
There are two definitions conflicting each other, for more
details, refer to [1].
@@ -17,7 +19,6 @@
VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u
Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
-Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (20 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:37 ` Dybkowski, AdamX
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " luca.boccassi
` (166 subsequent siblings)
188 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Adam Dybkowski; +Cc: Fiona Trahe, Ankur Dwivedi, Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Fri, 20 Dec 2019 13:58:52 +0100
Subject: [PATCH] test/crypto: fix missing operation status check
[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
This patch adds checking of the symmetric crypto operation status
that was silently skipped before. It fixes the wireless algorithms
session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
data for the verification by PMD. Also fixed the missing aad padding
issue revealed after op status checking was introduced.
Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
---
app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------------
1 file changed, 52 insertions(+), 44 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 1b561456d7..79ced809de 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -143,7 +143,7 @@ static struct rte_crypto_op *
process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
{
if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
- printf("Error sending packet for encryption");
+ RTE_LOG(ERR, USER1, "Error sending packet for encryption\n");
return NULL;
}
@@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op)
while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
rte_pause();
+ if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
+ RTE_LOG(DEBUG, USER1, "Operation status %d\n", op->status);
+ return NULL;
+ }
+
return op;
}
@@ -2823,9 +2828,18 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
ut_params->sess = rte_cryptodev_sym_session_create(
ts_params->session_mpool);
- status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
- &ut_params->auth_xform,
- ts_params->session_priv_mpool);
+ if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
+ ut_params->auth_xform.next = NULL;
+ ut_params->cipher_xform.next = &ut_params->auth_xform;
+ status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+ &ut_params->cipher_xform,
+ ts_params->session_priv_mpool);
+
+ } else
+ status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
+ &ut_params->auth_xform,
+ ts_params->session_priv_mpool);
+
TEST_ASSERT_EQUAL(status, 0, "session init failed");
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
@@ -3018,13 +3032,14 @@ create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
}
static int
-create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
+create_wireless_algo_auth_cipher_operation(
+ const uint8_t *auth_tag, unsigned int auth_tag_len,
const uint8_t *cipher_iv, uint8_t cipher_iv_len,
const uint8_t *auth_iv, uint8_t auth_iv_len,
unsigned int data_pad_len,
unsigned int cipher_len, unsigned int cipher_offset,
unsigned int auth_len, unsigned int auth_offset,
- uint8_t op_mode, uint8_t do_sgl)
+ uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
struct crypto_unittest_params *ut_params = &unittest_params;
@@ -3081,6 +3096,10 @@ create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
}
}
+ /* Copy digest for the verification */
+ if (verify)
+ memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
+
/* Copy cipher and auth IVs at the end of the crypto operation */
uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
ut_params->op, uint8_t *, IV_OFFSET);
@@ -4643,7 +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
(tdata->digest.offset_bytes == 0 ?
@@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
tdata->cipher.offset_bits,
tdata->validAuthLenInBits.len,
tdata->auth.offset_bits,
- op_mode, 0);
+ op_mode, 0, verify);
if (retval < 0)
return retval;
@@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
(tdata->digest.offset_bytes == 0 ?
@@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,
tdata->cipher.offset_bits,
tdata->validAuthLenInBits.len,
tdata->auth.offset_bits,
- op_mode, 1);
+ op_mode, 1, verify);
if (retval < 0)
return retval;
@@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
NULL, 0,
(tdata->digest.offset_bytes == 0 ?
@@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata,
tdata->validCipherOffsetInBits.len,
tdata->validAuthLenInBits.len,
0,
- op_mode, 0);
+ op_mode, 0, verify);
if (retval < 0)
return retval;
@@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata,
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
NULL, 0,
(tdata->digest.offset_bytes == 0 ?
@@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata,
tdata->validCipherOffsetInBits.len,
tdata->validAuthLenInBits.len,
0,
- op_mode, 1);
+ op_mode, 1, verify);
if (retval < 0)
return retval;
@@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
/* Create ZUC operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
(tdata->digest.offset_bytes == 0 ?
@@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,
tdata->validCipherOffsetInBits.len,
tdata->validAuthLenInBits.len,
0,
- op_mode, 0);
+ op_mode, 0, verify);
if (retval < 0)
return retval;
@@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
/* Create ZUC operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest.len,
+ tdata->digest.data, tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
NULL, 0,
(tdata->digest.offset_bytes == 0 ?
@@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
tdata->validCipherOffsetInBits.len,
tdata->validAuthLenInBits.len,
0,
- op_mode, 1);
+ op_mode, 1, verify);
if (retval < 0)
return retval;
@@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
/* Create the operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest_enc.len,
+ tdata->digest_enc.data, tdata->digest_enc.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
(tdata->digest_enc.offset == 0 ?
@@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,
tdata->cipher.offset_bits,
tdata->validAuthLen.len_bits,
tdata->auth.offset_bits,
- op_mode, 0);
+ op_mode, 0, verify);
if (retval < 0)
return retval;
@@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
/* Create the operation */
retval = create_wireless_algo_auth_cipher_operation(
- tdata->digest_enc.len,
+ tdata->digest_enc.data, tdata->digest_enc.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
tdata->auth_iv.data, tdata->auth_iv.len,
(tdata->digest_enc.offset == 0 ?
@@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
tdata->cipher.offset_bits,
tdata->validAuthLen.len_bits,
tdata->auth.offset_bits,
- op_mode, 1);
+ op_mode, 1, verify);
if (retval < 0)
return retval;
@@ -10818,13 +10837,8 @@ test_authentication_verify_fail_when_data_corruption(
ut_params->op = process_crypto_request(ts_params->valid_devs[0],
ut_params->op);
- TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
- TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
- RTE_CRYPTO_OP_STATUS_SUCCESS,
- "authentication not failed");
- ut_params->obuf = ut_params->op->sym->m_src;
- TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve obuf");
+ TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
return 0;
}
@@ -10879,13 +10893,8 @@ test_authentication_verify_GMAC_fail_when_corruption(
ut_params->op = process_crypto_request(ts_params->valid_devs[0],
ut_params->op);
- TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
- TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
- RTE_CRYPTO_OP_STATUS_SUCCESS,
- "authentication not failed");
- ut_params->obuf = ut_params->op->sym->m_src;
- TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve obuf");
+ TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
return 0;
}
@@ -10940,13 +10949,7 @@ test_authenticated_decryption_fail_when_corruption(
ut_params->op = process_crypto_request(ts_params->valid_devs[0],
ut_params->op);
- TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
- TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
- RTE_CRYPTO_OP_STATUS_SUCCESS,
- "authentication not failed");
-
- ut_params->obuf = ut_params->op->sym->m_src;
- TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve obuf");
+ TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
return 0;
}
@@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum rte_crypto_aead_operation op,
const unsigned int auth_tag_len = tdata->auth_tag.len;
const unsigned int iv_len = tdata->iv.len;
unsigned int aad_len = tdata->aad.len;
+ unsigned int aad_len_pad = 0;
/* Generate Crypto op data structure */
ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
@@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum rte_crypto_aead_operation op,
rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
+ aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
+
sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
- ut_params->ibuf, aad_len);
+ ut_params->ibuf, aad_len_pad);
TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
"no room to prepend aad");
sym_op->aead.aad.phys_addr = rte_pktmbuf_iova(
@@ -11219,7 +11225,7 @@ create_aead_operation_SGL(enum rte_crypto_aead_operation op,
}
sym_op->aead.data.length = tdata->plaintext.len;
- sym_op->aead.data.offset = aad_len;
+ sym_op->aead.data.offset = aad_len_pad;
return 0;
}
@@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
int ecx = 0;
void *digest_mem = NULL;
- uint32_t prepend_len = tdata->aad.len;
+ uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
if (tdata->plaintext.len % fragsz != 0) {
if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO)
@@ -11915,6 +11921,8 @@ static struct unit_test_suite cryptodev_qat_testsuite = {
test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GCM_authenticated_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:39.986002596 +0000
+++ 0023-test-crypto-fix-missing-operation-status-check.patch 2020-02-11 11:17:38.332000075 +0000
@@ -1,8 +1,10 @@
-From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17 00:00:00 2001
+From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Fri, 20 Dec 2019 13:58:52 +0100
Subject: [PATCH] test/crypto: fix missing operation status check
+[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
+
This patch adds checking of the symmetric crypto operation status
that was silently skipped before. It fixes the wireless algorithms
session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
@@ -11,7 +13,6 @@
Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
-Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (21 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'test/crypto: fix missing operation status check' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " luca.boccassi
` (165 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Savinay Dharmappa; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 0846e8aa74cb2eb6040f821821f309f1de930726 Mon Sep 17 00:00:00 2001
From: Savinay Dharmappa <savinay.dharmappa@intel.com>
Date: Fri, 13 Dec 2019 11:49:55 +0000
Subject: [PATCH] examples/ipsec-secgw: fix crash on unsupported algo
[ upstream commit 71d9e6fb2a0d8709e97384b30d81b3bff35da16f ]
If algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
examples/ipsec-secgw/sa.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7f046e3ed7..c75a5a15f5 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
@@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.037537315 +0000
+++ 0024-examples-ipsec-secgw-fix-crash-on-unsupported-algo.patch 2020-02-11 11:17:38.332000075 +0000
@@ -1,14 +1,15 @@
-From 71d9e6fb2a0d8709e97384b30d81b3bff35da16f Mon Sep 17 00:00:00 2001
+From 0846e8aa74cb2eb6040f821821f309f1de930726 Mon Sep 17 00:00:00 2001
From: Savinay Dharmappa <savinay.dharmappa@intel.com>
Date: Fri, 13 Dec 2019 11:49:55 +0000
Subject: [PATCH] examples/ipsec-secgw: fix crash on unsupported algo
+[ upstream commit 71d9e6fb2a0d8709e97384b30d81b3bff35da16f ]
+
If algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
-Cc: stable@dpdk.org
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (22 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " luca.boccassi
` (164 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Ciara Power; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 64e14ce91ca077ba5696c1c79eac9523b1593d8e Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 4 Dec 2019 16:38:15 +0000
Subject: [PATCH] app/testpmd: fix device mcast list error handling
[ upstream commit c11562a1215aaff6651f9c59ef91ad0a53292571 ]
The multicast set list function now has a return value, which is checked
by the calling functions. A rollback occurs on detection of failure, to
realign local config with the device config.
The error print statement in the function had included the port_id and
mc_addr_nb values in the wrong order, these are now swapped.
Fixes: 8fff667578a7 ("app/testpmd: new command to add/remove multicast MAC addresses")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/config.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d599682788..8c86217796 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3707,6 +3707,14 @@ mcast_addr_pool_extend(struct rte_port *port)
}
+static void
+mcast_addr_pool_append(struct rte_port *port, struct rte_ether_addr *mc_addr)
+{
+ if (mcast_addr_pool_extend(port) != 0)
+ return;
+ rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[port->mc_addr_nb - 1]);
+}
+
static void
mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
{
@@ -3725,7 +3733,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
sizeof(struct rte_ether_addr) * (port->mc_addr_nb - addr_idx));
}
-static void
+static int
eth_port_multicast_addr_list_set(portid_t port_id)
{
struct rte_port *port;
@@ -3734,10 +3742,11 @@ eth_port_multicast_addr_list_set(portid_t port_id)
port = &ports[port_id];
diag = rte_eth_dev_set_mc_addr_list(port_id, port->mc_addr_pool,
port->mc_addr_nb);
- if (diag == 0)
- return;
- printf("rte_eth_dev_set_mc_addr_list(port=%d, nb=%u) failed. diag=%d\n",
- port->mc_addr_nb, port_id, -diag);
+ if (diag < 0)
+ printf("rte_eth_dev_set_mc_addr_list(port=%d, nb=%u) failed. diag=%d\n",
+ port_id, port->mc_addr_nb, diag);
+
+ return diag;
}
void
@@ -3762,10 +3771,10 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
}
}
- if (mcast_addr_pool_extend(port) != 0)
- return;
- rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
- eth_port_multicast_addr_list_set(port_id);
+ mcast_addr_pool_append(port, mc_addr);
+ if (eth_port_multicast_addr_list_set(port_id) < 0)
+ /* Rollback on failure, remove the address from the pool */
+ mcast_addr_pool_remove(port, i);
}
void
@@ -3792,7 +3801,9 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)
}
mcast_addr_pool_remove(port, i);
- eth_port_multicast_addr_list_set(port_id);
+ if (eth_port_multicast_addr_list_set(port_id) < 0)
+ /* Rollback on failure, add the address back into the pool */
+ mcast_addr_pool_append(port, mc_addr);
}
void
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.064230402 +0000
+++ 0025-app-testpmd-fix-device-mcast-list-error-handling.patch 2020-02-11 11:17:38.336000150 +0000
@@ -1,8 +1,10 @@
-From c11562a1215aaff6651f9c59ef91ad0a53292571 Mon Sep 17 00:00:00 2001
+From 64e14ce91ca077ba5696c1c79eac9523b1593d8e Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 4 Dec 2019 16:38:15 +0000
Subject: [PATCH] app/testpmd: fix device mcast list error handling
+[ upstream commit c11562a1215aaff6651f9c59ef91ad0a53292571 ]
+
The multicast set list function now has a return value, which is checked
by the calling functions. A rollback occurs on detection of failure, to
realign local config with the device config.
@@ -11,7 +13,6 @@
mc_addr_nb values in the wrong order, these are now swapped.
Fixes: 8fff667578a7 ("app/testpmd: new command to add/remove multicast MAC addresses")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,7 +21,7 @@
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 4e1c3cab59..9da1ffb034 100644
+index d599682788..8c86217796 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3707,6 +3707,14 @@ mcast_addr_pool_extend(struct rte_port *port)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (23 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: disable TSO offload in vector path' " luca.boccassi
` (163 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Lu Qiuwen; +Cc: Xiao Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e3de8f72c002b5d74a1abaa321728cec1c94b33b Mon Sep 17 00:00:00 2001
From: Lu Qiuwen <luqiuwen@iie.ac.cn>
Date: Thu, 5 Dec 2019 21:30:08 +0800
Subject: [PATCH] net/fm10k: fix descriptor VLAN field filling in Tx
[ upstream commit 6aab203435040461f585fe9423e3dbdc0729c9fc ]
The VLAN field in the descriptor is not filled when ol_flags has
no VLAN flag. When the caller sends some packets with VLAN tags,
but other packets do not have VLAN tags, the behavior of the program
cannot be determined.
Fixes: 4b61d3bfa941 ("fm10k: add receive and tranmit")
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/fm10k/fm10k_rxtx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 5c31121839..4accaa2cd6 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -611,6 +611,8 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
/* set vlan if requested */
if (mb->ol_flags & PKT_TX_VLAN_PKT)
q->hw_ring[q->next_free].vlan = mb->vlan_tci;
+ else
+ q->hw_ring[q->next_free].vlan = 0;
q->sw_ring[q->next_free] = mb;
q->hw_ring[q->next_free].buffer_addr =
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.094072389 +0000
+++ 0026-net-fm10k-fix-descriptor-VLAN-field-filling-in-Tx.patch 2020-02-11 11:17:38.336000150 +0000
@@ -1,15 +1,16 @@
-From 6aab203435040461f585fe9423e3dbdc0729c9fc Mon Sep 17 00:00:00 2001
+From e3de8f72c002b5d74a1abaa321728cec1c94b33b Mon Sep 17 00:00:00 2001
From: Lu Qiuwen <luqiuwen@iie.ac.cn>
Date: Thu, 5 Dec 2019 21:30:08 +0800
Subject: [PATCH] net/fm10k: fix descriptor VLAN field filling in Tx
+[ upstream commit 6aab203435040461f585fe9423e3dbdc0729c9fc ]
+
The VLAN field in the descriptor is not filled when ol_flags has
no VLAN flag. When the caller sends some packets with VLAN tags,
but other packets do not have VLAN tags, the behavior of the program
cannot be determined.
Fixes: 4b61d3bfa941 ("fm10k: add receive and tranmit")
-Cc: stable@dpdk.org
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: disable TSO offload in vector path' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (24 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: fix RSS offload flag' " luca.boccassi
` (162 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Tao Zhu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e4773327cc2378bc0bb29d206c5aedf21f3f57f3 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Tue, 3 Dec 2019 23:28:52 +0800
Subject: [PATCH] net/ice: disable TSO offload in vector path
[ upstream commit a2248320880022e827142c21ebe6f4f7a2a24bfb ]
ICE choices VECTOR TX path or Basic TX path by macro
ICE_NO_VECTOR_FLAGS.
TSO offload only processed by Basic TX path.
Fixes: f88de4694d94 ("net/ice: support Tx SSE vector")
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx_vec_common.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 5e6f89642a..6b57ff2ae0 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -245,6 +245,7 @@ ice_rx_vec_queue_default(struct ice_rx_queue *rxq)
DEV_TX_OFFLOAD_VLAN_INSERT | \
DEV_TX_OFFLOAD_SCTP_CKSUM | \
DEV_TX_OFFLOAD_UDP_CKSUM | \
+ DEV_TX_OFFLOAD_TCP_TSO | \
DEV_TX_OFFLOAD_TCP_CKSUM)
static inline int
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.121452364 +0000
+++ 0027-net-ice-disable-TSO-offload-in-vector-path.patch 2020-02-11 11:17:38.336000150 +0000
@@ -1,14 +1,15 @@
-From a2248320880022e827142c21ebe6f4f7a2a24bfb Mon Sep 17 00:00:00 2001
+From e4773327cc2378bc0bb29d206c5aedf21f3f57f3 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Tue, 3 Dec 2019 23:28:52 +0800
Subject: [PATCH] net/ice: disable TSO offload in vector path
+[ upstream commit a2248320880022e827142c21ebe6f4f7a2a24bfb ]
+
ICE choices VECTOR TX path or Basic TX path by macro
ICE_NO_VECTOR_FLAGS.
TSO offload only processed by Basic TX path.
Fixes: f88de4694d94 ("net/ice: support Tx SSE vector")
-Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/netvsc: fix RSS offload flag' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (25 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: disable TSO offload in vector path' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: disable before changing RSS parameters' " luca.boccassi
` (161 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b00e1dc20ba8d3ca16a52175f60445fced63bbda Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 6 Dec 2019 15:52:47 -0800
Subject: [PATCH] net/netvsc: fix RSS offload flag
[ upstream commit b1cf08ae095026ec9befe2aeddf4ecd1785a37a6 ]
The change to add OFFLOAD_RSS_HASH broke use of netvsc PMD
with testpmd. The netvsc driver fails during configure step:
Configuring Port 1 (socket 0)
hn_dev_configure(): unsupported RX offload: 0x80000
Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/netvsc/hn_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 164e9ad174..5ef7a452cc 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -42,7 +42,8 @@
DEV_TX_OFFLOAD_VLAN_INSERT)
#define HN_RX_OFFLOAD_CAPS (DEV_RX_OFFLOAD_CHECKSUM | \
- DEV_RX_OFFLOAD_VLAN_STRIP)
+ DEV_RX_OFFLOAD_VLAN_STRIP | \
+ DEV_RX_OFFLOAD_RSS_HASH)
int hn_logtype_init;
int hn_logtype_driver;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.148805586 +0000
+++ 0028-net-netvsc-fix-RSS-offload-flag.patch 2020-02-11 11:17:38.340000225 +0000
@@ -1,8 +1,10 @@
-From b1cf08ae095026ec9befe2aeddf4ecd1785a37a6 Mon Sep 17 00:00:00 2001
+From b00e1dc20ba8d3ca16a52175f60445fced63bbda Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 6 Dec 2019 15:52:47 -0800
Subject: [PATCH] net/netvsc: fix RSS offload flag
+[ upstream commit b1cf08ae095026ec9befe2aeddf4ecd1785a37a6 ]
+
The change to add OFFLOAD_RSS_HASH broke use of netvsc PMD
with testpmd. The netvsc driver fails during configure step:
@@ -10,7 +12,6 @@
hn_dev_configure(): unsupported RX offload: 0x80000
Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/netvsc: disable before changing RSS parameters' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (26 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: fix RSS offload flag' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix packet type table' " luca.boccassi
` (160 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Donald Lee, Dexuan Cui, Abhishek Marathe, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 99682e1dc776a2c7ccb6965a4d6987bc5c75f8de Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 6 Dec 2019 15:52:48 -0800
Subject: [PATCH] net/netvsc: disable before changing RSS parameters
[ upstream commit b604e806327cd4945cc560722cf4c0b3518f0bc6 ]
In order to change RSS parameters, the host requires that RSS
is disable first.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
Signed-off-by: Donald Lee <donald_lee@trendmicro.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Dexuan Cui <decui@microsoft.com>
Tested-by: Abhishek Marathe <abmarath@microsoft.com>
---
drivers/net/netvsc/hn_ethdev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 5ef7a452cc..159116f7f6 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -292,6 +292,13 @@ static int hn_rss_reta_update(struct rte_eth_dev *dev,
hv->rss_ind[i] = reta_conf[idx].reta[shift];
}
+ err = hn_rndis_conf_rss(hv, NDIS_RSS_FLAG_DISABLE);
+ if (err) {
+ PMD_DRV_LOG(NOTICE,
+ "rss disable failed");
+ return err;
+ }
+
err = hn_rndis_conf_rss(hv, 0);
if (err) {
PMD_DRV_LOG(NOTICE,
@@ -579,6 +586,13 @@ static int hn_dev_configure(struct rte_eth_dev *dev)
return err;
}
+ err = hn_rndis_conf_rss(hv, NDIS_RSS_FLAG_DISABLE);
+ if (err) {
+ PMD_DRV_LOG(NOTICE,
+ "rss disable failed");
+ return err;
+ }
+
err = hn_rndis_conf_rss(hv, 0);
if (err) {
PMD_DRV_LOG(NOTICE,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.177141149 +0000
+++ 0029-net-netvsc-disable-before-changing-RSS-parameters.patch 2020-02-11 11:17:38.340000225 +0000
@@ -1,13 +1,14 @@
-From b604e806327cd4945cc560722cf4c0b3518f0bc6 Mon Sep 17 00:00:00 2001
+From 99682e1dc776a2c7ccb6965a4d6987bc5c75f8de Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 6 Dec 2019 15:52:48 -0800
Subject: [PATCH] net/netvsc: disable before changing RSS parameters
+[ upstream commit b604e806327cd4945cc560722cf4c0b3518f0bc6 ]
+
In order to change RSS parameters, the host requires that RSS
is disable first.
Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
-Cc: stable@dpdk.org
Signed-off-by: Donald Lee <donald_lee@trendmicro.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix packet type table' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (27 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: disable before changing RSS parameters' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix meson build' " luca.boccassi
` (159 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Shougang Wang; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2a5e5d83575b9a9376c7767e742e18fe1f526a03 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 10 Dec 2019 01:33:21 +0000
Subject: [PATCH] net/ice: fix packet type table
[ upstream commit f27efe4eaf1878f8d04e2def5259ae0100b16711 ]
According to comms package, index 94 should be MAC_IPV6_ICMP,
not MAC_IPV4_ICMP. This patch fixes the issue.
Fixes: 4cf29798b4c9 ("net/ice: fix packet type table")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/ice_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 2db1744562..b4f5367c5a 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -3268,7 +3268,7 @@ ice_get_default_pkt_type(uint16_t ptype)
RTE_PTYPE_L4_TCP,
[93] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_L4_SCTP,
- [94] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+ [94] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_L4_ICMP,
/* IPv6 --> IPv4 */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.205019284 +0000
+++ 0030-net-ice-fix-packet-type-table.patch 2020-02-11 11:17:38.340000225 +0000
@@ -1,13 +1,14 @@
-From f27efe4eaf1878f8d04e2def5259ae0100b16711 Mon Sep 17 00:00:00 2001
+From 2a5e5d83575b9a9376c7767e742e18fe1f526a03 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 10 Dec 2019 01:33:21 +0000
Subject: [PATCH] net/ice: fix packet type table
+[ upstream commit f27efe4eaf1878f8d04e2def5259ae0100b16711 ]
+
According to comms package, index 94 should be MAC_IPV6_ICMP,
not MAC_IPV4_ICMP. This patch fixes the issue.
Fixes: 4cf29798b4c9 ("net/ice: fix packet type table")
-Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ipn3ke: fix meson build' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (28 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix packet type table' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 13:11 ` Xu, Rosen
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " luca.boccassi
` (158 subsequent siblings)
188 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ea1e97addf528d6749741e8eaf60ee3fec9cbc74 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 12 Dec 2019 17:28:43 +0000
Subject: [PATCH] net/ipn3ke: fix meson build
[ upstream commit 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 ]
The ipn3ke driver and the ifpga driver had circular dependencies on each
other, meaning that neither could be built with meson. Fix this by:
* setting the build order of net and raw to match that in makefiles
* removing the dependency from the net driver on the rawdev one
* fixing the dependency names in the rawdev driver meson.build file
Fixes: 8418c92811b4 ("net/ipn3ke: remove configuration for i40e port bonding")
Fixes: e1defba4cf66 ("raw/ifpga/base: support device tree")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/meson.build | 4 ++--
drivers/net/ipn3ke/meson.build | 4 +++-
drivers/raw/ifpga/meson.build | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index 72eec46088..32d68aa1d0 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -9,8 +9,8 @@ endif
dpdk_driver_classes = ['common',
'bus',
'mempool', # depends on common and bus.
- 'raw', # depends on common and bus.
- 'net', # depends on common, bus, mempool and raw.
+ 'net', # depends on common, bus, mempool
+ 'raw', # depends on common, bus and net.
'crypto', # depends on common, bus and mempool (net in future).
'compress', # depends on common, bus, mempool.
'event', # depends on common, bus, mempool and net.
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index e3c8a6768c..bfec592aba 100644
--- a/drivers/net/ipn3ke/meson.build
+++ b/drivers/net/ipn3ke/meson.build
@@ -21,9 +21,11 @@ endif
if build
allow_experimental_apis = true
+ includes += include_directories('../../raw/ifpga')
+
sources += files('ipn3ke_ethdev.c',
'ipn3ke_representor.c',
'ipn3ke_tm.c',
'ipn3ke_flow.c')
- deps += ['bus_ifpga', 'sched', 'pmd_i40e', 'rawdev', 'rawdev_ifpga']
+ deps += ['bus_ifpga', 'ethdev', 'sched']
endif
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index 206136ff48..d4027068d6 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -15,7 +15,7 @@ if build
objs = [base_objs]
deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs',
- 'bus_vdev', 'bus_ifpga', 'net', 'i40e', 'ipn3ke']
+ 'bus_vdev', 'bus_ifpga', 'net', 'pmd_i40e', 'pmd_ipn3ke']
ext_deps += dep
sources = files('ifpga_rawdev.c')
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.234853543 +0000
+++ 0031-net-ipn3ke-fix-meson-build.patch 2020-02-11 11:17:38.344000300 +0000
@@ -1,8 +1,10 @@
-From 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 Mon Sep 17 00:00:00 2001
+From ea1e97addf528d6749741e8eaf60ee3fec9cbc74 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 12 Dec 2019 17:28:43 +0000
Subject: [PATCH] net/ipn3ke: fix meson build
+[ upstream commit 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 ]
+
The ipn3ke driver and the ifpga driver had circular dependencies on each
other, meaning that neither could be built with meson. Fix this by:
@@ -12,7 +14,6 @@
Fixes: 8418c92811b4 ("net/ipn3ke: remove configuration for i40e port bonding")
Fixes: e1defba4cf66 ("raw/ifpga/base: support device tree")
-Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
@@ -23,7 +24,7 @@
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
-index 3f8749d0b7..29708cc2bb 100644
+index 72eec46088..32d68aa1d0 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -9,8 +9,8 @@ endif
@@ -36,7 +37,7 @@
+ 'raw', # depends on common, bus and net.
'crypto', # depends on common, bus and mempool (net in future).
'compress', # depends on common, bus, mempool.
- 'vdpa', # depends on common, bus and mempool.
+ 'event', # depends on common, bus, mempool and net.
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index e3c8a6768c..bfec592aba 100644
--- a/drivers/net/ipn3ke/meson.build
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix Rx total stats' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (29 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix meson build' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix port close in FreeBSD' " luca.boccassi
` (157 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Jiaqi Min; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7169a84d1248725bbb70b24ec6074ad3a34c127b Mon Sep 17 00:00:00 2001
From: Jiaqi Min <jiaqix.min@intel.com>
Date: Fri, 13 Dec 2019 01:23:29 +0000
Subject: [PATCH] net/iavf: fix Rx total stats
[ upstream commit e71ffcc1008eeb67d585174dfb10066e9e3df2f7 ]
Rx total stats is the total number of successfully received packets,
so exclude the number of rx_discards for Rx total stats.
Fixes: f4a41a6953af ("net/avf: support stats")
Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index a39ba1466c..f544303c05 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1068,7 +1068,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
if (ret == 0) {
iavf_update_stats(vsi, pstats);
stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
- pstats->rx_broadcast;
+ pstats->rx_broadcast - pstats->rx_discards;
stats->opackets = pstats->tx_broadcast + pstats->tx_multicast +
pstats->tx_unicast;
stats->imissed = pstats->rx_discards;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.262020426 +0000
+++ 0032-net-iavf-fix-Rx-total-stats.patch 2020-02-11 11:17:38.344000300 +0000
@@ -1,13 +1,14 @@
-From e71ffcc1008eeb67d585174dfb10066e9e3df2f7 Mon Sep 17 00:00:00 2001
+From 7169a84d1248725bbb70b24ec6074ad3a34c127b Mon Sep 17 00:00:00 2001
From: Jiaqi Min <jiaqix.min@intel.com>
Date: Fri, 13 Dec 2019 01:23:29 +0000
Subject: [PATCH] net/iavf: fix Rx total stats
+[ upstream commit e71ffcc1008eeb67d585174dfb10066e9e3df2f7 ]
+
Rx total stats is the total number of successfully received packets,
so exclude the number of rx_discards for Rx total stats.
Fixes: f4a41a6953af ("net/avf: support stats")
-Cc: stable@dpdk.org
Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix port close in FreeBSD' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (30 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " luca.boccassi
` (156 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Chenxu Di; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 96ffc75a08059f60790b68d0b652b872e48ffd53 Mon Sep 17 00:00:00 2001
From: Chenxu Di <chenxux.di@intel.com>
Date: Wed, 11 Dec 2019 09:06:03 +0000
Subject: [PATCH] net/i40e: fix port close in FreeBSD
[ upstream commit 1fa41f4518f9f30465a0ed32640e7dbce00b3f4f ]
FreeBSD OS doesn't support igb_uio interrupt, so it will fail when
unregister the interrupt callback in port close. We can fix the issue by
passing -ENOENT when check the return value of unregister interrupt
callback function.
Fixes: ac89d46096d5 ("net/i40e: release port upon close")
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5999c964bd..8b25003910 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2594,7 +2594,7 @@ i40e_dev_close(struct rte_eth_dev *dev)
do {
ret = rte_intr_callback_unregister(intr_handle,
i40e_dev_interrupt_handler, dev);
- if (ret >= 0) {
+ if (ret >= 0 || ret == -ENOENT) {
break;
} else if (ret != -EAGAIN) {
PMD_INIT_LOG(ERR,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.290011769 +0000
+++ 0033-net-i40e-fix-port-close-in-FreeBSD.patch 2020-02-11 11:17:38.356000524 +0000
@@ -1,15 +1,16 @@
-From 1fa41f4518f9f30465a0ed32640e7dbce00b3f4f Mon Sep 17 00:00:00 2001
+From 96ffc75a08059f60790b68d0b652b872e48ffd53 Mon Sep 17 00:00:00 2001
From: Chenxu Di <chenxux.di@intel.com>
Date: Wed, 11 Dec 2019 09:06:03 +0000
Subject: [PATCH] net/i40e: fix port close in FreeBSD
+[ upstream commit 1fa41f4518f9f30465a0ed32640e7dbce00b3f4f ]
+
FreeBSD OS doesn't support igb_uio interrupt, so it will fail when
unregister the interrupt callback in port close. We can fix the issue by
passing -ENOENT when check the return value of unregister interrupt
callback function.
Fixes: ac89d46096d5 ("net/i40e: release port upon close")
-Cc: stable@dpdk.org
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (31 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix port close in FreeBSD' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " luca.boccassi
` (155 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Tao Zhu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 974ef90d293644a8debcc08946ccaa194372e076 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Tue, 3 Dec 2019 23:28:25 +0800
Subject: [PATCH] net/iavf: add TSO offload use basic path
[ upstream commit b1b73eaee2f184799a02dbff4c48a6a04c19cf5b ]
IAVF choices VECTOR TX path or Basic TX path by macro
IAVF_NO_VECTOR_FLAGS. TSO offload only processed by Basic TX path.
Fixes: 605c6f9ca52f ("net/avf: convert to new Rx and Tx offload API")
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 225a0c4c42..60d02c521f 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -28,6 +28,7 @@
DEV_TX_OFFLOAD_VLAN_INSERT | \
DEV_TX_OFFLOAD_SCTP_CKSUM | \
DEV_TX_OFFLOAD_UDP_CKSUM | \
+ DEV_TX_OFFLOAD_TCP_TSO | \
DEV_TX_OFFLOAD_TCP_CKSUM)
#define DEFAULT_TX_RS_THRESH 32
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.329351356 +0000
+++ 0034-net-iavf-add-TSO-offload-use-basic-path.patch 2020-02-11 11:17:38.356000524 +0000
@@ -1,13 +1,14 @@
-From b1b73eaee2f184799a02dbff4c48a6a04c19cf5b Mon Sep 17 00:00:00 2001
+From 974ef90d293644a8debcc08946ccaa194372e076 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Tue, 3 Dec 2019 23:28:25 +0800
Subject: [PATCH] net/iavf: add TSO offload use basic path
+[ upstream commit b1b73eaee2f184799a02dbff4c48a6a04c19cf5b ]
+
IAVF choices VECTOR TX path or Basic TX path by macro
IAVF_NO_VECTOR_FLAGS. TSO offload only processed by Basic TX path.
Fixes: 605c6f9ca52f ("net/avf: convert to new Rx and Tx offload API")
-Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix link status' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (32 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " luca.boccassi
` (154 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Lunyuan Cui; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 631f00e9f143fe995e0359c3aa57ac70b8dae825 Mon Sep 17 00:00:00 2001
From: Lunyuan Cui <lunyuanx.cui@intel.com>
Date: Tue, 17 Dec 2019 06:12:03 +0000
Subject: [PATCH] net/ixgbe: fix link status
[ upstream commit ff8162cb9571528c006f265a32730a463fd0b886 ]
The link status for ixgbevf is not correct when PF link up.
IXGBE_ESDP register is only used when media type is fiber.
Fixes: 1ca05831b9be ("net/ixgbe: fix link status")
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c6fd0f131..a3f550c534 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4155,9 +4155,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
return rte_eth_linkstatus_set(dev, &link);
}
- esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
- if ((esdp_reg & IXGBE_ESDP_SDP3))
- link_up = 0;
+ if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+ esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
+ if ((esdp_reg & IXGBE_ESDP_SDP3))
+ link_up = 0;
+ }
if (link_up == 0) {
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.356151102 +0000
+++ 0035-net-ixgbe-fix-link-status.patch 2020-02-11 11:17:38.364000674 +0000
@@ -1,13 +1,14 @@
-From ff8162cb9571528c006f265a32730a463fd0b886 Mon Sep 17 00:00:00 2001
+From 631f00e9f143fe995e0359c3aa57ac70b8dae825 Mon Sep 17 00:00:00 2001
From: Lunyuan Cui <lunyuanx.cui@intel.com>
Date: Tue, 17 Dec 2019 06:12:03 +0000
Subject: [PATCH] net/ixgbe: fix link status
+[ upstream commit ff8162cb9571528c006f265a32730a463fd0b886 ]
+
The link status for ixgbevf is not correct when PF link up.
IXGBE_ESDP register is only used when media type is fiber.
Fixes: 1ca05831b9be ("net/ixgbe: fix link status")
-Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (33 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix crash when setting hairpin queues' " luca.boccassi
` (153 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Lunyuan Cui; +Cc: Xiaolong Ye, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From fa44fc9e922a653453e32a23c5371d38ba21ceff Mon Sep 17 00:00:00 2001
From: Lunyuan Cui <lunyuanx.cui@intel.com>
Date: Mon, 16 Dec 2019 02:24:18 +0000
Subject: [PATCH] net/ixgbe: fix link up in FreeBSD
[ upstream commit ba7b12dd64e4e08f52ce9dd62f7c52f6fc455e10 ]
In FreeBSD environment, nic_uio drivers do not support interrupts,
rte_intr_callback_register() will fail to register interrupts.
We cannot make link status to change from down to up by interrupt
callback. So we need to wait for the controller to acquire link
when ports start. Through multiple tests, 5s should be enough.
Fixes: b9bd0f09fa15 ("ethdev: fix link status query")
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 36 ++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a3f550c534..fba8c51595 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -378,6 +378,7 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
struct rte_eth_udp_tunnel *udp_tunnel);
static int ixgbe_filter_restore(struct rte_eth_dev *dev);
static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
+static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
/*
* Define VF Stats MACRO for Non "cleared on read" register
@@ -2801,6 +2802,11 @@ skip_link_setup:
"please call hierarchy_commit() "
"before starting the port");
+ /* wait for the controller to acquire link */
+ err = ixgbe_wait_for_link_up(hw);
+ if (err)
+ goto error;
+
/*
* Update link status right before return, because it may
* start link configuration process in a separate thread.
@@ -4114,6 +4120,36 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
}
+/*
+ * In freebsd environment, nic_uio drivers do not support interrupts,
+ * rte_intr_callback_register() will fail to register interrupts.
+ * We can not make link status to change from down to up by interrupt
+ * callback. So we need to wait for the controller to acquire link
+ * when ports start.
+ * It returns 0 on link up.
+ */
+static int
+ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
+{
+#ifdef RTE_EXEC_ENV_FREEBSD
+ const int nb_iter = 25;
+#else
+ const int nb_iter = 0;
+#endif
+ int err, i, link_up = 0;
+ uint32_t speed = 0;
+
+ for (i = 0; i < nb_iter; i++) {
+ err = ixgbe_check_link(hw, &speed, &link_up, 0);
+ if (err)
+ return err;
+ if (link_up)
+ return 0;
+ msec_delay(200);
+ }
+ return 0;
+}
+
/* return 0 means link status changed, -1 means not changed */
int
ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.391637479 +0000
+++ 0036-net-ixgbe-fix-link-up-in-FreeBSD.patch 2020-02-11 11:17:38.368000748 +0000
@@ -1,8 +1,10 @@
-From ba7b12dd64e4e08f52ce9dd62f7c52f6fc455e10 Mon Sep 17 00:00:00 2001
+From fa44fc9e922a653453e32a23c5371d38ba21ceff Mon Sep 17 00:00:00 2001
From: Lunyuan Cui <lunyuanx.cui@intel.com>
Date: Mon, 16 Dec 2019 02:24:18 +0000
Subject: [PATCH] net/ixgbe: fix link up in FreeBSD
+[ upstream commit ba7b12dd64e4e08f52ce9dd62f7c52f6fc455e10 ]
+
In FreeBSD environment, nic_uio drivers do not support interrupts,
rte_intr_callback_register() will fail to register interrupts.
We cannot make link status to change from down to up by interrupt
@@ -10,7 +12,6 @@
when ports start. Through multiple tests, 5s should be enough.
Fixes: b9bd0f09fa15 ("ethdev: fix link status query")
-Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix crash when setting hairpin queues' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (34 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: clean up redundant assignment' " luca.boccassi
` (152 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Tonghao Zhang; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2f8346b61c7fcf0020d10679ca665a338c670f01 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Wed, 27 Nov 2019 22:18:41 +0800
Subject: [PATCH] net/mlx5: fix crash when setting hairpin queues
[ upstream commit bf864e820558a8b001d5de6be437456e82ac3c81 ]
If configuring the number of tx/rx queue with rte_eth_dev_configure
to nr_queues + hairpin_nr_queues, and setting tx/rx queues to
nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the
hairpin queues via rte_eth_tx/rx_hairpin_queue_setup.
When starting the netdev, there is a crash because of NULL accessing.
Fixes: cf5516696d77 ("ethdev: add hairpin queue")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_trigger.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d80ae458bc..3b4c5dbe7a 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -476,7 +476,7 @@ mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev)
rxq_data = (*priv->rxqs)[i];
rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
- if (rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD)
+ if (rxq_ctrl && rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD)
rss_queue_arr[j++] = i;
}
rss_queue_n = j;
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index cafab25c67..ab6937ab10 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -106,9 +106,12 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
unsigned int i;
int ret = 0;
enum mlx5_rxq_obj_type obj_type = MLX5_RXQ_OBJ_TYPE_IBV;
+ struct mlx5_rxq_data *rxq = NULL;
for (i = 0; i < priv->rxqs_n; ++i) {
- if ((*priv->rxqs)[i]->lro) {
+ rxq = (*priv->rxqs)[i];
+
+ if (rxq && rxq->lro) {
obj_type = MLX5_RXQ_OBJ_TYPE_DEVX_RQ;
break;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.426093125 +0000
+++ 0037-net-mlx5-fix-crash-when-setting-hairpin-queues.patch 2020-02-11 11:17:38.372000824 +0000
@@ -1,8 +1,10 @@
-From bf864e820558a8b001d5de6be437456e82ac3c81 Mon Sep 17 00:00:00 2001
+From 2f8346b61c7fcf0020d10679ca665a338c670f01 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Wed, 27 Nov 2019 22:18:41 +0800
Subject: [PATCH] net/mlx5: fix crash when setting hairpin queues
+[ upstream commit bf864e820558a8b001d5de6be437456e82ac3c81 ]
+
If configuring the number of tx/rx queue with rte_eth_dev_configure
to nr_queues + hairpin_nr_queues, and setting tx/rx queues to
nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the
@@ -11,7 +13,6 @@
When starting the netdev, there is a crash because of NULL accessing.
Fixes: cf5516696d77 ("ethdev: add hairpin queue")
-Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: clean up redundant assignment' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (35 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix crash when setting hairpin queues' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix multiple flow table hash list' " luca.boccassi
` (151 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Tonghao Zhang; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1ed26330189b48ae7697f25dac1f603a8bd7b3d9 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Wed, 27 Nov 2019 22:18:42 +0800
Subject: [PATCH] net/mlx5: clean up redundant assignment
[ upstream commit de561750c32692ae86df16f7bd5940d592971d88 ]
The type of txq has been assigned in mlx5_txq_hairpin_new.
Fixes: ae18a1ae9692 ("net/mlx5: support Tx hairpin queues")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_txq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index bac4f71c24..1c4f7e7a5d 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -272,7 +272,6 @@ mlx5_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
DRV_LOG(DEBUG, "port %u adding Tx queue %u to list",
dev->data->port_id, idx);
(*priv->txqs)[idx] = &txq_ctrl->txq;
- txq_ctrl->type = MLX5_TXQ_TYPE_HAIRPIN;
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.455454610 +0000
+++ 0038-net-mlx5-clean-up-redundant-assignment.patch 2020-02-11 11:17:38.372000824 +0000
@@ -1,12 +1,13 @@
-From de561750c32692ae86df16f7bd5940d592971d88 Mon Sep 17 00:00:00 2001
+From 1ed26330189b48ae7697f25dac1f603a8bd7b3d9 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Wed, 27 Nov 2019 22:18:42 +0800
Subject: [PATCH] net/mlx5: clean up redundant assignment
+[ upstream commit de561750c32692ae86df16f7bd5940d592971d88 ]
+
The type of txq has been assigned in mlx5_txq_hairpin_new.
Fixes: ae18a1ae9692 ("net/mlx5: support Tx hairpin queues")
-Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix multiple flow table hash list' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (36 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: clean up redundant assignment' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix request for hot reset support' " luca.boccassi
` (150 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Zhike Wang, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ba19ef396aaca14e49de7b88ef5a435423c68ce8 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Mon, 16 Dec 2019 11:27:41 +0200
Subject: [PATCH] net/mlx5: fix multiple flow table hash list
[ upstream commit 6801116688fe82b5b32cf45ffa7b475d1cfdcea4 ]
The eth devices which share one ibv device only need one hash list of
flow table.
Currently, flow table hash list is created per each eth device
whatever whether they share one ibv device or not.
If the devices share one ibv device, the previously created hash list
will become dangle because the pointer point to (sh->flow_tbls) is
overwritten by the later created hast list.
To fix this, just don't create hash list if it is already created.
Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
Reported-by: Zhike Wang <wangzhike@jd.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d84a6f91b4..50960c91ce 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -868,8 +868,13 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
{
struct mlx5_ibv_shared *sh = priv->sh;
char s[MLX5_HLIST_NAMESIZE];
- int err = mlx5_alloc_table_hash_list(priv);
+ int err = 0;
+ if (!sh->flow_tbls)
+ err = mlx5_alloc_table_hash_list(priv);
+ else
+ DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+ (void *)sh->flow_tbls);
if (err)
return err;
/* Create tags hash list table. */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.484967399 +0000
+++ 0039-net-mlx5-fix-multiple-flow-table-hash-list.patch 2020-02-11 11:17:38.372000824 +0000
@@ -1,8 +1,10 @@
-From 6801116688fe82b5b32cf45ffa7b475d1cfdcea4 Mon Sep 17 00:00:00 2001
+From ba19ef396aaca14e49de7b88ef5a435423c68ce8 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Mon, 16 Dec 2019 11:27:41 +0200
Subject: [PATCH] net/mlx5: fix multiple flow table hash list
+[ upstream commit 6801116688fe82b5b32cf45ffa7b475d1cfdcea4 ]
+
The eth devices which share one ibv device only need one hash list of
flow table.
@@ -16,7 +18,6 @@
To fix this, just don't create hash list if it is already created.
Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
-Cc: stable@dpdk.org
Reported-by: Zhike Wang <wangzhike@jd.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix request for hot reset support' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (37 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix multiple flow table hash list' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix setting of Rx hash fields' " luca.boccassi
` (149 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ae03b9580d494b6861d473a90f4eb673bd0ec97b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 10 Dec 2019 20:35:26 +0530
Subject: [PATCH] net/bnxt: fix request for hot reset support
[ upstream commit 596bbea4e76f118f8665f275fca9f2ab66dc145f ]
During the registration process, the drivers must publish
"HOT_RESET_SUPPORTED" capability to the core firmware only
if core firmware is capable of Hot Reset.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
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.h | 1 +
drivers/net/bnxt/bnxt_hwrm.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index e259c8239d..f9e4d76e47 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -517,6 +517,7 @@ struct bnxt {
#define BNXT_FLAG_INIT_DONE BIT(24)
#define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25)
#define BNXT_FLAG_ADV_FLOW_MGMT BIT(26)
+#define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
#define BNXT_NPAR(bp) ((bp)->port_partition_type)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 41730089b1..6b8ebbe5b8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -672,6 +672,11 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
else
bp->flags &= ~BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD;
+ if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_HOT_RESET_CAPABLE)
+ bp->flags |= BNXT_FLAG_FW_CAP_HOT_RESET;
+ else
+ bp->flags &= ~BNXT_FLAG_FW_CAP_HOT_RESET;
+
HWRM_UNLOCK();
return rc;
@@ -756,7 +761,8 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
if (bp->flags & BNXT_FLAG_REGISTERED)
return 0;
- flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT;
+ if (bp->flags & BNXT_FLAG_FW_CAP_HOT_RESET)
+ flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT;
if (bp->flags & BNXT_FLAG_FW_CAP_ERROR_RECOVERY)
flags |= HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ERROR_RECOVERY_SUPPORT;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.515001296 +0000
+++ 0040-net-bnxt-fix-request-for-hot-reset-support.patch 2020-02-11 11:17:38.380000973 +0000
@@ -1,14 +1,15 @@
-From 596bbea4e76f118f8665f275fca9f2ab66dc145f Mon Sep 17 00:00:00 2001
+From ae03b9580d494b6861d473a90f4eb673bd0ec97b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 10 Dec 2019 20:35:26 +0530
Subject: [PATCH] net/bnxt: fix request for hot reset support
+[ upstream commit 596bbea4e76f118f8665f275fca9f2ab66dc145f ]
+
During the registration process, the drivers must publish
"HOT_RESET_SUPPORTED" capability to the core firmware only
if core firmware is capable of Hot Reset.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -31,7 +32,7 @@
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
#define BNXT_NPAR(bp) ((bp)->port_partition_type)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index b1f908ee40..d30da9b87c 100644
+index 41730089b1..6b8ebbe5b8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -672,6 +672,11 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix setting of Rx hash fields' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (38 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix request for hot reset support' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix item flag on GENEVE item validation' " luca.boccassi
` (148 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Dekel Peled; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 68892d210ad6805118840626582045d88f8aa4b0 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 18 Dec 2019 12:05:46 +0200
Subject: [PATCH] net/mlx5: fix setting of Rx hash fields
[ upstream commit c3e33304a7f6f51f49904faf27be768a59c18553 ]
Rx hash fields were copied from input parameter into TIR attributes
directly, with no translation. As result the copied value was wrong.
This patch adds translation of value from input bitmap to the
appropriate format.
Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.h | 21 +++++++++++++++++++++
drivers/net/mlx5/mlx5_rxq.c | 29 +++++++++++++++++++++++++++--
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 3fff5dd7da..db12715ecc 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -288,6 +288,27 @@ enum mlx5_feature_name {
/* IBV hash source bits for IPV6. */
#define MLX5_IPV6_IBV_RX_HASH (IBV_RX_HASH_SRC_IPV6 | IBV_RX_HASH_DST_IPV6)
+/* IBV hash bits for L3 SRC. */
+#define MLX5_L3_SRC_IBV_RX_HASH (IBV_RX_HASH_SRC_IPV4 | IBV_RX_HASH_SRC_IPV6)
+
+/* IBV hash bits for L3 DST. */
+#define MLX5_L3_DST_IBV_RX_HASH (IBV_RX_HASH_DST_IPV4 | IBV_RX_HASH_DST_IPV6)
+
+/* IBV hash bits for TCP. */
+#define MLX5_TCP_IBV_RX_HASH (IBV_RX_HASH_SRC_PORT_TCP | \
+ IBV_RX_HASH_DST_PORT_TCP)
+
+/* IBV hash bits for UDP. */
+#define MLX5_UDP_IBV_RX_HASH (IBV_RX_HASH_SRC_PORT_UDP | \
+ IBV_RX_HASH_DST_PORT_UDP)
+
+/* IBV hash bits for L4 SRC. */
+#define MLX5_L4_SRC_IBV_RX_HASH (IBV_RX_HASH_SRC_PORT_TCP | \
+ IBV_RX_HASH_SRC_PORT_UDP)
+
+/* IBV hash bits for L4 DST. */
+#define MLX5_L4_DST_IBV_RX_HASH (IBV_RX_HASH_DST_PORT_TCP | \
+ IBV_RX_HASH_DST_PORT_UDP)
/* Geneve header first 16Bit */
#define MLX5_GENEVE_VER_MASK 0x3
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 986ec016df..906ff0e045 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -36,6 +36,7 @@
#include "mlx5_autoconf.h"
#include "mlx5_defs.h"
#include "mlx5_glue.h"
+#include "mlx5_flow.h"
/* Default RSS hash key also used for ConnectX-3. */
uint8_t rss_hash_default_key[] = {
@@ -2452,6 +2453,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
}
} else { /* ind_tbl->type == MLX5_IND_TBL_TYPE_DEVX */
struct mlx5_devx_tir_attr tir_attr;
+ struct mlx5_rx_hash_field_select *rx_hash_field_select;
uint32_t i;
uint32_t lro = 1;
@@ -2465,8 +2467,31 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
memset(&tir_attr, 0, sizeof(tir_attr));
tir_attr.disp_type = MLX5_TIRC_DISP_TYPE_INDIRECT;
tir_attr.rx_hash_fn = MLX5_RX_HASH_FN_TOEPLITZ;
- memcpy(&tir_attr.rx_hash_field_selector_outer, &hash_fields,
- sizeof(uint64_t));
+#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
+ tir_attr.tunneled_offload_en = !!tunnel;
+ /* Translate hash_fields bitmap to PRM format. */
+ rx_hash_field_select = hash_fields & IBV_RX_HASH_INNER ?
+ &tir_attr.rx_hash_field_selector_inner :
+ &tir_attr.rx_hash_field_selector_outer;
+#else
+ rx_hash_field_select = &tir_attr.rx_hash_field_selector_outer;
+#endif
+ /* 1 bit: 0: IPv4, 1: IPv6. */
+ rx_hash_field_select->l3_prot_type =
+ !!(hash_fields & MLX5_IPV6_IBV_RX_HASH);
+ /* 1 bit: 0: TCP, 1: UDP. */
+ rx_hash_field_select->l4_prot_type =
+ !!(hash_fields & MLX5_UDP_IBV_RX_HASH);
+ /* Bitmask which sets which fields to use in RX Hash. */
+ rx_hash_field_select->selected_fields =
+ ((!!(hash_fields & MLX5_L3_SRC_IBV_RX_HASH)) <<
+ MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_SRC_IP) |
+ (!!(hash_fields & MLX5_L3_DST_IBV_RX_HASH)) <<
+ MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_DST_IP |
+ (!!(hash_fields & MLX5_L4_SRC_IBV_RX_HASH)) <<
+ MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_SPORT |
+ (!!(hash_fields & MLX5_L4_DST_IBV_RX_HASH)) <<
+ MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_DPORT;
if (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN)
tir_attr.transport_domain = priv->sh->td->id;
else
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.547660447 +0000
+++ 0041-net-mlx5-fix-setting-of-Rx-hash-fields.patch 2020-02-11 11:17:38.384001048 +0000
@@ -1,8 +1,10 @@
-From c3e33304a7f6f51f49904faf27be768a59c18553 Mon Sep 17 00:00:00 2001
+From 68892d210ad6805118840626582045d88f8aa4b0 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 18 Dec 2019 12:05:46 +0200
Subject: [PATCH] net/mlx5: fix setting of Rx hash fields
+[ upstream commit c3e33304a7f6f51f49904faf27be768a59c18553 ]
+
Rx hash fields were copied from input parameter into TIR attributes
directly, with no translation. As result the copied value was wrong.
@@ -10,7 +12,6 @@
appropriate format.
Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -20,10 +21,10 @@
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index 08e223e546..27d82ac60f 100644
+index 3fff5dd7da..db12715ecc 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -282,6 +282,27 @@ enum mlx5_feature_name {
+@@ -288,6 +288,27 @@ enum mlx5_feature_name {
/* IBV hash source bits for IPV6. */
#define MLX5_IPV6_IBV_RX_HASH (IBV_RX_HASH_SRC_IPV6 | IBV_RX_HASH_DST_IPV6)
@@ -52,7 +53,7 @@
/* Geneve header first 16Bit */
#define MLX5_GENEVE_VER_MASK 0x3
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index bbc07db386..ca25e324c3 100644
+index 986ec016df..906ff0e045 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -36,6 +36,7 @@
@@ -63,7 +64,7 @@
/* Default RSS hash key also used for ConnectX-3. */
uint8_t rss_hash_default_key[] = {
-@@ -2459,6 +2460,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
+@@ -2452,6 +2453,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
}
} else { /* ind_tbl->type == MLX5_IND_TBL_TYPE_DEVX */
struct mlx5_devx_tir_attr tir_attr;
@@ -71,7 +72,7 @@
uint32_t i;
uint32_t lro = 1;
-@@ -2472,8 +2474,31 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
+@@ -2465,8 +2467,31 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
memset(&tir_attr, 0, sizeof(tir_attr));
tir_attr.disp_type = MLX5_TIRC_DISP_TYPE_INDIRECT;
tir_attr.rx_hash_fn = MLX5_RX_HASH_FN_TOEPLITZ;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix item flag on GENEVE item validation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (39 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix setting of Rx hash fields' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'ethdev: fix flow API doxygen comment' " luca.boccassi
` (147 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Dekel Peled; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 682ac6d855b04ad70863fa821d583d1c49b13e8a Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 18 Dec 2019 17:09:55 +0200
Subject: [PATCH] net/mlx5: fix item flag on GENEVE item validation
[ upstream commit 953c00f763b8689f01c8d3f528abcfb243c1aa8c ]
On validation of GENEVE item, the wrong flag is used.
This patch sets the correct bit in item_flags bitmap.
Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 73aaea4536..e50d40040b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4418,7 +4418,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
- last_item = MLX5_FLOW_LAYER_VXLAN_GPE;
+ last_item = MLX5_FLOW_LAYER_GENEVE;
break;
case RTE_FLOW_ITEM_TYPE_MPLS:
ret = mlx5_flow_validate_item_mpls(dev, items,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.578335796 +0000
+++ 0042-net-mlx5-fix-item-flag-on-GENEVE-item-validation.patch 2020-02-11 11:17:38.388001123 +0000
@@ -1,13 +1,14 @@
-From 953c00f763b8689f01c8d3f528abcfb243c1aa8c Mon Sep 17 00:00:00 2001
+From 682ac6d855b04ad70863fa821d583d1c49b13e8a Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 18 Dec 2019 17:09:55 +0200
Subject: [PATCH] net/mlx5: fix item flag on GENEVE item validation
+[ upstream commit 953c00f763b8689f01c8d3f528abcfb243c1aa8c ]
+
On validation of GENEVE item, the wrong flag is used.
This patch sets the correct bit in item_flags bitmap.
Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -16,7 +17,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 12cbf17200..4c162816e4 100644
+index 73aaea4536..e50d40040b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4418,7 +4418,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ethdev: fix flow API doxygen comment' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (40 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix item flag on GENEVE item validation' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " luca.boccassi
` (146 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f3fc74d0aa7600debca85307f31045913fbca74f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 17 Dec 2019 17:12:40 -0800
Subject: [PATCH] ethdev: fix flow API doxygen comment
[ upstream commit ebdc7bb960856a5fe4c8c9101d938c25ef70592a ]
Missing asterisk so that comment is not seen by doxygen.
Fixes: 9a2f44c76207 ("ethdev: add flow tag")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
lib/librte_ethdev/rte_flow.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 452d359a16..58b50265d2 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -502,7 +502,7 @@ enum rte_flow_item_type {
*/
RTE_FLOW_ITEM_TYPE_HIGIG2,
- /*
+ /**
* [META]
*
* Matches a tag value.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.612374740 +0000
+++ 0043-ethdev-fix-flow-API-doxygen-comment.patch 2020-02-11 11:17:38.392001197 +0000
@@ -1,12 +1,13 @@
-From ebdc7bb960856a5fe4c8c9101d938c25ef70592a Mon Sep 17 00:00:00 2001
+From f3fc74d0aa7600debca85307f31045913fbca74f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 17 Dec 2019 17:12:40 -0800
Subject: [PATCH] ethdev: fix flow API doxygen comment
+[ upstream commit ebdc7bb960856a5fe4c8c9101d938c25ef70592a ]
+
Missing asterisk so that comment is not seen by doxygen.
Fixes: 9a2f44c76207 ("ethdev: add flow tag")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (41 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'ethdev: fix flow API doxygen comment' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " luca.boccassi
` (145 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Qi Zhang
Cc: Pandi Kumar Maharajan, Paul M Stillwell Jr, Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7a5755e521cd4ccebd624ffd8cff45462d7331d0 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 3 Dec 2019 15:03:12 +0800
Subject: [PATCH] net/iavf/base: fix command buffer memory leak
[ upstream commit 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 ]
Allocated resources were not freed in the event of failure in
iavf_init_asq function. This patch gracefully handles all failures.
Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/iavf/base/iavf_adminq.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
index 1ba8b52219..a8b989aea9 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
@@ -84,6 +84,7 @@ enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
**/
void iavf_free_adminq_asq(struct iavf_hw *hw)
{
+ iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
}
@@ -367,7 +368,7 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
/* initialize base registers */
ret_code = iavf_config_asq_regs(hw);
if (ret_code != IAVF_SUCCESS)
- goto init_adminq_free_rings;
+ goto init_config_regs;
/* success! */
hw->aq.asq.count = hw->aq.num_asq_entries;
@@ -375,6 +376,10 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
init_adminq_free_rings:
iavf_free_adminq_asq(hw);
+ return ret_code;
+
+init_config_regs:
+ iavf_free_asq_bufs(hw);
init_adminq_exit:
return ret_code;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.642702341 +0000
+++ 0044-net-iavf-base-fix-command-buffer-memory-leak.patch 2020-02-11 11:17:38.392001197 +0000
@@ -1,13 +1,14 @@
-From 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 Mon Sep 17 00:00:00 2001
+From 7a5755e521cd4ccebd624ffd8cff45462d7331d0 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 3 Dec 2019 15:03:12 +0800
Subject: [PATCH] net/iavf/base: fix command buffer memory leak
+[ upstream commit 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 ]
+
Allocated resources were not freed in the event of failure in
iavf_init_asq function. This patch gracefully handles all failures.
Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
-Cc: stable@dpdk.org
Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -18,10 +19,10 @@
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
-index ef352ac4c4..298e77277e 100644
+index 1ba8b52219..a8b989aea9 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
-@@ -82,6 +82,7 @@ enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
+@@ -84,6 +84,7 @@ enum iavf_status_code iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
**/
void iavf_free_adminq_asq(struct iavf_hw *hw)
{
@@ -29,7 +30,7 @@
iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
}
-@@ -353,7 +354,7 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
+@@ -367,7 +368,7 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
/* initialize base registers */
ret_code = iavf_config_asq_regs(hw);
if (ret_code != IAVF_SUCCESS)
@@ -38,7 +39,7 @@
/* success! */
hw->aq.asq.count = hw->aq.num_asq_entries;
-@@ -361,6 +362,10 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
+@@ -375,6 +376,10 @@ enum iavf_status_code iavf_init_asq(struct iavf_hw *hw)
init_adminq_free_rings:
iavf_free_adminq_asq(hw);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/iavf/base: fix adminq return' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (42 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix VSI context' " luca.boccassi
` (144 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Qi Zhang; +Cc: Paul M Stillwell Jr, Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From daa69f04b2fdf0bf94faa32474109ec977e934c3 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 3 Dec 2019 15:03:16 +0800
Subject: [PATCH] net/iavf/base: fix adminq return
[ upstream commit 013d5e879fe357176e0ade1cb6561917a7d46864 ]
When send a adminq, if get IAVF_AQ_RC_BUSY, we should return
IAVF_ERR_NOT_READY.
Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/iavf/base/iavf_adminq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
index a8b989aea9..a9fc63992d 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
@@ -822,6 +822,8 @@ enum iavf_status_code iavf_asq_send_command(struct iavf_hw *hw,
cmd_completed = true;
if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_OK)
status = IAVF_SUCCESS;
+ else if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_EBUSY)
+ status = IAVF_ERR_NOT_READY;
else
status = IAVF_ERR_ADMIN_QUEUE_ERROR;
hw->aq.asq_last_status = (enum iavf_admin_queue_err)retval;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.671359158 +0000
+++ 0045-net-iavf-base-fix-adminq-return.patch 2020-02-11 11:17:38.392001197 +0000
@@ -1,13 +1,14 @@
-From 013d5e879fe357176e0ade1cb6561917a7d46864 Mon Sep 17 00:00:00 2001
+From daa69f04b2fdf0bf94faa32474109ec977e934c3 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 3 Dec 2019 15:03:16 +0800
Subject: [PATCH] net/iavf/base: fix adminq return
+[ upstream commit 013d5e879fe357176e0ade1cb6561917a7d46864 ]
+
When send a adminq, if get IAVF_AQ_RC_BUSY, we should return
IAVF_ERR_NOT_READY.
Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
-Cc: stable@dpdk.org
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
1 file changed, 2 insertions(+)
diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
-index 0a5b2b281b..c1668d2287 100644
+index a8b989aea9..a9fc63992d 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
-@@ -803,6 +803,8 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
+@@ -822,6 +822,8 @@ enum iavf_status_code iavf_asq_send_command(struct iavf_hw *hw,
cmd_completed = true;
if ((enum iavf_admin_queue_err)retval == IAVF_AQ_RC_OK)
status = IAVF_SUCCESS;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix VSI context' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (43 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' " luca.boccassi
` (143 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 549b16da5630940f51985115d6db34311c7468bb Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Sat, 14 Dec 2019 14:14:17 +0800
Subject: [PATCH] net/ice: fix VSI context
[ upstream commit a9faa2223aa84ed8a09a0ea4d5e16bd05b588059 ]
There'll always be a MDD event triggered when adding
a FDIR rule. The root cause is 'LAN enable' is not
configured during control VSI setup.
Besides, correct FDIR fields for both main VSI and
control VSI.
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ice/ice_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index de189daba9..8b34ed9c71 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1573,7 +1573,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
cfg = ICE_AQ_VSI_PROP_SECURITY_VALID |
ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
- cfg = ICE_AQ_VSI_FD_ENABLE | ICE_AQ_VSI_FD_PROG_ENABLE;
+ cfg = ICE_AQ_VSI_FD_ENABLE;
vsi_ctx.info.fd_options = rte_cpu_to_le_16(cfg);
vsi_ctx.info.max_fd_fltr_dedicated =
rte_cpu_to_le_16(hw->func_caps.fd_fltr_guar);
@@ -1601,9 +1601,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
cfg = ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
- cfg = ICE_AQ_VSI_FD_ENABLE | ICE_AQ_VSI_FD_PROG_ENABLE;
+ cfg = ICE_AQ_VSI_FD_PROG_ENABLE;
vsi_ctx.info.fd_options = rte_cpu_to_le_16(cfg);
vsi_ctx.info.sw_id = hw->port_info->sw_id;
+ vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
ret = ice_vsi_config_tc_queue_mapping(vsi,
&vsi_ctx.info,
ICE_DEFAULT_TCMAP);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.698571000 +0000
+++ 0046-net-ice-fix-VSI-context.patch 2020-02-11 11:17:38.400001347 +0000
@@ -1,8 +1,10 @@
-From a9faa2223aa84ed8a09a0ea4d5e16bd05b588059 Mon Sep 17 00:00:00 2001
+From 549b16da5630940f51985115d6db34311c7468bb Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Sat, 14 Dec 2019 14:14:17 +0800
Subject: [PATCH] net/ice: fix VSI context
+[ upstream commit a9faa2223aa84ed8a09a0ea4d5e16bd05b588059 ]
+
There'll always be a MDD event triggered when adding
a FDIR rule. The root cause is 'LAN enable' is not
configured during control VSI setup.
@@ -10,7 +12,6 @@
control VSI.
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
-Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
@@ -19,10 +20,10 @@
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index 2cbd82c946..cf99fc358e 100644
+index de189daba9..8b34ed9c71 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
-@@ -1576,7 +1576,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
+@@ -1573,7 +1573,7 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
cfg = ICE_AQ_VSI_PROP_SECURITY_VALID |
ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
@@ -31,7 +32,7 @@
vsi_ctx.info.fd_options = rte_cpu_to_le_16(cfg);
vsi_ctx.info.max_fd_fltr_dedicated =
rte_cpu_to_le_16(hw->func_caps.fd_fltr_guar);
-@@ -1604,9 +1604,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
+@@ -1601,9 +1601,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
cfg = ICE_AQ_VSI_PROP_FLOW_DIR_VALID;
vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (44 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix VSI context' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 13:12 ` Xu, Rosen
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix virtual channel return' " luca.boccassi
` (142 subsequent siblings)
188 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Andy Pei; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From aa6b3a7622f6f713c9eb13d573f4bd1108a4518f Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Tue, 31 Dec 2019 14:53:47 +0800
Subject: [PATCH] net/ipn3ke: fix line side statistics register read
[ upstream commit eeb1497641cb6d7945abf62a4ea65f514df807e7 ]
To read line side statistics register, eth_group_sel
args in function ipn3ke_indirect_mac_read should be 0.
When eth_group_sel is 1, the nic side register is read.
Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 8d9ebef915..80122e3fc5 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -701,7 +701,7 @@ struct ipn3ke_rpst_hw_port_stats *hw_stats)
&tmp,
IPN3KE_25G_TX_STATISTICS_STATUS,
port_id,
- 1);
+ 0);
if (tmp & IPN3KE_25G_TX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {
tmp = 0x00000000;
(*hw->f_mac_read)(hw,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.729794725 +0000
+++ 0047-net-ipn3ke-fix-line-side-statistics-register-read.patch 2020-02-11 11:17:38.400001347 +0000
@@ -1,14 +1,15 @@
-From eeb1497641cb6d7945abf62a4ea65f514df807e7 Mon Sep 17 00:00:00 2001
+From aa6b3a7622f6f713c9eb13d573f4bd1108a4518f Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Tue, 31 Dec 2019 14:53:47 +0800
Subject: [PATCH] net/ipn3ke: fix line side statistics register read
+[ upstream commit eeb1497641cb6d7945abf62a4ea65f514df807e7 ]
+
To read line side statistics register, eth_group_sel
args in function ipn3ke_indirect_mac_read should be 0.
When eth_group_sel is 1, the nic side register is read.
Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")
-Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix virtual channel return' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (45 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " luca.boccassi
` (141 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Yahui Cao; +Cc: Qi Zhang, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5a7217b86939c81d21f4cd749ec4f12c7a22c777 Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Tue, 24 Dec 2019 12:13:13 +0800
Subject: [PATCH] net/iavf: fix virtual channel return
[ upstream commit be5466e4e9cc547f7792f04bee1f1d593d8072b8 ]
In iavf_handle_virtchnl_msg(), it is not appropriate for _clear_cmd()
to be used as a notification to foreground thread. So introduce
_notify_cmd() to fix this error. In addition, since _notify_cmd()
contains rte_wmb(), rte_compiler_barrier() is not necessary.
Sending msg from VF to PF is mainly by calling iavf_execute_vf_cmd(),
the whole virtchnl msg process is like,
iavf_execute_vf_cmd() will call iavf_aq_send_msg_to_pf() to send
msg and then polling the cmd done flag as "if (vf->pend_cmd ==
VIRTCHNL_OP_UNKNOWN)"
When reply msg is returned by pf, iavf_handle_virtchnl_msg() in
isr will read msg return value by "vf->cmd_retval = msg_ret" and
immediately set the cmd done flag by calling _clear_cmd() to
notify the iavf_execute_vf_cmd().
iavf_execute_vf_cmd() find the cmd done flag is set and then
check whether command return value vf->cmd_retval is success or
not.
However _clear_cmd() also resets the vf->cmd_retval to success,
overwriting the actual return value which is used for diagnosis.
So iavf_execute_vf_cmd() will always find vf->cmd_retval is
success and then return success.
Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/iavf/iavf.h | 11 +++++++++++
drivers/net/iavf/iavf_vchnl.c | 9 +++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index bbd4d75d00..84f8213542 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -173,6 +173,17 @@ struct iavf_cmd_info {
uint32_t out_size; /* buffer size for response */
};
+/* notify current command done. Only call in case execute
+ * _atomic_set_cmd successfully.
+ */
+static inline void
+_notify_cmd(struct iavf_info *vf, uint32_t msg_ret)
+{
+ vf->cmd_retval = msg_ret;
+ rte_wmb();
+ vf->pend_cmd = VIRTCHNL_OP_UNKNOWN;
+}
+
/* clear current command. Only call in case execute
* _atomic_set_cmd successfully.
*/
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 14395fed31..cf0f6458ed 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -210,12 +210,9 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
info.msg_len);
} else {
/* read message and it's expected one */
- if (msg_opc == vf->pend_cmd) {
- vf->cmd_retval = msg_ret;
- /* prevent compiler reordering */
- rte_compiler_barrier();
- _clear_cmd(vf);
- } else
+ if (msg_opc == vf->pend_cmd)
+ _notify_cmd(vf, msg_ret);
+ else
PMD_DRV_LOG(ERR, "command mismatch,"
"expect %u, get %u",
vf->pend_cmd, msg_opc);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.759074450 +0000
+++ 0048-net-iavf-fix-virtual-channel-return.patch 2020-02-11 11:17:38.400001347 +0000
@@ -1,8 +1,10 @@
-From be5466e4e9cc547f7792f04bee1f1d593d8072b8 Mon Sep 17 00:00:00 2001
+From 5a7217b86939c81d21f4cd749ec4f12c7a22c777 Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Tue, 24 Dec 2019 12:13:13 +0800
Subject: [PATCH] net/iavf: fix virtual channel return
+[ upstream commit be5466e4e9cc547f7792f04bee1f1d593d8072b8 ]
+
In iavf_handle_virtchnl_msg(), it is not appropriate for _clear_cmd()
to be used as a notification to foreground thread. So introduce
_notify_cmd() to fix this error. In addition, since _notify_cmd()
@@ -30,7 +32,6 @@
success and then return success.
Fixes: 22b123a36d07 ("net/avf: initialize PMD")
-Cc: stable@dpdk.org
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -41,10 +42,10 @@
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
-index 77b7068939..9466808917 100644
+index bbd4d75d00..84f8213542 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
-@@ -174,6 +174,17 @@ struct iavf_cmd_info {
+@@ -173,6 +173,17 @@ struct iavf_cmd_info {
uint32_t out_size; /* buffer size for response */
};
@@ -63,7 +64,7 @@
* _atomic_set_cmd successfully.
*/
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index bf87ab6115..303b515386 100644
+index 14395fed31..cf0f6458ed 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -210,12 +210,9 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (46 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix virtual channel return' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: set fixed flag for exact link speed' " luca.boccassi
` (140 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Qi Zhang, Ciara Loftus, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 41901086c9dd45e8dcdd78a3535a7887330e15b4 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 26 Dec 2019 14:45:44 +0800
Subject: [PATCH] net/i40e: fix Tx when TSO is enabled
[ upstream commit 29b2ba82c4c94df1975d0cb9c5c23feef99cf6a3 ]
Hardware limits that max buffer size per tx descriptor should be
(16K-1)B. So when TSO enabled, the mbuf data size may exceed the
limit and cause malicious behavior to the NIC. This patch fixes
this issue by using more tx descs for this kind of large buffer.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 45 +++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 17dc8c78f7..bbdba39b3c 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -989,6 +989,24 @@ i40e_set_tso_ctx(struct rte_mbuf *mbuf, union i40e_tx_offload tx_offload)
return ctx_desc;
}
+/* HW requires that Tx buffer size ranges from 1B up to (16K-1)B. */
+#define I40E_MAX_DATA_PER_TXD \
+ (I40E_TXD_QW1_TX_BUF_SZ_MASK >> I40E_TXD_QW1_TX_BUF_SZ_SHIFT)
+/* Calculate the number of TX descriptors needed for each pkt */
+static inline uint16_t
+i40e_calc_pkt_desc(struct rte_mbuf *tx_pkt)
+{
+ struct rte_mbuf *txd = tx_pkt;
+ uint16_t count = 0;
+
+ while (txd != NULL) {
+ count += DIV_ROUND_UP(txd->data_len, I40E_MAX_DATA_PER_TXD);
+ txd = txd->next;
+ }
+
+ return count;
+}
+
uint16_t
i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
{
@@ -1046,8 +1064,15 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
* The number of descriptors that must be allocated for
* a packet equals to the number of the segments of that
* packet plus 1 context descriptor if needed.
+ * Recalculate the needed tx descs when TSO enabled in case
+ * the mbuf data size exceeds max data size that hw allows
+ * per tx desc.
*/
- nb_used = (uint16_t)(tx_pkt->nb_segs + nb_ctx);
+ if (ol_flags & PKT_TX_TCP_SEG)
+ nb_used = (uint16_t)(i40e_calc_pkt_desc(tx_pkt) +
+ nb_ctx);
+ else
+ nb_used = (uint16_t)(tx_pkt->nb_segs + nb_ctx);
tx_last = (uint16_t)(tx_id + nb_used - 1);
/* Circular ring */
@@ -1160,6 +1185,24 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
slen = m_seg->data_len;
buf_dma_addr = rte_mbuf_data_iova(m_seg);
+ while ((ol_flags & PKT_TX_TCP_SEG) &&
+ unlikely(slen > I40E_MAX_DATA_PER_TXD)) {
+ txd->buffer_addr =
+ rte_cpu_to_le_64(buf_dma_addr);
+ txd->cmd_type_offset_bsz =
+ i40e_build_ctob(td_cmd,
+ td_offset, I40E_MAX_DATA_PER_TXD,
+ td_tag);
+
+ buf_dma_addr += I40E_MAX_DATA_PER_TXD;
+ slen -= I40E_MAX_DATA_PER_TXD;
+
+ txe->last_id = tx_last;
+ tx_id = txe->next_id;
+ txe = txn;
+ txd = &txr[tx_id];
+ txn = &sw_ring[txe->next_id];
+ }
PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]:\n"
"buf_dma_addr: %#"PRIx64";\n"
"td_cmd: %#x;\n"
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.787230920 +0000
+++ 0049-net-i40e-fix-Tx-when-TSO-is-enabled.patch 2020-02-11 11:17:38.404001421 +0000
@@ -1,15 +1,16 @@
-From 29b2ba82c4c94df1975d0cb9c5c23feef99cf6a3 Mon Sep 17 00:00:00 2001
+From 41901086c9dd45e8dcdd78a3535a7887330e15b4 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 26 Dec 2019 14:45:44 +0800
Subject: [PATCH] net/i40e: fix Tx when TSO is enabled
+[ upstream commit 29b2ba82c4c94df1975d0cb9c5c23feef99cf6a3 ]
+
Hardware limits that max buffer size per tx descriptor should be
(16K-1)B. So when TSO enabled, the mbuf data size may exceed the
limit and cause malicious behavior to the NIC. This patch fixes
this issue by using more tx descs for this kind of large buffer.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e: set fixed flag for exact link speed' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (47 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
` (139 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Guinan Sun; +Cc: Ting Xu, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9283d11504cc32e99ade0d92d68c5b21250be47b Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 3 Dec 2019 16:59:27 +0000
Subject: [PATCH] net/i40e: set fixed flag for exact link speed
[ upstream commit dc73db27bb617a2755f27f243cf698e111d9e609 ]
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8b25003910..86fc4f4076 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2241,6 +2241,9 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_eth_conf *conf = &dev->data->dev_conf;
+ abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK |
+ I40E_AQ_PHY_LINK_ENABLED;
+
if (conf->link_speeds == ETH_LINK_SPEED_AUTONEG) {
conf->link_speeds = ETH_LINK_SPEED_40G |
ETH_LINK_SPEED_25G |
@@ -2248,11 +2251,12 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
ETH_LINK_SPEED_10G |
ETH_LINK_SPEED_1G |
ETH_LINK_SPEED_100M;
+
+ abilities |= I40E_AQ_PHY_AN_ENABLED;
+ } else {
+ abilities &= ~I40E_AQ_PHY_AN_ENABLED;
}
speed = i40e_parse_link_speeds(conf->link_speeds);
- abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK |
- I40E_AQ_PHY_AN_ENABLED |
- I40E_AQ_PHY_LINK_ENABLED;
return i40e_phy_conf_link(hw, abilities, speed, true);
}
@@ -2271,13 +2275,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
hw->adapter_stopped = 0;
- if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
- PMD_INIT_LOG(ERR,
- "Invalid link_speeds for port %u, autonegotiation disabled",
- dev->data->port_id);
- return -EINVAL;
- }
-
rte_intr_disable(intr_handle);
if ((rte_intr_cap_multiple(intr_handle) ||
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.817648459 +0000
+++ 0050-net-i40e-set-fixed-flag-for-exact-link-speed.patch 2020-02-11 11:17:38.412001571 +0000
@@ -1,8 +1,10 @@
-From dc73db27bb617a2755f27f243cf698e111d9e609 Mon Sep 17 00:00:00 2001
+From 9283d11504cc32e99ade0d92d68c5b21250be47b Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 3 Dec 2019 16:59:27 +0000
Subject: [PATCH] net/i40e: set fixed flag for exact link speed
+[ upstream commit dc73db27bb617a2755f27f243cf698e111d9e609 ]
+
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: set fixed flag for exact link speed' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (48 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: set fixed flag for exact link speed' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " luca.boccassi
` (138 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Guinan Sun; +Cc: Ting Xu, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 3 Dec 2019 16:59:28 +0000
Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed
[ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ]
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fba8c51595..b2f723f0b6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2559,17 +2559,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- /* IXGBE devices don't support:
- * - half duplex (checked afterwards for valid speeds)
- * - fixed speed: TODO implement
- */
- if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
- PMD_INIT_LOG(ERR,
- "Invalid link_speeds for port %u, fix speed not supported",
- dev->data->port_id);
- return -EINVAL;
- }
-
/* Stop the link setup handler before resetting the HW. */
rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
@@ -2725,7 +2714,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
}
link_speeds = &dev->data->dev_conf.link_speeds;
- if (*link_speeds & ~allowed_speeds) {
+
+ /* Ignore autoneg flag bit and check the validity of
+ * link_speed
+ */
+ if (((*link_speeds) >> 1) & ~(allowed_speeds >> 1)) {
PMD_INIT_LOG(ERR, "Invalid link setting");
goto error;
}
@@ -4169,7 +4162,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
link.link_status = ETH_LINK_DOWN;
link.link_speed = ETH_SPEED_NUM_NONE;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
- link.link_autoneg = ETH_LINK_AUTONEG;
+ link.link_autoneg = !(dev->data->dev_conf.link_speeds &
+ ETH_LINK_SPEED_FIXED);
hw->mac.get_link_status = true;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.855523307 +0000
+++ 0051-net-ixgbe-set-fixed-flag-for-exact-link-speed.patch 2020-02-11 11:17:38.416001646 +0000
@@ -1,8 +1,10 @@
-From 34e7360960687c1e99fd693d7a72e3be3a019a36 Mon Sep 17 00:00:00 2001
+From 25a3624d1e33a0ed575165b6df9af97574f881c7 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 3 Dec 2019 16:59:28 +0000
Subject: [PATCH] net/ixgbe: set fixed flag for exact link speed
+[ upstream commit 34e7360960687c1e99fd693d7a72e3be3a019a36 ]
+
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix link during port toggle' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (49 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue profile selection' " luca.boccassi
` (137 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3dc221f4bc7c9135c7fc7f5430469c0beb78d273 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:35 -0800
Subject: [PATCH] net/bnxt: fix link during port toggle
[ upstream commit 074cacb9907aaae240a69eafc80018c873881d82 ]
We need to wait for up to 500ms to receive async event notification
after forcing link down. Similarly we need to wait for up to 10s for
link to come up after configuring the hardware for link up.
Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 10 ++++++----
drivers/net/bnxt/bnxt_cpr.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 18 +++++++++++++-----
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index f9e4d76e47..d00186f79e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -231,9 +231,10 @@ struct bnxt_pf_info {
uint8_t evb_mode;
};
-/* Max wait time is 10 * 100ms = 1s */
-#define BNXT_LINK_WAIT_CNT 10
-#define BNXT_LINK_WAIT_INTERVAL 100
+/* Max wait time for link up is 10s and link down is 500ms */
+#define BNXT_LINK_UP_WAIT_CNT 200
+#define BNXT_LINK_DOWN_WAIT_CNT 10
+#define BNXT_LINK_WAIT_INTERVAL 50
struct bnxt_link_info {
uint32_t phy_flags;
uint8_t mac_type;
@@ -654,7 +655,8 @@ struct bnxt {
};
int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);
-int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete);
+int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
+ bool exp_link_status);
int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg);
int is_bnxt_in_error(struct bnxt *bp);
uint16_t bnxt_rss_ctxts(const struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index e6f30fecbf..14ef5a38a5 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
/* FALLTHROUGH */
- bnxt_link_update_op(bp->eth_dev, 0);
+ bnxt_link_update(bp->eth_dev, 0, ETH_LINK_UP);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 41848f36f8..3e7bc61325 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -856,7 +856,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
- bnxt_link_update_op(eth_dev, 1);
+ bnxt_link_update(eth_dev, 1, ETH_LINK_UP);
if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
vlan_mask |= ETH_VLAN_FILTER_MASK;
@@ -940,7 +940,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
* During reset recovery, there is no need to wait
*/
if (!is_bnxt_in_error(bp))
- rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
+ bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
/* Clean queue intr-vector mapping */
rte_intr_efd_disable(intr_handle);
@@ -1089,12 +1089,14 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
return rc;
}
-int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
+ bool exp_link_status)
{
int rc = 0;
struct bnxt *bp = eth_dev->data->dev_private;
struct rte_eth_link new;
- unsigned int cnt = BNXT_LINK_WAIT_CNT;
+ int cnt = exp_link_status ? BNXT_LINK_UP_WAIT_CNT :
+ BNXT_LINK_DOWN_WAIT_CNT;
rc = is_bnxt_in_error(bp);
if (rc)
@@ -1112,7 +1114,7 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
goto out;
}
- if (!wait_to_complete || new.link_status)
+ if (!wait_to_complete || new.link_status == exp_link_status)
break;
rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
@@ -1134,6 +1136,12 @@ out:
return rc;
}
+static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
+ int wait_to_complete)
+{
+ return bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);
+}
+
static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.890018626 +0000
+++ 0052-net-bnxt-fix-link-during-port-toggle.patch 2020-02-11 11:17:38.420001721 +0000
@@ -1,14 +1,15 @@
-From 074cacb9907aaae240a69eafc80018c873881d82 Mon Sep 17 00:00:00 2001
+From 3dc221f4bc7c9135c7fc7f5430469c0beb78d273 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:35 -0800
Subject: [PATCH] net/bnxt: fix link during port toggle
+[ upstream commit 074cacb9907aaae240a69eafc80018c873881d82 ]
+
We need to wait for up to 500ms to receive async event notification
after forcing link down. Similarly we need to wait for up to 10s for
link to come up after configuring the hardware for link up.
Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
-Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -19,7 +20,7 @@
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index ab18e8acd8..ab0b8dde1b 100644
+index f9e4d76e47..d00186f79e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -231,9 +231,10 @@ struct bnxt_pf_info {
@@ -36,7 +37,7 @@
struct bnxt_link_info {
uint32_t phy_flags;
uint8_t mac_type;
-@@ -656,7 +657,8 @@ struct bnxt {
+@@ -654,7 +655,8 @@ struct bnxt {
};
int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);
@@ -47,7 +48,7 @@
int is_bnxt_in_error(struct bnxt *bp);
uint16_t bnxt_rss_ctxts(const struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
-index 2c3129fe28..bb316b9e05 100644
+index e6f30fecbf..14ef5a38a5 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -60,7 +61,7 @@
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 1b4ed293d0..88df82b865 100644
+index 41848f36f8..3e7bc61325 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -856,7 +856,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
@@ -81,7 +82,7 @@
/* Clean queue intr-vector mapping */
rte_intr_efd_disable(intr_handle);
-@@ -1086,12 +1086,14 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
+@@ -1089,12 +1089,14 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
return rc;
}
@@ -98,7 +99,7 @@
rc = is_bnxt_in_error(bp);
if (rc)
-@@ -1109,7 +1111,7 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1112,7 +1114,7 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
goto out;
}
@@ -107,7 +108,7 @@
break;
rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
-@@ -1131,6 +1133,12 @@ out:
+@@ -1134,6 +1136,12 @@ out:
return rc;
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Tx queue profile selection' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (50 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " luca.boccassi
@ 2020-02-11 11:19 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix flow flush to sync with flow destroy' " luca.boccassi
` (136 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:19 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 46007e06afa0f6112fe7c64f95472b94e58ae1d3 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:37 -0800
Subject: [PATCH] net/bnxt: fix Tx queue profile selection
[ upstream commit 816eacad1116b06581df3ca6b269990d24f63dac ]
In the case when CoS classification is disabled, driver was iterating
looking for only lossy profiles as that is what is expected to be used
for regular NIC operations. But in certain custom profiles, there were
no lossy profiles configured, only lossless profiles instead.
To handle such cases, it is better to fallback to using the first valid
profile.
Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 44 +++++++++++++++++++++++++++++-------
drivers/net/bnxt/bnxt_hwrm.h | 3 +++
2 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6b8ebbe5b8..7628ae9402 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1216,6 +1216,35 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
return rc;
}
+static bool bnxt_find_lossy_profile(struct bnxt *bp)
+{
+ int i = 0;
+
+ for (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {
+ if (bp->tx_cos_queue[i].profile ==
+ HWRM_QUEUE_SERVICE_PROFILE_LOSSY) {
+ bp->tx_cosq_id[0] = bp->tx_cos_queue[i].id;
+ return true;
+ }
+ }
+ return false;
+}
+
+static void bnxt_find_first_valid_profile(struct bnxt *bp)
+{
+ int i = 0;
+
+ for (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {
+ if (bp->tx_cos_queue[i].profile !=
+ HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN &&
+ bp->tx_cos_queue[i].id !=
+ HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN) {
+ bp->tx_cosq_id[0] = bp->tx_cos_queue[i].id;
+ break;
+ }
+ }
+}
+
int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
{
int rc = 0;
@@ -1275,14 +1304,13 @@ get_rx_info:
bp->tx_cos_queue[i].id;
}
} else {
- for (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {
- if (bp->tx_cos_queue[i].profile ==
- HWRM_QUEUE_SERVICE_PROFILE_LOSSY) {
- bp->tx_cosq_id[0] =
- bp->tx_cos_queue[i].id;
- break;
- }
- }
+ /* When CoS classification is disabled, for normal NIC
+ * operations, ideally we should look to use LOSSY.
+ * If not found, fallback to the first valid profile
+ */
+ if (!bnxt_find_lossy_profile(bp))
+ bnxt_find_first_valid_profile(bp);
+
}
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index abe5de9db6..d8d1360f91 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -35,6 +35,9 @@ struct bnxt_cp_ring_info;
#define HWRM_QUEUE_SERVICE_PROFILE_LOSSY \
HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY
+#define HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN \
+ HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN
+
#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC \
HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL \
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.921961807 +0000
+++ 0053-net-bnxt-fix-Tx-queue-profile-selection.patch 2020-02-11 11:17:38.424001795 +0000
@@ -1,8 +1,10 @@
-From 816eacad1116b06581df3ca6b269990d24f63dac Mon Sep 17 00:00:00 2001
+From 46007e06afa0f6112fe7c64f95472b94e58ae1d3 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:37 -0800
Subject: [PATCH] net/bnxt: fix Tx queue profile selection
+[ upstream commit 816eacad1116b06581df3ca6b269990d24f63dac ]
+
In the case when CoS classification is disabled, driver was iterating
looking for only lossy profiles as that is what is expected to be used
for regular NIC operations. But in certain custom profiles, there were
@@ -11,7 +13,6 @@
profile.
Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
-Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -21,10 +22,10 @@
2 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index d0dcd561c1..bee4c154fd 100644
+index 6b8ebbe5b8..7628ae9402 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -1210,6 +1210,35 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+@@ -1216,6 +1216,35 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
return rc;
}
@@ -60,7 +61,7 @@
int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
{
int rc = 0;
-@@ -1269,14 +1298,13 @@ get_rx_info:
+@@ -1275,14 +1304,13 @@ get_rx_info:
bp->tx_cos_queue[i].id;
}
} else {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix flow flush to sync with flow destroy' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (51 preceding siblings ...)
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue profile selection' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix non matching flow hitting filter rule' " luca.boccassi
` (135 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Santoshkumar Karanappa Rastapur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d6fd94c20c1af71a5b0eb00ce271d85152976374 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:39 -0800
Subject: [PATCH] net/bnxt: fix flow flush to sync with flow destroy
[ upstream commit e339ef6e357c97c512a37fbba13859878a496636 ]
Sync flow flush routine with flow destroy so that the operations
performed per flow during a flush are the same as that are done for an
individual flow destroy by having a common function to call for both.
One of the things that was missed in the flow flush routine was the
deletion of the L2 filter that would have been created as part of an
n-tuple filter.
Also, decrement the l2_ref_cnt for a filter in the case of a filter
update as it would've bumped up previously in validate_and_parse_flow()
Fixes: 89278c59d97c ("net/bnxt: fix flow flush handling")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 132 ++++++++++++-----------------------
1 file changed, 46 insertions(+), 86 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 76e9584da7..dd40b2d72e 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1537,10 +1537,13 @@ bnxt_update_filter(struct bnxt *bp, struct bnxt_filter_info *old_filter,
* filter which points to the new destination queue and so we clear
* the previous L2 filter. For ntuple filters, we are going to reuse
* the old L2 filter and create new NTUPLE filter with this new
- * destination queue subsequently during bnxt_flow_create.
+ * destination queue subsequently during bnxt_flow_create. So we
+ * decrement the ref cnt of the L2 filter that would've been bumped
+ * up previously in bnxt_validate_and_parse_flow as the old n-tuple
+ * filter that was referencing it will be deleted now.
*/
+ bnxt_hwrm_clear_l2_filter(bp, old_filter);
if (new_filter->filter_type == HWRM_CFA_L2_FILTER) {
- bnxt_hwrm_clear_l2_filter(bp, old_filter);
bnxt_hwrm_set_l2_filter(bp, new_filter->dst_id, new_filter);
} else {
if (new_filter->filter_type == HWRM_CFA_EM_FILTER)
@@ -1817,46 +1820,24 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
}
static int
-bnxt_flow_destroy(struct rte_eth_dev *dev,
- struct rte_flow *flow,
- struct rte_flow_error *error)
+_bnxt_flow_destroy(struct bnxt *bp,
+ struct rte_flow *flow,
+ struct rte_flow_error *error)
{
- struct bnxt *bp = dev->data->dev_private;
struct bnxt_filter_info *filter;
struct bnxt_vnic_info *vnic;
int ret = 0;
- bnxt_acquire_flow_lock(bp);
- if (!flow) {
- rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
- "Invalid flow: failed to destroy flow.");
- bnxt_release_flow_lock(bp);
- return -EINVAL;
- }
-
filter = flow->filter;
vnic = flow->vnic;
- if (!filter) {
- rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
- "Invalid flow: failed to destroy flow.");
- bnxt_release_flow_lock(bp);
- return -EINVAL;
- }
-
if (filter->filter_type == HWRM_CFA_TUNNEL_REDIRECT_FILTER &&
filter->enables == filter->tunnel_type) {
- ret = bnxt_handle_tunnel_redirect_destroy(bp,
- filter,
- error);
- if (!ret) {
+ ret = bnxt_handle_tunnel_redirect_destroy(bp, filter, error);
+ if (!ret)
goto done;
- } else {
- bnxt_release_flow_lock(bp);
+ else
return ret;
- }
}
ret = bnxt_match_filter(bp, filter);
@@ -1903,7 +1884,36 @@ done:
"Failed to destroy flow.");
}
+ return ret;
+}
+
+static int
+bnxt_flow_destroy(struct rte_eth_dev *dev,
+ struct rte_flow *flow,
+ struct rte_flow_error *error)
+{
+ struct bnxt *bp = dev->data->dev_private;
+ int ret = 0;
+
+ bnxt_acquire_flow_lock(bp);
+ if (!flow) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Invalid flow: failed to destroy flow.");
+ bnxt_release_flow_lock(bp);
+ return -EINVAL;
+ }
+
+ if (!flow->filter) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Invalid flow: failed to destroy flow.");
+ bnxt_release_flow_lock(bp);
+ return -EINVAL;
+ }
+ ret = _bnxt_flow_destroy(bp, flow, error);
bnxt_release_flow_lock(bp);
+
return ret;
}
@@ -1911,7 +1921,6 @@ static int
bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
struct bnxt *bp = dev->data->dev_private;
- struct bnxt_filter_info *filter = NULL;
struct bnxt_vnic_info *vnic;
struct rte_flow *flow;
unsigned int i;
@@ -1925,66 +1934,17 @@ bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
while (!STAILQ_EMPTY(&vnic->flow_list)) {
flow = STAILQ_FIRST(&vnic->flow_list);
- filter = flow->filter;
- if (filter->filter_type ==
- HWRM_CFA_TUNNEL_REDIRECT_FILTER &&
- filter->enables == filter->tunnel_type) {
- ret =
- bnxt_handle_tunnel_redirect_destroy(bp,
- filter,
- error);
- if (!ret) {
- goto done;
- } else {
- bnxt_release_flow_lock(bp);
- return ret;
- }
- }
+ if (!flow->filter)
+ continue;
- if (filter->filter_type == HWRM_CFA_EM_FILTER)
- ret = bnxt_hwrm_clear_em_filter(bp, filter);
- if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
- ret = bnxt_hwrm_clear_ntuple_filter(bp, filter);
- else if (i)
- ret = bnxt_hwrm_clear_l2_filter(bp, filter);
-
- if (ret) {
- rte_flow_error_set
- (error,
- -ret,
- RTE_FLOW_ERROR_TYPE_HANDLE,
- NULL,
- "Failed to flush flow in HW.");
- bnxt_release_flow_lock(bp);
- return -rte_errno;
- }
-done:
- STAILQ_REMOVE(&vnic->flow_list, flow,
- rte_flow, next);
-
- STAILQ_REMOVE(&vnic->filter,
- filter,
- bnxt_filter_info,
- next);
- bnxt_free_filter(bp, filter);
-
- rte_free(flow);
-
- /* If this was the last flow associated with this vnic,
- * switch the queue back to RSS pool.
- */
- if (STAILQ_EMPTY(&vnic->flow_list)) {
- rte_free(vnic->fw_grp_ids);
- if (vnic->rx_queue_cnt > 1)
- bnxt_hwrm_vnic_ctx_free(bp, vnic);
- bnxt_hwrm_vnic_free(bp, vnic);
- vnic->rx_queue_cnt = 0;
- }
+ ret = _bnxt_flow_destroy(bp, flow, error);
+ if (ret)
+ break;
}
}
-
bnxt_release_flow_lock(bp);
+
return ret;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.953827556 +0000
+++ 0054-net-bnxt-fix-flow-flush-to-sync-with-flow-destroy.patch 2020-02-11 11:17:38.424001795 +0000
@@ -1,8 +1,10 @@
-From e339ef6e357c97c512a37fbba13859878a496636 Mon Sep 17 00:00:00 2001
+From d6fd94c20c1af71a5b0eb00ce271d85152976374 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:39 -0800
Subject: [PATCH] net/bnxt: fix flow flush to sync with flow destroy
+[ upstream commit e339ef6e357c97c512a37fbba13859878a496636 ]
+
Sync flow flush routine with flow destroy so that the operations
performed per flow during a flush are the same as that are done for an
individual flow destroy by having a common function to call for both.
@@ -13,7 +15,6 @@
update as it would've bumped up previously in validate_and_parse_flow()
Fixes: 89278c59d97c ("net/bnxt: fix flow flush handling")
-Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
@@ -22,10 +23,10 @@
1 file changed, 46 insertions(+), 86 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 7bd6811f16..7343b7e7b4 100644
+index 76e9584da7..dd40b2d72e 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1536,10 +1536,13 @@ bnxt_update_filter(struct bnxt *bp, struct bnxt_filter_info *old_filter,
+@@ -1537,10 +1537,13 @@ bnxt_update_filter(struct bnxt *bp, struct bnxt_filter_info *old_filter,
* filter which points to the new destination queue and so we clear
* the previous L2 filter. For ntuple filters, we are going to reuse
* the old L2 filter and create new NTUPLE filter with this new
@@ -41,7 +42,7 @@
bnxt_hwrm_set_l2_filter(bp, new_filter->dst_id, new_filter);
} else {
if (new_filter->filter_type == HWRM_CFA_EM_FILTER)
-@@ -1816,46 +1819,24 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
+@@ -1817,46 +1820,24 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
}
static int
@@ -94,7 +95,7 @@
}
ret = bnxt_match_filter(bp, filter);
-@@ -1902,7 +1883,36 @@ done:
+@@ -1903,7 +1884,36 @@ done:
"Failed to destroy flow.");
}
@@ -131,7 +132,7 @@
return ret;
}
-@@ -1910,7 +1920,6 @@ static int
+@@ -1911,7 +1921,6 @@ static int
bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
{
struct bnxt *bp = dev->data->dev_private;
@@ -139,7 +140,7 @@
struct bnxt_vnic_info *vnic;
struct rte_flow *flow;
unsigned int i;
-@@ -1924,66 +1933,17 @@ bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
+@@ -1925,66 +1934,17 @@ bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
while (!STAILQ_EMPTY(&vnic->flow_list)) {
flow = STAILQ_FIRST(&vnic->flow_list);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix non matching flow hitting filter rule' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (52 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix flow flush to sync with flow destroy' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix reusing L2 filter' " luca.boccassi
` (134 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8a0dcafe970bf57a19da6d3aafef313deedfc0b8 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:40 -0800
Subject: [PATCH] net/bnxt: fix non matching flow hitting filter rule
[ upstream commit 5c63167168138cb5f119372814e62472bbdcd38e ]
As part of ntuple filter, we were creating L2 filter with the ntuple
redirect queue resulting in any L2 matching flow getting steered to
this queue. For ntuple filters, we need to create the L2 filter with
default queue. The user specified redirect queue will be set while
creating the ntuple filter in hardware.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index dd40b2d72e..98b1f27bbd 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1126,7 +1126,16 @@ use_vnic:
PMD_DRV_LOG(DEBUG,
"Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
filter->dst_id = vnic->fw_vnic_id;
- filter1 = bnxt_get_l2_filter(bp, filter, vnic);
+
+ /* For ntuple filter, create the L2 filter with default VNIC.
+ * The user specified redirect queue will be set while creating
+ * the ntuple filter in hardware.
+ */
+ vnic0 = BNXT_GET_DEFAULT_VNIC(bp);
+ if (use_ntuple)
+ filter1 = bnxt_get_l2_filter(bp, filter, vnic0);
+ else
+ filter1 = bnxt_get_l2_filter(bp, filter, vnic);
if (filter1 == NULL) {
rte_flow_error_set(error,
ENOSPC,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:40.982474881 +0000
+++ 0055-net-bnxt-fix-non-matching-flow-hitting-filter-rule.patch 2020-02-11 11:17:38.428001871 +0000
@@ -1,8 +1,10 @@
-From 5c63167168138cb5f119372814e62472bbdcd38e Mon Sep 17 00:00:00 2001
+From 8a0dcafe970bf57a19da6d3aafef313deedfc0b8 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:40 -0800
Subject: [PATCH] net/bnxt: fix non matching flow hitting filter rule
+[ upstream commit 5c63167168138cb5f119372814e62472bbdcd38e ]
+
As part of ntuple filter, we were creating L2 filter with the ntuple
redirect queue resulting in any L2 matching flow getting steered to
this queue. For ntuple filters, we need to create the L2 filter with
@@ -10,7 +12,6 @@
creating the ntuple filter in hardware.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
-Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -19,7 +20,7 @@
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 7343b7e7b4..855994a6b0 100644
+index dd40b2d72e..98b1f27bbd 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1126,7 +1126,16 @@ use_vnic:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix reusing L2 filter' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (53 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix non matching flow hitting filter rule' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix overwriting error message' " luca.boccassi
` (133 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 00a5ed015b201325ba6f124da0052784fe7a0151 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:41 -0800
Subject: [PATCH] net/bnxt: fix reusing L2 filter
[ upstream commit f0f6b5e6cf94e75cd419bb1bc37463bbc7884110 ]
The software L2 filter was being released back to the free pool,
though it was created in HW and the filter corresponding to an actual
'flow' would have reference to the HW L2 filter.
But if this 'flow were to be deleted, then this HW L2 filter also
would be gone.
Fix this by storing the L2 filter created originally either for an
n-tuple flow or otherwise as part of the vnic's filter list.
This would require the filter_info struct to have a backptr to the
vnic which it came from.
Now that L2 filters can be re-used for an n-tuple filter(s), delete
L2 filter as well so the reference count of an L2 filter (if reused)
can be decremented appropriately.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_filter.h | 4 ++++
drivers/net/bnxt/bnxt_flow.c | 20 +++++++++-----------
drivers/net/bnxt/bnxt_hwrm.c | 20 +++++++++++++++-----
3 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_filter.h b/drivers/net/bnxt/bnxt_filter.h
index 9db3e74877..fc40f112ba 100644
--- a/drivers/net/bnxt/bnxt_filter.h
+++ b/drivers/net/bnxt/bnxt_filter.h
@@ -77,6 +77,10 @@ struct bnxt_filter_info {
uint16_t ip_addr_type;
uint16_t ethertype;
uint32_t priority;
+ /* Backptr to vnic. As of now, used only by an L2 filter
+ * to remember which vnic it was created on
+ */
+ struct bnxt_vnic_info *vnic;
};
struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 98b1f27bbd..2293de2c37 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -746,10 +746,9 @@ bnxt_find_matching_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
{
struct bnxt_filter_info *mf, *f0;
struct bnxt_vnic_info *vnic0;
- struct rte_flow *flow;
int i;
- vnic0 = &bp->vnic_info[0];
+ vnic0 = BNXT_GET_DEFAULT_VNIC(bp);
f0 = STAILQ_FIRST(&vnic0->filter);
/* This flow has same DST MAC as the port/l2 filter. */
@@ -762,8 +761,7 @@ bnxt_find_matching_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
if (vnic->fw_vnic_id == INVALID_VNIC_ID)
continue;
- STAILQ_FOREACH(flow, &vnic->flow_list, next) {
- mf = flow->filter;
+ STAILQ_FOREACH(mf, &vnic->filter, next) {
if (mf->matching_l2_fltr_ptr)
continue;
@@ -798,6 +796,8 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
if (filter1 == NULL)
return NULL;
+ memcpy(filter1, nf, sizeof(*filter1));
+
filter1->flags = HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE;
filter1->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX;
if (nf->valid_flags & BNXT_FLOW_L2_SRC_VALID_FLAG ||
@@ -880,11 +880,14 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
l2_filter = bnxt_find_matching_l2_filter(bp, nf);
if (l2_filter) {
l2_filter->l2_ref_cnt++;
- nf->matching_l2_fltr_ptr = l2_filter;
} else {
l2_filter = bnxt_create_l2_filter(bp, nf, vnic);
- nf->matching_l2_fltr_ptr = NULL;
+ if (l2_filter) {
+ STAILQ_INSERT_TAIL(&vnic->filter, l2_filter, next);
+ l2_filter->vnic = vnic;
+ }
}
+ nf->matching_l2_fltr_ptr = l2_filter;
return l2_filter;
}
@@ -1429,11 +1432,6 @@ vnic_found:
goto ret;
}
- if (filter1 && !filter->matching_l2_fltr_ptr) {
- bnxt_free_filter(bp, filter1);
- filter1->fw_l2_filter_id = -1;
- }
-
done:
act = bnxt_flow_non_void_action(++act);
if (act->type != RTE_FLOW_ACTION_TYPE_END) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7628ae9402..3319dee6a1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -363,10 +363,11 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid,
}
int bnxt_hwrm_clear_l2_filter(struct bnxt *bp,
- struct bnxt_filter_info *filter)
+ struct bnxt_filter_info *filter)
{
int rc = 0;
struct bnxt_filter_info *l2_filter = filter;
+ struct bnxt_vnic_info *vnic = NULL;
struct hwrm_cfa_l2_filter_free_input req = {.req_type = 0 };
struct hwrm_cfa_l2_filter_free_output *resp = bp->hwrm_cmd_resp_addr;
@@ -379,6 +380,9 @@ int bnxt_hwrm_clear_l2_filter(struct bnxt *bp,
PMD_DRV_LOG(DEBUG, "filter: %p l2_filter: %p ref_cnt: %d\n",
filter, l2_filter, l2_filter->l2_ref_cnt);
+ if (l2_filter->l2_ref_cnt == 0)
+ return 0;
+
if (l2_filter->l2_ref_cnt > 0)
l2_filter->l2_ref_cnt--;
@@ -395,6 +399,14 @@ int bnxt_hwrm_clear_l2_filter(struct bnxt *bp,
HWRM_UNLOCK();
filter->fw_l2_filter_id = UINT64_MAX;
+ if (l2_filter->l2_ref_cnt == 0) {
+ vnic = l2_filter->vnic;
+ if (vnic) {
+ STAILQ_REMOVE(&vnic->filter, l2_filter,
+ bnxt_filter_info, next);
+ bnxt_free_filter(bp, l2_filter);
+ }
+ }
return 0;
}
@@ -2489,8 +2501,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
rc = bnxt_hwrm_clear_em_filter(bp, filter);
else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
- else
- rc = bnxt_hwrm_clear_l2_filter(bp, filter);
+ rc = bnxt_hwrm_clear_l2_filter(bp, filter);
STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
}
@@ -2512,8 +2523,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
rc = bnxt_hwrm_clear_em_filter(bp, filter);
else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
- else
- rc = bnxt_hwrm_clear_l2_filter(bp, filter);
+ rc = bnxt_hwrm_clear_l2_filter(bp, filter);
STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
rte_free(flow);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.011259089 +0000
+++ 0056-net-bnxt-fix-reusing-L2-filter.patch 2020-02-11 11:17:38.432001945 +0000
@@ -1,8 +1,10 @@
-From f0f6b5e6cf94e75cd419bb1bc37463bbc7884110 Mon Sep 17 00:00:00 2001
+From 00a5ed015b201325ba6f124da0052784fe7a0151 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 20 Dec 2019 18:29:41 -0800
Subject: [PATCH] net/bnxt: fix reusing L2 filter
+[ upstream commit f0f6b5e6cf94e75cd419bb1bc37463bbc7884110 ]
+
The software L2 filter was being released back to the free pool,
though it was created in HW and the filter corresponding to an actual
'flow' would have reference to the HW L2 filter.
@@ -17,7 +19,6 @@
can be decremented appropriately.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
-Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -43,7 +44,7 @@
struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 855994a6b0..2bd492ea33 100644
+index 98b1f27bbd..2293de2c37 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -746,10 +746,9 @@ bnxt_find_matching_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
@@ -107,7 +108,7 @@
act = bnxt_flow_non_void_action(++act);
if (act->type != RTE_FLOW_ACTION_TYPE_END) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index bee4c154fd..8178213e5a 100644
+index 7628ae9402..3319dee6a1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -363,10 +363,11 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid,
@@ -148,7 +149,7 @@
return 0;
}
-@@ -2483,8 +2495,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -2489,8 +2501,7 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
rc = bnxt_hwrm_clear_em_filter(bp, filter);
else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
@@ -158,7 +159,7 @@
STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
}
-@@ -2506,8 +2517,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -2512,8 +2523,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
rc = bnxt_hwrm_clear_em_filter(bp, filter);
else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix overwriting error message' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (54 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix reusing L2 filter' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix crash when meter action conf is null' " luca.boccassi
` (132 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d82523e5dc9bbeb10702682401cbb2fcd2bb4128 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 20 Dec 2019 18:42:18 -0800
Subject: [PATCH] net/bnxt: fix overwriting error message
[ upstream commit 88d57889c9f8034e5075a299e4300a862da6449a ]
In some cases when flow creation fails, we overwrite the specific
error message with a generic error message. This patch fixes it.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 2293de2c37..c694367300 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1455,7 +1455,7 @@ ret:
if (rxq && !vnic->rx_queue_cnt)
rxq->vnic = &bp->vnic_info[0];
}
- return rc;
+ return -rte_errno;
}
static
@@ -1775,7 +1775,7 @@ free_flow:
rte_flow_error_set(error, 0,
RTE_FLOW_ERROR_TYPE_NONE, NULL,
"Flow with pattern exists, updating destination queue");
- else
+ else if (!rte_errno)
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"Failed to create flow.");
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.044527327 +0000
+++ 0057-net-bnxt-fix-overwriting-error-message.patch 2020-02-11 11:17:38.436002020 +0000
@@ -1,13 +1,14 @@
-From 88d57889c9f8034e5075a299e4300a862da6449a Mon Sep 17 00:00:00 2001
+From d82523e5dc9bbeb10702682401cbb2fcd2bb4128 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 20 Dec 2019 18:42:18 -0800
Subject: [PATCH] net/bnxt: fix overwriting error message
+[ upstream commit 88d57889c9f8034e5075a299e4300a862da6449a ]
+
In some cases when flow creation fails, we overwrite the specific
error message with a generic error message. This patch fixes it.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
-Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
@@ -16,10 +17,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 707aedcec7..cde1fa41c4 100644
+index 2293de2c37..c694367300 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1485,7 +1485,7 @@ ret:
+@@ -1455,7 +1455,7 @@ ret:
if (rxq && !vnic->rx_queue_cnt)
rxq->vnic = &bp->vnic_info[0];
}
@@ -28,7 +29,7 @@
}
static
-@@ -1815,7 +1815,7 @@ free_flow:
+@@ -1775,7 +1775,7 @@ free_flow:
rte_flow_error_set(error, 0,
RTE_FLOW_ERROR_TYPE_NONE, NULL,
"Flow with pattern exists, updating destination queue");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix crash when meter action conf is null' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (55 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix overwriting error message' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: fix loop limit' " luca.boccassi
` (131 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Tonghao Zhang; +Cc: Suanming Mou, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4eecbd58009e2c6c2ebcd983a244a51b1b9aac41 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Fri, 13 Dec 2019 22:21:34 +0800
Subject: [PATCH] net/mlx5: fix crash when meter action conf is null
[ upstream commit 4f19f4140e058c92822f228dcdc55c44bd88b613 ]
When offloading the meter, should check the action
conf and make sure it is valid.
Fixes: f46bf7488705 ("net/mlx5: support meter flow action")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Suanming Mou <suanmingm@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e50d40040b..baf617aaa6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3402,7 +3402,12 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,
{
struct mlx5_priv *priv = dev->data->dev_private;
const struct rte_flow_action_meter *am = action->conf;
- struct mlx5_flow_meter *fm = mlx5_flow_meter_find(priv, am->mtr_id);
+ struct mlx5_flow_meter *fm;
+
+ if (!am)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+ "meter action conf is NULL");
if (action_flags & MLX5_FLOW_ACTION_METER)
return rte_flow_error_set(error, ENOTSUP,
@@ -3417,6 +3422,7 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
"meter action not supported");
+ fm = mlx5_flow_meter_find(priv, am->mtr_id);
if (!fm)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.073083208 +0000
+++ 0058-net-mlx5-fix-crash-when-meter-action-conf-is-null.patch 2020-02-11 11:17:38.440002095 +0000
@@ -1,13 +1,14 @@
-From 4f19f4140e058c92822f228dcdc55c44bd88b613 Mon Sep 17 00:00:00 2001
+From 4eecbd58009e2c6c2ebcd983a244a51b1b9aac41 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Fri, 13 Dec 2019 22:21:34 +0800
Subject: [PATCH] net/mlx5: fix crash when meter action conf is null
+[ upstream commit 4f19f4140e058c92822f228dcdc55c44bd88b613 ]
+
When offloading the meter, should check the action
conf and make sure it is valid.
Fixes: f46bf7488705 ("net/mlx5: support meter flow action")
-Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Suanming Mou <suanmingm@mellanox.com>
@@ -16,7 +17,7 @@
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 4c162816e4..5bd1b1cdb7 100644
+index e50d40040b..baf617aaa6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3402,7 +3402,12 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice/base: fix loop limit' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (56 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix crash when meter action conf is null' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: increase PF reset wait timeout' " luca.boccassi
` (130 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Qi Zhang; +Cc: Dan Nowlin, Paul M Stillwell Jr, Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 98f22480010249f4bc20c8e8bfad0c0dee201ba5 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 6 Jan 2020 11:38:46 +0800
Subject: [PATCH] net/ice/base: fix loop limit
[ upstream commit c2915d3f8a077d72d359464369d220d7da71e6e0 ]
In ice_prot_type_to_id routine, correct the loop limit check
to use ARRAY_SIZE instead of looking for the array element to
have a specific value.
Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@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 afa4fe30d4..621fcfb370 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4748,7 +4748,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u16 *id)
{
u16 i;
- for (i = 0; ice_prot_id_tbl[i].type != ICE_PROTOCOL_LAST; i++)
+ for (i = 0; i < ARRAY_SIZE(ice_prot_id_tbl); i++)
if (ice_prot_id_tbl[i].type == type) {
*id = ice_prot_id_tbl[i].protocol_id;
return true;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.107806551 +0000
+++ 0059-net-ice-base-fix-loop-limit.patch 2020-02-11 11:17:38.448002244 +0000
@@ -1,14 +1,15 @@
-From c2915d3f8a077d72d359464369d220d7da71e6e0 Mon Sep 17 00:00:00 2001
+From 98f22480010249f4bc20c8e8bfad0c0dee201ba5 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 6 Jan 2020 11:38:46 +0800
Subject: [PATCH] net/ice/base: fix loop limit
+[ upstream commit c2915d3f8a077d72d359464369d220d7da71e6e0 ]
+
In ice_prot_type_to_id routine, correct the loop limit check
to use ARRAY_SIZE instead of looking for the array element to
have a specific value.
Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
-Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,10 +20,10 @@
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 3ed84ca016..b2945a9e2e 100644
+index afa4fe30d4..621fcfb370 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
-@@ -4880,7 +4880,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u16 *id)
+@@ -4748,7 +4748,7 @@ static bool ice_prot_type_to_id(enum ice_protocol_type type, u16 *id)
{
u16 i;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice/base: increase PF reset wait timeout' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (57 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: fix loop limit' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/af_xdp: fix redundant check for wakeup need' " luca.boccassi
` (129 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Qi Zhang; +Cc: Jacob Keller, Paul M Stillwell Jr, Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6f74d76c254d2f8d92a6a27e198dd8987e080da4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 6 Jan 2020 11:38:47 +0800
Subject: [PATCH] net/ice/base: increase PF reset wait timeout
[ upstream commit 54cf696d5a9730b6c42813135bf35499e92c3b42 ]
Increase the maximum time that the driver will wait for a PF reset
from 200 milliseconds to 300 milliseconds, to account for possibility
of a slightly longer than expected PF reset.
Fixes: 453d087ccaff ("net/ice/base: add common functions")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@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 4ba3ab2028..2646a96321 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -9,7 +9,7 @@
#include "ice_flow.h"
#include "ice_switch.h"
-#define ICE_PF_RESET_WAIT_COUNT 200
+#define ICE_PF_RESET_WAIT_COUNT 300
/**
* ice_set_mac_type - Sets MAC type
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.140923305 +0000
+++ 0060-net-ice-base-increase-PF-reset-wait-timeout.patch 2020-02-11 11:17:38.452002319 +0000
@@ -1,14 +1,15 @@
-From 54cf696d5a9730b6c42813135bf35499e92c3b42 Mon Sep 17 00:00:00 2001
+From 6f74d76c254d2f8d92a6a27e198dd8987e080da4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 6 Jan 2020 11:38:47 +0800
Subject: [PATCH] net/ice/base: increase PF reset wait timeout
+[ upstream commit 54cf696d5a9730b6c42813135bf35499e92c3b42 ]
+
Increase the maximum time that the driver will wait for a PF reset
from 200 milliseconds to 300 milliseconds, to account for possibility
of a slightly longer than expected PF reset.
Fixes: 453d087ccaff ("net/ice/base: add common functions")
-Cc: stable@dpdk.org
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,7 +20,7 @@
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 319b00f759..2e756f542b 100644
+index 4ba3ab2028..2646a96321 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -9,7 +9,7 @@
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: fix redundant check for wakeup need' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (58 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: increase PF reset wait timeout' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/vhost_blk: check unused value on init' " luca.boccassi
` (128 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiao Wang; +Cc: Ciara Loftus, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a0be896b85d0150b859e94e9f23a1b7c33a74b1a Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 6 Jan 2020 09:09:40 -0500
Subject: [PATCH] net/af_xdp: fix redundant check for wakeup need
[ upstream commit fdf69a8179245b01de3a736938166331487f4257 ]
Function kick_tx() has built-in detection on NEED_WAKEUP flag, so just
call it directly, like elsewhere in the driver.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 2b1245ee4f..d903e6c28a 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -480,10 +480,7 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
tx_bytes += mbuf->pkt_len;
}
-#if defined(XDP_USE_NEED_WAKEUP)
- if (xsk_ring_prod__needs_wakeup(&txq->tx))
-#endif
- kick_tx(txq);
+ kick_tx(txq);
out:
xsk_ring_prod__submit(&txq->tx, count);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.172328033 +0000
+++ 0061-net-af_xdp-fix-redundant-check-for-wakeup-need.patch 2020-02-11 11:17:38.452002319 +0000
@@ -1,13 +1,14 @@
-From fdf69a8179245b01de3a736938166331487f4257 Mon Sep 17 00:00:00 2001
+From a0be896b85d0150b859e94e9f23a1b7c33a74b1a Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 6 Jan 2020 09:09:40 -0500
Subject: [PATCH] net/af_xdp: fix redundant check for wakeup need
+[ upstream commit fdf69a8179245b01de3a736938166331487f4257 ]
+
Function kick_tx() has built-in detection on NEED_WAKEUP flag, so just
call it directly, like elsewhere in the driver.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/vhost_blk: check unused value on init' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (59 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/af_xdp: fix redundant check for wakeup need' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/vhost: check creation failure' " luca.boccassi
` (127 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Jin Yu; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 03c8853b61ad30605e35de066a9a2176f11891df Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 27 Nov 2019 20:16:58 +0800
Subject: [PATCH] examples/vhost_blk: check unused value on init
[ upstream commit 1da2925f1994a54fdedb521b205b4ebff146d0df ]
Add the assert to handle error.
Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
examples/vhost_blk/vhost_blk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3182a488bb..e1036bf3a6 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -856,6 +856,7 @@ new_device(int vid)
ctrlr->bdev->vid, i,
&blk_vq->last_avail_idx,
&blk_vq->last_used_idx);
+ assert(ret == 0);
blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
(1 << 15);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.200126058 +0000
+++ 0062-examples-vhost_blk-check-unused-value-on-init.patch 2020-02-11 11:17:38.452002319 +0000
@@ -1,13 +1,14 @@
-From 1da2925f1994a54fdedb521b205b4ebff146d0df Mon Sep 17 00:00:00 2001
+From 03c8853b61ad30605e35de066a9a2176f11891df Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 27 Nov 2019 20:16:58 +0800
Subject: [PATCH] examples/vhost_blk: check unused value on init
+[ upstream commit 1da2925f1994a54fdedb521b205b4ebff146d0df ]
+
Add the assert to handle error.
Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
-Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: check creation failure' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (60 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/vhost_blk: check unused value on init' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " luca.boccassi
` (126 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 7 Jan 2020 11:25:48 +0800
Subject: [PATCH] net/vhost: check creation failure
[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ]
The function eth_dev_vhost_create() could return errors,
the return value need to be checked.
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/vhost/rte_eth_vhost.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 46f01a7f46..a63588986f 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1302,7 +1302,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
}
rte_eth_dev_probing_finish(eth_dev);
- return data->port_id;
+ return 0;
error:
if (internal) {
@@ -1455,8 +1455,10 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
if (dev->device.numa_node == SOCKET_ID_ANY)
dev->device.numa_node = rte_socket_id();
- eth_dev_vhost_create(dev, iface_name, queues, dev->device.numa_node,
- flags, disable_flags);
+ ret = eth_dev_vhost_create(dev, iface_name, queues,
+ dev->device.numa_node, flags, disable_flags);
+ if (ret == -1)
+ VHOST_LOG(ERR, "Failed to create %s\n", name);
out_free:
rte_kvargs_free(kvlist);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.227581606 +0000
+++ 0063-net-vhost-check-creation-failure.patch 2020-02-11 11:17:38.456002394 +0000
@@ -1,13 +1,14 @@
-From f04513bc89d90c2ad425f1be1e4716bb3c790fb2 Mon Sep 17 00:00:00 2001
+From 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 7 Jan 2020 11:25:48 +0800
Subject: [PATCH] net/vhost: check creation failure
+[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ]
+
The function eth_dev_vhost_create() could return errors,
the return value need to be checked.
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
-Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (61 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/vhost: check creation failure' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix socket initial value' " luca.boccassi
` (125 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8991c00f7b7237636bf91277ebb4cb0a16f4a8b9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 6 Jan 2020 11:18:37 -0800
Subject: [PATCH] net/virtio-user: check file descriptor before closing
[ upstream commit b56c12acf20585ad46faf9455b4b9aeb30450ef0 ]
Valgrind complains that virtio_user is calling close(-1).
Fix this by adding check in virtio that is similar to existing code.
Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index ea016e85d8..ffbaa75b7e 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -537,7 +537,8 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
close(dev->kickfds[i]);
}
- close(dev->vhostfd);
+ if (dev->vhostfd >= 0)
+ close(dev->vhostfd);
if (dev->is_server && dev->listenfd >= 0) {
close(dev->listenfd);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.255809396 +0000
+++ 0064-net-virtio-user-check-file-descriptor-before-closing.patch 2020-02-11 11:17:38.456002394 +0000
@@ -1,13 +1,14 @@
-From b56c12acf20585ad46faf9455b4b9aeb30450ef0 Mon Sep 17 00:00:00 2001
+From 8991c00f7b7237636bf91277ebb4cb0a16f4a8b9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 6 Jan 2020 11:18:37 -0800
Subject: [PATCH] net/virtio-user: check file descriptor before closing
+[ upstream commit b56c12acf20585ad46faf9455b4b9aeb30450ef0 ]
+
Valgrind complains that virtio_user is calling close(-1).
Fix this by adding check in virtio that is similar to existing code.
Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: fix socket initial value' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (62 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix VF configuration' " luca.boccassi
` (124 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiao Wang; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5bdd1200fe0ab184083f77f2976690a1437e935d Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Fri, 3 Jan 2020 13:36:21 -0500
Subject: [PATCH] vhost: fix socket initial value
[ upstream commit bf4fd5ba3e2edfe68888e83aef81f681756fc692 ]
By default, a vhost socket is created without attaching VDPA device,
this patch fixes the initial value of vdpa_dev_id.
Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/socket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index ebb2ff6c28..834f0b88ad 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -877,6 +877,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
"error: failed to init connection mutex\n");
goto out_free;
}
+ vsocket->vdpa_dev_id = -1;
vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
vsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;
vsocket->linearbuf = flags & RTE_VHOST_USER_LINEARBUF_SUPPORT;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.283950005 +0000
+++ 0065-vhost-fix-socket-initial-value.patch 2020-02-11 11:17:38.456002394 +0000
@@ -1,13 +1,14 @@
-From bf4fd5ba3e2edfe68888e83aef81f681756fc692 Mon Sep 17 00:00:00 2001
+From 5bdd1200fe0ab184083f77f2976690a1437e935d Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Fri, 3 Jan 2020 13:36:21 -0500
Subject: [PATCH] vhost: fix socket initial value
+[ upstream commit bf4fd5ba3e2edfe68888e83aef81f681756fc692 ]
+
By default, a vhost socket is created without attaching VDPA device,
this patch fixes the initial value of vdpa_dev_id.
Fixes: b4953225cea4 ("vhost: add APIs for datapath configuration")
-Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -16,7 +17,7 @@
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index ece9d5d1d8..8bc1e3a03c 100644
+index ebb2ff6c28..834f0b88ad 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -877,6 +877,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix VF configuration' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (63 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix socket initial value' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix getting supported packet types' " luca.boccassi
` (123 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e805fd4aed7ec57fc9f37d233a3045dab2608ba0 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 2 Dec 2019 14:41:15 +0000
Subject: [PATCH] net/octeontx2: fix VF configuration
[ upstream commit d059dba51d7c9b7ba13c20fc5070a329a50451ad ]
Returning -ENOTSUP only in case loopback mode is enabled and
device is VF or SDP.
Fixes: c2c0aa75cd01 ("net/octeontx2: fix loopback config return for VF")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index ed329273dc..43c6107a80 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -204,7 +204,7 @@ cgx_intlbk_enable(struct otx2_eth_dev *dev, bool en)
{
struct otx2_mbox *mbox = dev->mbox;
- if (otx2_dev_is_vf_or_sdp(dev))
+ if (en && otx2_dev_is_vf_or_sdp(dev))
return -ENOTSUP;
if (en)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.311928479 +0000
+++ 0066-net-octeontx2-fix-VF-configuration.patch 2020-02-11 11:17:38.460002469 +0000
@@ -1,13 +1,14 @@
-From d059dba51d7c9b7ba13c20fc5070a329a50451ad Mon Sep 17 00:00:00 2001
+From e805fd4aed7ec57fc9f37d233a3045dab2608ba0 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 2 Dec 2019 14:41:15 +0000
Subject: [PATCH] net/octeontx2: fix VF configuration
+[ upstream commit d059dba51d7c9b7ba13c20fc5070a329a50451ad ]
+
Returning -ENOTSUP only in case loopback mode is enabled and
device is VF or SDP.
Fixes: c2c0aa75cd01 ("net/octeontx2: fix loopback config return for VF")
-Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix getting supported packet types' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (64 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix VF configuration' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " luca.boccassi
` (122 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a691fd0281c5683c39b19df1bc9a9d6df0ac6aaf Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 12 Dec 2019 17:58:56 +0000
Subject: [PATCH] net/octeontx2: fix getting supported packet types
[ upstream commit 348123a3df8c679b2fcf56ec767c2bc319ec8bf9 ]
Setting up supported ptypes using testpmd command is failing
because supported_ptypes_get callback will never return ptypes
supported, as NIX_RX_OFFLOAD_PTYPE_F bit in rx_offload_flags
is zero by default in testpmd.
Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_lookup.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
index bcf2ff4e8f..5685571166 100644
--- a/drivers/net/octeontx2/otx2_lookup.c
+++ b/drivers/net/octeontx2/otx2_lookup.c
@@ -17,7 +17,7 @@
const uint32_t *
otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
{
- struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+ RTE_SET_USED(eth_dev);
static const uint32_t ptypes[] = {
RTE_PTYPE_L2_ETHER_QINQ, /* LB */
@@ -56,10 +56,7 @@ otx2_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev)
RTE_PTYPE_UNKNOWN,
};
- if (dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)
- return ptypes;
- else
- return NULL;
+ return ptypes;
}
int
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.340359542 +0000
+++ 0067-net-octeontx2-fix-getting-supported-packet-types.patch 2020-02-11 11:17:38.460002469 +0000
@@ -1,15 +1,16 @@
-From 348123a3df8c679b2fcf56ec767c2bc319ec8bf9 Mon Sep 17 00:00:00 2001
+From a691fd0281c5683c39b19df1bc9a9d6df0ac6aaf Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Thu, 12 Dec 2019 17:58:56 +0000
Subject: [PATCH] net/octeontx2: fix getting supported packet types
+[ upstream commit 348123a3df8c679b2fcf56ec767c2bc319ec8bf9 ]
+
Setting up supported ptypes using testpmd command is failing
because supported_ptypes_get callback will never return ptypes
supported, as NIX_RX_OFFLOAD_PTYPE_F bit in rx_offload_flags
is zero by default in testpmd.
Fixes: d2706e15e6fb ("net/octeontx2: support reduced set of packet types")
-Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix buffer address' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (65 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix getting supported packet types' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix missing link modes' " luca.boccassi
` (121 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Piotr Azarewicz, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3a6ea0b2ba066019b2978fe5466bdeedb2e3efc0 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:15 +0800
Subject: [PATCH] net/i40e/base: fix buffer address
[ upstream commit 8f33cbcfa17bd578c7c614981ef574b33e09af72 ]
The high 32-bits were being set incorrectly in the 'Set Local LLDP MIB'
AQ command (0x0A08). Change it to use the right macro to get the correct
bits.
Fixes: 1fa6324ad30b ("i40e/base: add new interfaces")
Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 37911a99e5..356c2da581 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4300,7 +4300,7 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,
cmd->type = mib_type;
cmd->length = CPU_TO_LE16(buff_size);
- cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((u64)buff));
+ cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buff));
cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buff));
status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.367233380 +0000
+++ 0068-net-i40e-base-fix-buffer-address.patch 2020-02-11 11:17:38.464002544 +0000
@@ -1,14 +1,15 @@
-From 8f33cbcfa17bd578c7c614981ef574b33e09af72 Mon Sep 17 00:00:00 2001
+From 3a6ea0b2ba066019b2978fe5466bdeedb2e3efc0 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:15 +0800
Subject: [PATCH] net/i40e/base: fix buffer address
+[ upstream commit 8f33cbcfa17bd578c7c614981ef574b33e09af72 ]
+
The high 32-bits were being set incorrectly in the 'Set Local LLDP MIB'
AQ command (0x0A08). Change it to use the right macro to get the correct
bits.
Fixes: 1fa6324ad30b ("i40e/base: add new interfaces")
-Cc: stable@dpdk.org
Signed-off-by: Piotr Azarewicz <piotr.azarewicz@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -19,10 +20,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index cee6de2a80..0b26f86c55 100644
+index 37911a99e5..356c2da581 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
-@@ -4311,7 +4311,7 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,
+@@ -4300,7 +4300,7 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,
cmd->type = mib_type;
cmd->length = CPU_TO_LE16(buff_size);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix missing link modes' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (66 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " luca.boccassi
` (120 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Martyna Szapar, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 70fb846ac96dd44b3ef57fdb80d560dc2c493fd9 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:26 +0800
Subject: [PATCH] net/i40e/base: fix missing link modes
[ upstream commit 1da546c397055a4e6b93f3868f345a6ee6c07e71 ]
Fix for missing "Supported link modes" and "Advertised link modes"
info in ethtool after changed speed on X722 devices with BASE-T PHY
with FW API version >= 1.7.
The same FW API version on X710 and X722 does not mean the same
feature set so the change was needed as mac type of the device
should also be checked instead of FW API version only.
Fixes: e8228f1a16b7 ("net/i40e/base: report supported link modes")
Signed-off-by: Martyna Szapar <martyna.szapar@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 356c2da581..9d4330f35e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2025,8 +2025,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
- if (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&
- hw->aq.api_min_ver >= 7) {
+ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
+ hw->mac.type != I40E_MAC_X722) {
__le32 tmp;
i40e_memcpy(&tmp, resp->link_type, sizeof(tmp),
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.403425897 +0000
+++ 0069-net-i40e-base-fix-missing-link-modes.patch 2020-02-11 11:17:38.472002693 +0000
@@ -1,8 +1,10 @@
-From 1da546c397055a4e6b93f3868f345a6ee6c07e71 Mon Sep 17 00:00:00 2001
+From 70fb846ac96dd44b3ef57fdb80d560dc2c493fd9 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:26 +0800
Subject: [PATCH] net/i40e/base: fix missing link modes
+[ upstream commit 1da546c397055a4e6b93f3868f345a6ee6c07e71 ]
+
Fix for missing "Supported link modes" and "Advertised link modes"
info in ethtool after changed speed on X722 devices with BASE-T PHY
with FW API version >= 1.7.
@@ -21,10 +23,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index f256651d70..e0028ac4dc 100644
+index 356c2da581..9d4330f35e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
-@@ -2043,8 +2043,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
+@@ -2025,8 +2025,8 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (67 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix missing link modes' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " luca.boccassi
` (119 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye
Cc: Doug Dziggel, Dariusz Chaberski, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a66d1b7e3fb5a70af1c9f289f40f753702fef6a8 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:30 +0800
Subject: [PATCH] net/i40e/base: fix Tx descriptors number
[ upstream commit 79bfe7808788c8a9fb7be87cb864dba2bcbab80d ]
The existing driver allows setting the number of TX descriptors
to the value that is indivisible by 32. This is not properly
supported by x710 hardware. The patch limits the number of TX
descriptors to the whole value of 32.
Fixes: 8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Dariusz Chaberski <dariuszx.chaberski@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 06863d772d..8c7fc4394a 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -79,8 +79,8 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
#define I40E_HI_BYTE(x) ((u8)(((x) >> 8) & 0xFF))
#define I40E_LO_BYTE(x) ((u8)((x) & 0xFF))
-/* Number of Transmit Descriptors must be a multiple of 8. */
-#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 8
+/* Number of Transmit Descriptors must be a multiple of 32. */
+#define I40E_REQ_TX_DESCRIPTOR_MULTIPLE 32
/* Number of Receive Descriptors must be a multiple of 32 if
* the number of descriptors is greater than 32.
*/
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.437481264 +0000
+++ 0070-net-i40e-base-fix-Tx-descriptors-number.patch 2020-02-11 11:17:38.476002768 +0000
@@ -1,15 +1,16 @@
-From 79bfe7808788c8a9fb7be87cb864dba2bcbab80d Mon Sep 17 00:00:00 2001
+From a66d1b7e3fb5a70af1c9f289f40f753702fef6a8 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:30 +0800
Subject: [PATCH] net/i40e/base: fix Tx descriptors number
+[ upstream commit 79bfe7808788c8a9fb7be87cb864dba2bcbab80d ]
+
The existing driver allows setting the number of TX descriptors
to the value that is indivisible by 32. This is not properly
supported by x710 hardware. The patch limits the number of TX
descriptors to the whole value of 32.
Fixes: 8db9e2a1b232 ("i40e: base driver")
-Cc: stable@dpdk.org
Signed-off-by: Doug Dziggel <douglas.a.dziggel@intel.com>
Signed-off-by: Dariusz Chaberski <dariuszx.chaberski@intel.com>
@@ -21,7 +22,7 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
-index 8d257e00af..f0e4b667aa 100644
+index 06863d772d..8c7fc4394a 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -79,8 +79,8 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix retrying logic' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (68 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix display of FEC settings' " luca.boccassi
` (118 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Marcin Formela, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ecf41e681c14248a01a6f1bc043d1201ecd3b9d6 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:37 +0800
Subject: [PATCH] net/i40e/base: fix retrying logic
[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ]
Fixed a bug where driver was breaking out of the loop and
reporting an error without retrying first.
Fixes: 466eec7d6b1a ("net/i40e/base: retry AQC to overcome IRCRead hangs")
Signed-off-by: Marcin Formela <marcin.formela@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9d4330f35e..95b96f70f6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1700,19 +1700,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
status = i40e_asq_send_command(hw, &desc, abilities,
abilities_size, cmd_details);
- if (status != I40E_SUCCESS)
- break;
-
- if (hw->aq.asq_last_status == I40E_AQ_RC_EIO) {
+ switch (hw->aq.asq_last_status) {
+ case I40E_AQ_RC_EIO:
status = I40E_ERR_UNKNOWN_PHY;
break;
- } else if (hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) {
+ case I40E_AQ_RC_EAGAIN:
i40e_msec_delay(1);
total_delay++;
status = I40E_ERR_TIMEOUT;
+ break;
+ /* also covers I40E_AQ_RC_OK */
+ default:
+ break;
}
- } while ((hw->aq.asq_last_status != I40E_AQ_RC_OK) &&
- (total_delay < max_delay));
+
+ } while ((hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) &&
+ (total_delay < max_delay));
if (status != I40E_SUCCESS)
return status;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.465753297 +0000
+++ 0071-net-i40e-base-fix-retrying-logic.patch 2020-02-11 11:17:38.480002843 +0000
@@ -1,8 +1,10 @@
-From 50126939c66692d5b74922e12a9bf0dacfb6618b Mon Sep 17 00:00:00 2001
+From ecf41e681c14248a01a6f1bc043d1201ecd3b9d6 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:37 +0800
Subject: [PATCH] net/i40e/base: fix retrying logic
+[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ]
+
Fixed a bug where driver was breaking out of the loop and
reporting an error without retrying first.
@@ -17,10 +19,10 @@
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index 4f87ec9fad..a37e70599d 100644
+index 9d4330f35e..95b96f70f6 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
-@@ -1714,19 +1714,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
+@@ -1700,19 +1700,22 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
status = i40e_asq_send_command(hw, &desc, abilities,
abilities_size, cmd_details);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: fix display of FEC settings' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (69 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: add new link speed constants' " luca.boccassi
` (117 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Jaroslaw Gawin, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c5ca0d7c74c90542bb481597b6d8abb2f3dd4294 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:39 +0800
Subject: [PATCH] net/i40e/base: fix display of FEC settings
[ upstream commit b330a1c5c639d636c5eb08226af1385b1ec9c13b ]
Fix display of FEC settings for ethtool.
This patch change variable 'phy.link_info.req_fec_info' sent to ethtool.
Without this patch wrong FEC settings can be shown.
Fixes: 1216fb9f0c8c ("net/i40e/base: store the requested FEC information")
Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 95b96f70f6..9c6609bfc0 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2886,9 +2886,16 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
- hw->phy.link_info.req_fec_info =
- abilities.fec_cfg_curr_mod_ext_info &
- (I40E_AQ_REQUEST_FEC_KR | I40E_AQ_REQUEST_FEC_RS);
+ if (abilities.fec_cfg_curr_mod_ext_info &
+ I40E_AQ_ENABLE_FEC_AUTO)
+ hw->phy.link_info.req_fec_info =
+ (I40E_AQ_REQUEST_FEC_KR |
+ I40E_AQ_REQUEST_FEC_RS);
+ else
+ hw->phy.link_info.req_fec_info =
+ abilities.fec_cfg_curr_mod_ext_info &
+ (I40E_AQ_REQUEST_FEC_KR |
+ I40E_AQ_REQUEST_FEC_RS);
i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type,
sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.499396291 +0000
+++ 0072-net-i40e-base-fix-display-of-FEC-settings.patch 2020-02-11 11:17:38.488002993 +0000
@@ -1,8 +1,10 @@
-From b330a1c5c639d636c5eb08226af1385b1ec9c13b Mon Sep 17 00:00:00 2001
+From c5ca0d7c74c90542bb481597b6d8abb2f3dd4294 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:39 +0800
Subject: [PATCH] net/i40e/base: fix display of FEC settings
+[ upstream commit b330a1c5c639d636c5eb08226af1385b1ec9c13b ]
+
Fix display of FEC settings for ethtool.
This patch change variable 'phy.link_info.req_fec_info' sent to ethtool.
Without this patch wrong FEC settings can be shown.
@@ -18,10 +20,10 @@
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index a37e70599d..9ad0dd654b 100644
+index 95b96f70f6..9c6609bfc0 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
-@@ -2911,9 +2911,16 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
+@@ -2886,9 +2886,16 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (status)
return status;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e/base: add new link speed constants' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (70 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix display of FEC settings' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: use ethernet copy API to do MAC assignment' " luca.boccassi
` (116 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Aleksandr Loktionov, Qi Zhang, Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f71205bc4516e06a26137ba5996e8be285f2e134 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:48 +0800
Subject: [PATCH] net/i40e/base: add new link speed constants
[ upstream commit 03ef7d47f7bbf441000691105bfd411aa6929a4b ]
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg
for 2.5Gb/5Gb speeds. This problem is fixed by adding constants
for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB.
Fixes: a58860f68929 ("net/i40e/base: use new virtchnl header file")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_prototype.h | 4 ++++
drivers/net/i40e/base/virtchnl.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 0cf006dadc..7e6ba3fd7a 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -496,6 +496,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
return VIRTCHNL_LINK_SPEED_100MB;
case I40E_LINK_SPEED_1GB:
return VIRTCHNL_LINK_SPEED_1GB;
+ case I40E_LINK_SPEED_2_5GB:
+ return VIRTCHNL_LINK_SPEED_2_5GB;
+ case I40E_LINK_SPEED_5GB:
+ return VIRTCHNL_LINK_SPEED_5GB;
case I40E_LINK_SPEED_10GB:
return VIRTCHNL_LINK_SPEED_10GB;
case I40E_LINK_SPEED_40GB:
diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 88096cb45c..0b6f55e49d 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -47,12 +47,14 @@ enum virtchnl_status_code {
VIRTCHNL_STATUS_NOT_SUPPORTED = -64,
};
+#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0
#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2
#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3
#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4
#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5
#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6
+#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7
enum virtchnl_link_speed {
VIRTCHNL_LINK_SPEED_UNKNOWN = 0,
@@ -62,6 +64,8 @@ enum virtchnl_link_speed {
VIRTCHNL_LINK_SPEED_40GB = BIT(VIRTCHNL_LINK_SPEED_40GB_SHIFT),
VIRTCHNL_LINK_SPEED_20GB = BIT(VIRTCHNL_LINK_SPEED_20GB_SHIFT),
VIRTCHNL_LINK_SPEED_25GB = BIT(VIRTCHNL_LINK_SPEED_25GB_SHIFT),
+ VIRTCHNL_LINK_SPEED_2_5GB = BIT(VIRTCHNL_LINK_SPEED_2_5GB_SHIFT),
+ VIRTCHNL_LINK_SPEED_5GB = BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT),
};
/* for hsplit_0 field of Rx HMC context */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.533076868 +0000
+++ 0073-net-i40e-base-add-new-link-speed-constants.patch 2020-02-11 11:17:38.492003067 +0000
@@ -1,8 +1,10 @@
-From 03ef7d47f7bbf441000691105bfd411aa6929a4b Mon Sep 17 00:00:00 2001
+From f71205bc4516e06a26137ba5996e8be285f2e134 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:48 +0800
Subject: [PATCH] net/i40e/base: add new link speed constants
+[ upstream commit 03ef7d47f7bbf441000691105bfd411aa6929a4b ]
+
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg
for 2.5Gb/5Gb speeds. This problem is fixed by adding constants
for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB.
@@ -19,10 +21,10 @@
2 files changed, 8 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
-index 0f06e3262b..d8ab3ea0a4 100644
+index 0cf006dadc..7e6ba3fd7a 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
-@@ -505,6 +505,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
+@@ -496,6 +496,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
return VIRTCHNL_LINK_SPEED_100MB;
case I40E_LINK_SPEED_1GB:
return VIRTCHNL_LINK_SPEED_1GB;
@@ -34,12 +36,12 @@
return VIRTCHNL_LINK_SPEED_10GB;
case I40E_LINK_SPEED_40GB:
diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
-index c613d47616..92515bf340 100644
+index 88096cb45c..0b6f55e49d 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
-@@ -53,12 +53,14 @@ enum virtchnl_status_code {
- #define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
- #define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
+@@ -47,12 +47,14 @@ enum virtchnl_status_code {
+ VIRTCHNL_STATUS_NOT_SUPPORTED = -64,
+ };
+#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0
#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
@@ -52,7 +54,7 @@
enum virtchnl_link_speed {
VIRTCHNL_LINK_SPEED_UNKNOWN = 0,
-@@ -68,6 +70,8 @@ enum virtchnl_link_speed {
+@@ -62,6 +64,8 @@ enum virtchnl_link_speed {
VIRTCHNL_LINK_SPEED_40GB = BIT(VIRTCHNL_LINK_SPEED_40GB_SHIFT),
VIRTCHNL_LINK_SPEED_20GB = BIT(VIRTCHNL_LINK_SPEED_20GB_SHIFT),
VIRTCHNL_LINK_SPEED_25GB = BIT(VIRTCHNL_LINK_SPEED_25GB_SHIFT),
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: use ethernet copy API to do MAC assignment' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (71 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: add new link speed constants' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix Tx burst routines set' " luca.boccassi
` (115 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Qiming Yang, Xiaolong Ye, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 61373f54b977c3b740608362c06acba64a9a75f6 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Mon, 13 Jan 2020 16:22:21 +0800
Subject: [PATCH] net/ice: use ethernet copy API to do MAC assignment
[ upstream commit c7c5e2621077bce4222868d910293eb7ec19431e ]
Use the API rte_ether_addr_copy to do MAC assignment, instead of
calling rte_memcpy function directly.
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 8b34ed9c71..94a8277688 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -870,7 +870,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
ret = -ENOMEM;
goto DONE;
}
- rte_memcpy(&f->mac_info.mac_addr, mac_addr, ETH_ADDR_LEN);
+ rte_ether_addr_copy(mac_addr, &f->mac_info.mac_addr);
TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
vsi->mac_num++;
@@ -1658,16 +1658,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
if (type == ICE_VSI_PF) {
/* MAC configuration */
- rte_memcpy(pf->dev_addr.addr_bytes,
- hw->port_info->mac.perm_addr,
- ETH_ADDR_LEN);
+ rte_ether_addr_copy((struct rte_ether_addr *)
+ hw->port_info->mac.perm_addr,
+ &pf->dev_addr);
- rte_memcpy(&mac_addr, &pf->dev_addr, RTE_ETHER_ADDR_LEN);
+ rte_ether_addr_copy(&pf->dev_addr, &mac_addr);
ret = ice_add_mac_filter(vsi, &mac_addr);
if (ret != ICE_SUCCESS)
PMD_INIT_LOG(ERR, "Failed to add dflt MAC filter");
- rte_memcpy(&mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
+ rte_ether_addr_copy(&broadcast, &mac_addr);
ret = ice_add_mac_filter(vsi, &mac_addr);
if (ret != ICE_SUCCESS)
PMD_INIT_LOG(ERR, "Failed to add MAC filter");
@@ -3265,7 +3265,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "Failed to add mac filter");
return -EIO;
}
- memcpy(&pf->dev_addr, mac_addr, ETH_ADDR_LEN);
+ rte_ether_addr_copy(mac_addr, &pf->dev_addr);
flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL;
ret = ice_aq_manage_mac_write(hw, mac_addr->addr_bytes, flags, NULL);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.561229347 +0000
+++ 0074-net-ice-use-ethernet-copy-API-to-do-MAC-assignment.patch 2020-02-11 11:17:38.496003142 +0000
@@ -1,13 +1,14 @@
-From c7c5e2621077bce4222868d910293eb7ec19431e Mon Sep 17 00:00:00 2001
+From 61373f54b977c3b740608362c06acba64a9a75f6 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Mon, 13 Jan 2020 16:22:21 +0800
Subject: [PATCH] net/ice: use ethernet copy API to do MAC assignment
+[ upstream commit c7c5e2621077bce4222868d910293eb7ec19431e ]
+
Use the API rte_ether_addr_copy to do MAC assignment, instead of
calling rte_memcpy function directly.
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
-Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
@@ -18,10 +19,10 @@
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index 88cd906603..6b344cb6e5 100644
+index 8b34ed9c71..94a8277688 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
-@@ -875,7 +875,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
+@@ -870,7 +870,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
ret = -ENOMEM;
goto DONE;
}
@@ -30,7 +31,7 @@
TAILQ_INSERT_TAIL(&vsi->mac_list, f, next);
vsi->mac_num++;
-@@ -1663,16 +1663,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
+@@ -1658,16 +1658,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
if (type == ICE_VSI_PF) {
/* MAC configuration */
@@ -52,7 +53,7 @@
ret = ice_add_mac_filter(vsi, &mac_addr);
if (ret != ICE_SUCCESS)
PMD_INIT_LOG(ERR, "Failed to add MAC filter");
-@@ -3270,7 +3270,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
+@@ -3265,7 +3265,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR, "Failed to add mac filter");
return -EIO;
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix Tx burst routines set' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (72 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: use ethernet copy API to do MAC assignment' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " luca.boccassi
` (114 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7a68ecc7625c7eeaee0adba374235a972320be47 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 11:07:35 +0000
Subject: [PATCH] net/mlx5: fix Tx burst routines set
[ upstream commit 7fcd4e55d9939a29636db1c35ee9864c10debf61 ]
The tx_burst routine supporting multi-segment packets with
legacy MPW and without inline was missed, and there was no
valid selection for these options, patch adds the missing
routine.
Fixes: 82e75f8323bf ("net/mlx5: fix legacy multi-packet Tx descriptors")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index acf0fd794b..b4702ff9f6 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -4995,6 +4995,10 @@ MLX5_TXOFF_DECL(mci_mpw,
MLX5_TXOFF_CONFIG_INLINE | MLX5_TXOFF_CONFIG_EMPW |
MLX5_TXOFF_CONFIG_MPW)
+MLX5_TXOFF_DECL(mc_mpw,
+ MLX5_TXOFF_CONFIG_MULTI | MLX5_TXOFF_CONFIG_CSUM |
+ MLX5_TXOFF_CONFIG_EMPW | MLX5_TXOFF_CONFIG_MPW)
+
MLX5_TXOFF_DECL(i_mpw,
MLX5_TXOFF_CONFIG_INLINE | MLX5_TXOFF_CONFIG_EMPW |
MLX5_TXOFF_CONFIG_MPW)
@@ -5151,6 +5155,10 @@ MLX5_TXOFF_INFO(mci_mpw,
MLX5_TXOFF_CONFIG_INLINE | MLX5_TXOFF_CONFIG_EMPW |
MLX5_TXOFF_CONFIG_MPW)
+MLX5_TXOFF_INFO(mc_mpw,
+ MLX5_TXOFF_CONFIG_MULTI | MLX5_TXOFF_CONFIG_CSUM |
+ MLX5_TXOFF_CONFIG_EMPW | MLX5_TXOFF_CONFIG_MPW)
+
MLX5_TXOFF_INFO(i_mpw,
MLX5_TXOFF_CONFIG_INLINE | MLX5_TXOFF_CONFIG_EMPW |
MLX5_TXOFF_CONFIG_MPW)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.591637284 +0000
+++ 0075-net-mlx5-fix-Tx-burst-routines-set.patch 2020-02-11 11:17:38.496003142 +0000
@@ -1,15 +1,16 @@
-From 7fcd4e55d9939a29636db1c35ee9864c10debf61 Mon Sep 17 00:00:00 2001
+From 7a68ecc7625c7eeaee0adba374235a972320be47 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 11:07:35 +0000
Subject: [PATCH] net/mlx5: fix Tx burst routines set
+[ upstream commit 7fcd4e55d9939a29636db1c35ee9864c10debf61 ]
+
The tx_burst routine supporting multi-segment packets with
legacy MPW and without inline was missed, and there was no
valid selection for these options, patch adds the missing
routine.
Fixes: 82e75f8323bf ("net/mlx5: fix legacy multi-packet Tx descriptors")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (73 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix Tx burst routines set' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'app/testpmd: fix GENEVE flow item' " luca.boccassi
` (113 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Ricardo Roldan; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From adb2c4d1bb7702e5ea7e6f27339edf9aef89c80d Mon Sep 17 00:00:00 2001
From: Ricardo Roldan <rroldan@bequant.com>
Date: Tue, 7 Jan 2020 16:51:36 +0100
Subject: [PATCH] ethdev: fix callback unregister with wildcard argument list
[ upstream commit ba1e69f121b97b4c8673a48c98072accdbc5af46 ]
The function was checking -1 against the callback data instead of
the given cb_arg parameter.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Ricardo Roldan <rroldan@bequant.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6e9cb243ea..aec2d0f704 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4039,7 +4039,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
next = TAILQ_NEXT(cb, next);
if (cb->cb_fn != cb_fn || cb->event != event ||
- (cb->cb_arg != (void *)-1 && cb->cb_arg != cb_arg))
+ (cb_arg != (void *)-1 && cb->cb_arg != cb_arg))
continue;
/*
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.623362981 +0000
+++ 0076-ethdev-fix-callback-unregister-with-wildcard-argumen.patch 2020-02-11 11:17:38.500003217 +0000
@@ -1,13 +1,14 @@
-From ba1e69f121b97b4c8673a48c98072accdbc5af46 Mon Sep 17 00:00:00 2001
+From adb2c4d1bb7702e5ea7e6f27339edf9aef89c80d Mon Sep 17 00:00:00 2001
From: Ricardo Roldan <rroldan@bequant.com>
Date: Tue, 7 Jan 2020 16:51:36 +0100
Subject: [PATCH] ethdev: fix callback unregister with wildcard argument list
+[ upstream commit ba1e69f121b97b4c8673a48c98072accdbc5af46 ]
+
The function was checking -1 against the callback data instead of
the given cb_arg parameter.
Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
Signed-off-by: Ricardo Roldan <rroldan@bequant.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix GENEVE flow item' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (74 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix Rx queue search with broadcast packet' " luca.boccassi
` (112 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 44ff767e7aee732809944763c205e2252bab9ba4 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 8 Jan 2020 17:07:02 +0200
Subject: [PATCH] app/testpmd: fix GENEVE flow item
[ upstream commit dcd05da0aed1674263918b3b25b987c7bc99da88 ]
Previous patch added support of GENEVE pattern item in flow rule.
Function flow_item_default_mask() was not updated, so using it with
GENEVE item returns null.
Using testpmd command "set raw_decap" or "set raw_encap" with
GENEVE item, without specifying any parameters, results in
segmentation fault.
This patch updates function flow_item_default_mask(),
adding case to handle GENEVE item.
Fixes: 0f4203fe9d18 ("app/testpmd: support GENEVE pattern item in flow rules")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
app/test-pmd/cmdline_flow.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 99dade7d8c..3cf05b5072 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6236,6 +6236,9 @@ flow_item_default_mask(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_GTP_PSC:
mask = &rte_flow_item_gtp_psc_mask;
break;
+ case RTE_FLOW_ITEM_TYPE_GENEVE:
+ mask = &rte_flow_item_geneve_mask;
+ break;
case RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID:
mask = &rte_flow_item_pppoe_proto_id_mask;
default:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.654768381 +0000
+++ 0077-app-testpmd-fix-GENEVE-flow-item.patch 2020-02-11 11:17:38.504003291 +0000
@@ -1,8 +1,10 @@
-From dcd05da0aed1674263918b3b25b987c7bc99da88 Mon Sep 17 00:00:00 2001
+From 44ff767e7aee732809944763c205e2252bab9ba4 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 8 Jan 2020 17:07:02 +0200
Subject: [PATCH] app/testpmd: fix GENEVE flow item
+[ upstream commit dcd05da0aed1674263918b3b25b987c7bc99da88 ]
+
Previous patch added support of GENEVE pattern item in flow rule.
Function flow_item_default_mask() was not updated, so using it with
GENEVE item returns null.
@@ -14,7 +16,6 @@
adding case to handle GENEVE item.
Fixes: 0f4203fe9d18 ("app/testpmd: support GENEVE pattern item in flow rules")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -24,10 +25,10 @@
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
-index 77a6141ee3..1240de4efb 100644
+index 99dade7d8c..3cf05b5072 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
-@@ -6286,6 +6286,9 @@ flow_item_default_mask(const struct rte_flow_item *item)
+@@ -6236,6 +6236,9 @@ flow_item_default_mask(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_GTP_PSC:
mask = &rte_flow_item_gtp_psc_mask;
break;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix Rx queue search with broadcast packet' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (75 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'app/testpmd: fix GENEVE flow item' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix crash when closing port' " luca.boccassi
` (111 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Wei Hu (Xavier); +Cc: Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ad6ed6fc9132dbae9dae6ed1ce8ed8b744e1e281 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:54 +0800
Subject: [PATCH] net/hns3: fix Rx queue search with broadcast packet
[ upstream commit a45fd0aa0ea1aaefcff21482940d7fbab01f135a ]
Currently, there is a certain probability of a type of RAS errors when
receiving broadcast packets. This type of RAS errors are parsed as
rx_q_search_miss error by hns3 PF PMD driver, the related log as below:
0000:bd:00.0 hns3_find_highest_level(): PPP_MFP_ABNORMAL_INT_ST2
rx_q_search_miss found [error status=0x20000000]
When receiving broadcast packet, network engine select which functions
need to accept it according to the function's promisc_bcast_en bit
configuration. And then search TQP_MAP configuration to select which
hardware queues the packet should enter, if can't find the target
hardware queue, network engine will trigger rx_q_search_miss RAS error.
The root cause as below:
1. VF's promisc_bcast_en bit configuration is not cleared by FLR reset,
and the configuration has been set in the previous application.
2. There is one bug in setting TQP_MAP configuration in the
initialization of PF device: when tqp is allocated to VF, it is still
marked as PF. This issue will affect the correctness of the TQP_MAP
configuration.
This patch fixes it with the following modification.
1. Clear all VFs promisc_bcast_en bit in the initialization of PF
device.
2. Fix the issue to ensure the correct TQP_MAP configuration.
Fixes: d51867db65c1 ("net/hns3: add initialization")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 32 +++++++++++++++++++++++++++++++-
drivers/net/hns3/hns3_ethdev.h | 1 +
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 72315718a8..a85196cfb9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2358,6 +2358,7 @@ hns3_query_pf_resource(struct hns3_hw *hw)
hw->total_tqps_num = rte_le_to_cpu_16(req->tqp_num);
pf->pkt_buf_size = rte_le_to_cpu_16(req->buf_size) << HNS3_BUF_UNIT_S;
hw->tqps_num = RTE_MIN(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);
+ pf->func_num = rte_le_to_cpu_16(req->pf_own_fun_number);
if (req->tx_buf_size)
pf->tx_buf_size =
@@ -2634,6 +2635,7 @@ hns3_map_tqp(struct hns3_hw *hw)
uint16_t tqps_num = hw->total_tqps_num;
uint16_t func_id;
uint16_t tqp_id;
+ bool is_pf;
int num;
int ret;
int i;
@@ -2645,10 +2647,11 @@ hns3_map_tqp(struct hns3_hw *hw)
tqp_id = 0;
num = DIV_ROUND_UP(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);
for (func_id = 0; func_id < num; func_id++) {
+ is_pf = func_id == 0 ? true : false;
for (i = 0;
i < HNS3_MAX_TQP_NUM_PER_FUNC && tqp_id < tqps_num; i++) {
ret = hns3_map_tqps_to_func(hw, func_id, tqp_id++, i,
- true);
+ is_pf);
if (ret)
return ret;
}
@@ -3549,6 +3552,26 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
return 0;
}
+static int
+hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
+{
+ struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+ struct hns3_pf *pf = &hns->pf;
+ struct hns3_promisc_param param;
+ uint16_t func_id;
+ int ret;
+
+ /* func_id 0 is denoted PF, the VFs start from 1 */
+ for (func_id = 1; func_id < pf->func_num; func_id++) {
+ hns3_promisc_param_init(¶m, false, false, false, func_id);
+ ret = hns3_cmd_set_promisc_mode(hw, ¶m);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
static int
hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
{
@@ -3834,6 +3857,13 @@ hns3_init_hardware(struct hns3_adapter *hns)
goto err_mac_init;
}
+ ret = hns3_clear_all_vfs_promisc_mode(hw);
+ if (ret) {
+ PMD_INIT_LOG(ERR, "Failed to clear all vfs promisc mode: %d",
+ ret);
+ goto err_mac_init;
+ }
+
ret = hns3_init_vlan_config(hns);
if (ret) {
PMD_INIT_LOG(ERR, "Failed to init vlan: %d", ret);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index e9a3fe4107..975680ea21 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -453,6 +453,7 @@ struct hns3_mp_param {
struct hns3_pf {
struct hns3_adapter *adapter;
bool is_main_pf;
+ uint16_t func_num; /* num functions of this pf, include pf and vfs */
uint32_t pkt_buf_size; /* Total pf buf size for tx/rx */
uint32_t tx_buf_size; /* Tx buffer size for each TC */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.687302439 +0000
+++ 0078-net-hns3-fix-Rx-queue-search-with-broadcast-packet.patch 2020-02-11 11:17:38.508003367 +0000
@@ -1,8 +1,10 @@
-From a45fd0aa0ea1aaefcff21482940d7fbab01f135a Mon Sep 17 00:00:00 2001
+From ad6ed6fc9132dbae9dae6ed1ce8ed8b744e1e281 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:54 +0800
Subject: [PATCH] net/hns3: fix Rx queue search with broadcast packet
+[ upstream commit a45fd0aa0ea1aaefcff21482940d7fbab01f135a ]
+
Currently, there is a certain probability of a type of RAS errors when
receiving broadcast packets. This type of RAS errors are parsed as
rx_q_search_miss error by hns3 PF PMD driver, the related log as below:
@@ -29,7 +31,6 @@
2. Fix the issue to ensure the correct TQP_MAP configuration.
Fixes: d51867db65c1 ("net/hns3: add initialization")
-Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -39,10 +40,10 @@
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 800fa47cc4..ca87180007 100644
+index 72315718a8..a85196cfb9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2408,6 +2408,7 @@ hns3_query_pf_resource(struct hns3_hw *hw)
+@@ -2358,6 +2358,7 @@ hns3_query_pf_resource(struct hns3_hw *hw)
hw->total_tqps_num = rte_le_to_cpu_16(req->tqp_num);
pf->pkt_buf_size = rte_le_to_cpu_16(req->buf_size) << HNS3_BUF_UNIT_S;
hw->tqps_num = RTE_MIN(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);
@@ -50,7 +51,7 @@
if (req->tx_buf_size)
pf->tx_buf_size =
-@@ -2684,6 +2685,7 @@ hns3_map_tqp(struct hns3_hw *hw)
+@@ -2634,6 +2635,7 @@ hns3_map_tqp(struct hns3_hw *hw)
uint16_t tqps_num = hw->total_tqps_num;
uint16_t func_id;
uint16_t tqp_id;
@@ -58,7 +59,7 @@
int num;
int ret;
int i;
-@@ -2695,10 +2697,11 @@ hns3_map_tqp(struct hns3_hw *hw)
+@@ -2645,10 +2647,11 @@ hns3_map_tqp(struct hns3_hw *hw)
tqp_id = 0;
num = DIV_ROUND_UP(hw->total_tqps_num, HNS3_MAX_TQP_NUM_PER_FUNC);
for (func_id = 0; func_id < num; func_id++) {
@@ -71,7 +72,7 @@
if (ret)
return ret;
}
-@@ -3599,6 +3602,26 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
+@@ -3549,6 +3552,26 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
return 0;
}
@@ -98,7 +99,7 @@
static int
hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
{
-@@ -3886,6 +3909,13 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -3834,6 +3857,13 @@ hns3_init_hardware(struct hns3_adapter *hns)
goto err_mac_init;
}
@@ -113,10 +114,10 @@
if (ret) {
PMD_INIT_LOG(ERR, "Failed to init vlan: %d", ret);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index 2aa4c3cd76..d4a03065f8 100644
+index e9a3fe4107..975680ea21 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -464,6 +464,7 @@ struct hns3_mp_param {
+@@ -453,6 +453,7 @@ struct hns3_mp_param {
struct hns3_pf {
struct hns3_adapter *adapter;
bool is_main_pf;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix crash when closing port' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (76 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix Rx queue search with broadcast packet' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix ring vector related mailbox command format' " luca.boccassi
` (110 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Hongbo Zheng; +Cc: Wei Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1ccffa698f356733175208dc31e5b460a7d724af Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 9 Jan 2020 11:15:55 +0800
Subject: [PATCH] net/hns3: fix crash when closing port
[ upstream commit a3bc973a04ed597b3a7af0ae53869f3490818153 ]
Currently there is a certain probability of segment error in concurrent
reset when the port is closing.
The calltrace info:
This GDB was configured as "aarch64-redhat-linux-gnu".
Reading symbols from /usr/app/testpmd...(no debugging symbols found)...
done.
[New LWP 98204]
[New LWP 98203]
[New LWP 98206]
[New LWP 98205]
[New LWP 98207]
[New LWP 98208]
Missing separate debuginfo for /root/lib/libnuma.so.1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/app/testpmd --log-level=6 --socket-mem 16'.
Program terminated with signal 11, Segmentation fault.
Missing separate debuginfos, use:
debuginfo-install glibc-2.17-260.el7.aarch64
(gdb) bt
in hns3vf_service_handler ()
1 0x00000000006988b8 in eal_alarm_callback ()
2 0x00000000006969b4 in eal_intr_thread_main ()
3 0x0000ffffb08d6c48 in start_thread () from /lib64/libpthread.so.0
4 0x0000ffffb0828600 in thread_start () from /lib64/libc.so.6
(gdb)
Reset process may turn on the cancelled link state timer whether the
current port status is on or off, in order to solve this problem, this
patch add judge the current network port state before starting the
timer, only the port in the running state can start the link state
timer, so as to solve the problem that the link state timer accesses the
null pointer and causes the segment error.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 +++++++----
drivers/net/hns3/hns3_ethdev_vf.c | 7 +++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index a85196cfb9..f41a2fefd8 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4073,6 +4073,7 @@ hns3_dev_start(struct rte_eth_dev *eth_dev)
rte_spinlock_unlock(&hw->lock);
hns3_set_rxtx_function(eth_dev);
hns3_mp_req_start_rxtx(eth_dev);
+ rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, eth_dev);
hns3_info(hw, "hns3 dev start successful!");
return 0;
@@ -4121,6 +4122,7 @@ hns3_dev_stop(struct rte_eth_dev *eth_dev)
hns3_dev_release_mbufs(hns);
hw->adapter_state = HNS3_NIC_CONFIGURED;
}
+ rte_eal_alarm_cancel(hns3_service_handler, eth_dev);
rte_spinlock_unlock(&hw->lock);
}
@@ -4142,7 +4144,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
hw->adapter_state = HNS3_NIC_CLOSING;
hns3_reset_abort(hns);
hw->adapter_state = HNS3_NIC_CLOSED;
- rte_eal_alarm_cancel(hns3_service_handler, eth_dev);
hns3_configure_all_mc_mac_addr(hns, true);
hns3_remove_all_vlan_table(hns);
@@ -4603,7 +4604,8 @@ hns3_stop_service(struct hns3_adapter *hns)
struct rte_eth_dev *eth_dev;
eth_dev = &rte_eth_devices[hw->data->port_id];
- rte_eal_alarm_cancel(hns3_service_handler, eth_dev);
+ if (hw->adapter_state == HNS3_NIC_STARTED)
+ rte_eal_alarm_cancel(hns3_service_handler, eth_dev);
hw->mac.link_status = ETH_LINK_DOWN;
hns3_set_rxtx_function(eth_dev);
@@ -4644,7 +4646,9 @@ hns3_start_service(struct hns3_adapter *hns)
eth_dev = &rte_eth_devices[hw->data->port_id];
hns3_set_rxtx_function(eth_dev);
hns3_mp_req_start_rxtx(eth_dev);
- hns3_service_handler(eth_dev);
+ if (hw->adapter_state == HNS3_NIC_STARTED)
+ hns3_service_handler(eth_dev);
+
return 0;
}
@@ -4900,7 +4904,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
hns3_notify_reset_ready(hw, false);
}
- rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, eth_dev);
hns3_info(hw, "hns3 dev initialization successful!");
return 0;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b1736e73ab..2c792b1761 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1352,6 +1352,7 @@ hns3vf_dev_start(struct rte_eth_dev *eth_dev)
hns3_mp_req_start_rxtx(eth_dev);
rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler,
eth_dev);
+
return 0;
}
@@ -1464,7 +1465,8 @@ hns3vf_stop_service(struct hns3_adapter *hns)
struct rte_eth_dev *eth_dev;
eth_dev = &rte_eth_devices[hw->data->port_id];
- rte_eal_alarm_cancel(hns3vf_service_handler, eth_dev);
+ if (hw->adapter_state == HNS3_NIC_STARTED)
+ rte_eal_alarm_cancel(hns3vf_service_handler, eth_dev);
hw->mac.link_status = ETH_LINK_DOWN;
hns3_set_rxtx_function(eth_dev);
@@ -1502,8 +1504,9 @@ hns3vf_start_service(struct hns3_adapter *hns)
eth_dev = &rte_eth_devices[hw->data->port_id];
hns3_set_rxtx_function(eth_dev);
hns3_mp_req_start_rxtx(eth_dev);
+ if (hw->adapter_state == HNS3_NIC_STARTED)
+ hns3vf_service_handler(eth_dev);
- hns3vf_service_handler(eth_dev);
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.720251714 +0000
+++ 0079-net-hns3-fix-crash-when-closing-port.patch 2020-02-11 11:17:38.516003516 +0000
@@ -1,8 +1,10 @@
-From a3bc973a04ed597b3a7af0ae53869f3490818153 Mon Sep 17 00:00:00 2001
+From 1ccffa698f356733175208dc31e5b460a7d724af Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 9 Jan 2020 11:15:55 +0800
Subject: [PATCH] net/hns3: fix crash when closing port
+[ upstream commit a3bc973a04ed597b3a7af0ae53869f3490818153 ]
+
Currently there is a certain probability of segment error in concurrent
reset when the port is closing.
The calltrace info:
@@ -39,7 +41,6 @@
null pointer and causes the segment error.
Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -49,26 +50,26 @@
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index ca87180007..b05a557814 100644
+index a85196cfb9..f41a2fefd8 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -4197,6 +4197,7 @@ hns3_dev_start(struct rte_eth_dev *dev)
- return ret;
- hns3_set_rxtx_function(dev);
- hns3_mp_req_start_rxtx(dev);
-+ rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, dev);
+@@ -4073,6 +4073,7 @@ hns3_dev_start(struct rte_eth_dev *eth_dev)
+ rte_spinlock_unlock(&hw->lock);
+ hns3_set_rxtx_function(eth_dev);
+ hns3_mp_req_start_rxtx(eth_dev);
++ rte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, eth_dev);
hns3_info(hw, "hns3 dev start successful!");
return 0;
-@@ -4279,6 +4280,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
+@@ -4121,6 +4122,7 @@ hns3_dev_stop(struct rte_eth_dev *eth_dev)
hns3_dev_release_mbufs(hns);
hw->adapter_state = HNS3_NIC_CONFIGURED;
}
-+ rte_eal_alarm_cancel(hns3_service_handler, dev);
++ rte_eal_alarm_cancel(hns3_service_handler, eth_dev);
rte_spinlock_unlock(&hw->lock);
- hns3_unmap_rx_interrupt(dev);
}
-@@ -4301,7 +4303,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+
+@@ -4142,7 +4144,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
hw->adapter_state = HNS3_NIC_CLOSING;
hns3_reset_abort(hns);
hw->adapter_state = HNS3_NIC_CLOSED;
@@ -76,7 +77,7 @@
hns3_configure_all_mc_mac_addr(hns, true);
hns3_remove_all_vlan_table(hns);
-@@ -4760,7 +4761,8 @@ hns3_stop_service(struct hns3_adapter *hns)
+@@ -4603,7 +4604,8 @@ hns3_stop_service(struct hns3_adapter *hns)
struct rte_eth_dev *eth_dev;
eth_dev = &rte_eth_devices[hw->data->port_id];
@@ -86,7 +87,7 @@
hw->mac.link_status = ETH_LINK_DOWN;
hns3_set_rxtx_function(eth_dev);
-@@ -4801,7 +4803,9 @@ hns3_start_service(struct hns3_adapter *hns)
+@@ -4644,7 +4646,9 @@ hns3_start_service(struct hns3_adapter *hns)
eth_dev = &rte_eth_devices[hw->data->port_id];
hns3_set_rxtx_function(eth_dev);
hns3_mp_req_start_rxtx(eth_dev);
@@ -97,7 +98,7 @@
return 0;
}
-@@ -5059,7 +5063,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -4900,7 +4904,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
hns3_notify_reset_ready(hw, false);
}
@@ -106,18 +107,18 @@
return 0;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index f151e89472..505525eba6 100644
+index b1736e73ab..2c792b1761 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -1559,6 +1559,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)
- hns3_set_rxtx_function(dev);
- hns3_mp_req_start_rxtx(dev);
- rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler, dev);
+@@ -1352,6 +1352,7 @@ hns3vf_dev_start(struct rte_eth_dev *eth_dev)
+ hns3_mp_req_start_rxtx(eth_dev);
+ rte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler,
+ eth_dev);
+
- return ret;
+ return 0;
}
-@@ -1671,7 +1672,8 @@ hns3vf_stop_service(struct hns3_adapter *hns)
+@@ -1464,7 +1465,8 @@ hns3vf_stop_service(struct hns3_adapter *hns)
struct rte_eth_dev *eth_dev;
eth_dev = &rte_eth_devices[hw->data->port_id];
@@ -127,7 +128,7 @@
hw->mac.link_status = ETH_LINK_DOWN;
hns3_set_rxtx_function(eth_dev);
-@@ -1709,8 +1711,9 @@ hns3vf_start_service(struct hns3_adapter *hns)
+@@ -1502,8 +1504,9 @@ hns3vf_start_service(struct hns3_adapter *hns)
eth_dev = &rte_eth_devices[hw->data->port_id];
hns3_set_rxtx_function(eth_dev);
hns3_mp_req_start_rxtx(eth_dev);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix ring vector related mailbox command format' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (77 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix crash when closing port' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix dumping VF register information' " luca.boccassi
` (109 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Wei Hu (Xavier); +Cc: Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6195f043bc8023fb64769f499750f7056fa0a558 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:56 +0800
Subject: [PATCH] net/hns3: fix ring vector related mailbox command format
[ upstream commit c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 ]
The format of the ring vector related mailbox commands between driver
and firmware is different from those of other mailbox commands in hns3
network engine.
This patch fixes the error mailbox command format about the vector of
the rings, the related command opcode as below:
HNS3_MBX_MAP_RING_TO_VECTOR
HNS3_MBX_UNMAP_RING_TO_VECTOR
HNS3_MBX_GET_RING_VECTOR_MAP
Fixes: 463e748964f5 ("net/hns3: support mailbox")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_mbx.c | 14 +++++++++++---
drivers/net/hns3/hns3_mbx.h | 1 +
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index c1647af4bf..7087b91c4d 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -150,6 +150,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
{
struct hns3_mbx_vf_to_pf_cmd *req;
struct hns3_cmd_desc desc;
+ bool is_ring_vector_msg;
+ int offset;
int ret;
req = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;
@@ -164,9 +166,15 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);
req->msg[0] = code;
- req->msg[1] = subcode;
- if (msg_data)
- memcpy(&req->msg[HNS3_CMD_CODE_OFFSET], msg_data, msg_len);
+ is_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||
+ (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||
+ (code == HNS3_MBX_GET_RING_VECTOR_MAP);
+ if (!is_ring_vector_msg)
+ req->msg[1] = subcode;
+ if (msg_data) {
+ offset = is_ring_vector_msg ? 1 : HNS3_CMD_CODE_OFFSET;
+ memcpy(&req->msg[offset], msg_data, msg_len);
+ }
/* synchronous send */
if (need_resp) {
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 01eddb845d..45101c0b12 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -41,6 +41,7 @@ enum HNS3_MBX_OPCODE {
HNS3_MBX_GET_QID_IN_PF, /* (VF -> PF) get queue id in pf */
HNS3_MBX_HANDLE_VF_TBL = 38, /* (VF -> PF) store/clear hw cfg tbl */
+ HNS3_MBX_GET_RING_VECTOR_MAP, /* (VF -> PF) get ring-to-vector map */
};
/* below are per-VF mac-vlan subcodes */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.754724064 +0000
+++ 0080-net-hns3-fix-ring-vector-related-mailbox-command-for.patch 2020-02-11 11:17:38.516003516 +0000
@@ -1,8 +1,10 @@
-From c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 Mon Sep 17 00:00:00 2001
+From 6195f043bc8023fb64769f499750f7056fa0a558 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:56 +0800
Subject: [PATCH] net/hns3: fix ring vector related mailbox command format
+[ upstream commit c05e0c5b74277e6e72a3b4ad8ae62bce0f03ce80 ]
+
The format of the ring vector related mailbox commands between driver
and firmware is different from those of other mailbox commands in hns3
network engine.
@@ -14,7 +16,6 @@
HNS3_MBX_GET_RING_VECTOR_MAP
Fixes: 463e748964f5 ("net/hns3: support mailbox")
-Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -24,7 +25,7 @@
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
-index 26807bc4b0..0d03f50644 100644
+index c1647af4bf..7087b91c4d 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -150,6 +150,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
@@ -56,7 +57,7 @@
/* synchronous send */
if (need_resp) {
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
-index 3722c87604..b01eaacc3c 100644
+index 01eddb845d..45101c0b12 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -41,6 +41,7 @@ enum HNS3_MBX_OPCODE {
@@ -64,9 +65,9 @@
HNS3_MBX_HANDLE_VF_TBL = 38, /* (VF -> PF) store/clear hw cfg tbl */
+ HNS3_MBX_GET_RING_VECTOR_MAP, /* (VF -> PF) get ring-to-vector map */
- HNS3_MBX_PUSH_LINK_STATUS = 201, /* (IMP -> PF) get port link status */
};
+ /* below are per-VF mac-vlan subcodes */
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix dumping VF register information' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (78 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix ring vector related mailbox command format' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix link status on failed query' " luca.boccassi
` (108 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Wei Hu (Xavier); +Cc: Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bc69de759e5734e4ba6beedcb769b484f84dfe56 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:57 +0800
Subject: [PATCH] net/hns3: fix dumping VF register information
[ upstream commit fc066e6accfd593362b2786a7153557727b36e11 ]
Currently, when the API interface named rte_eth_dev_get_reg_info is
called by upper applications based on VF device, it returns error.
We can read registers directly to get ring and interrupt related
information in hns3 PF/VF PMD driver. But for some other internal table
entries and common configuration information, we can get them only
through the command interface between driver and firmware in PF driver,
and VF driver has not the related access permission.
This patch fixes it by preventing getting these information through the
command interface based on VF device in 'get_reg' ops implementation
function.
Fixes: 936eda25e8da ("net/hns3: support dump register")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_regs.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 23405030e7..a3f2a51f9b 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -118,15 +118,9 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
int cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
uint32_t regs_num_32_bit, regs_num_64_bit;
+ uint32_t len;
int ret;
- ret = hns3_get_regs_num(hw, ®s_num_32_bit, ®s_num_64_bit);
- if (ret) {
- hns3_err(hw, "Get register number failed, ret = %d.",
- ret);
- return -ENOTSUP;
- }
-
cmdq_lines = sizeof(cmdq_reg_addrs) / REG_LEN_PER_LINE + 1;
if (hns->is_vf)
common_lines =
@@ -136,11 +130,21 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
ring_lines = sizeof(ring_reg_addrs) / REG_LEN_PER_LINE + 1;
tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1;
- *length = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
- tqp_intr_lines * hw->num_msi) * REG_LEN_PER_LINE +
- regs_num_32_bit * sizeof(uint32_t) +
- regs_num_64_bit * sizeof(uint64_t);
+ len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num +
+ tqp_intr_lines * hw->num_msi) * REG_LEN_PER_LINE;
+ if (!hns->is_vf) {
+ ret = hns3_get_regs_num(hw, ®s_num_32_bit, ®s_num_64_bit);
+ if (ret) {
+ hns3_err(hw, "Get register number failed, ret = %d.",
+ ret);
+ return -ENOTSUP;
+ }
+ len += regs_num_32_bit * sizeof(uint32_t) +
+ regs_num_64_bit * sizeof(uint64_t);
+ }
+
+ *length = len;
return 0;
}
@@ -346,6 +350,9 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
/* fetching per-PF registers values from PF PCIe register space */
hns3_direct_access_regs(hw, data);
+ if (hns->is_vf)
+ return 0;
+
ret = hns3_get_regs_num(hw, ®s_num_32_bit, ®s_num_64_bit);
if (ret) {
hns3_err(hw, "Get register number failed, ret = %d", ret);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.782420434 +0000
+++ 0081-net-hns3-fix-dumping-VF-register-information.patch 2020-02-11 11:17:38.516003516 +0000
@@ -1,8 +1,10 @@
-From fc066e6accfd593362b2786a7153557727b36e11 Mon Sep 17 00:00:00 2001
+From bc69de759e5734e4ba6beedcb769b484f84dfe56 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:57 +0800
Subject: [PATCH] net/hns3: fix dumping VF register information
+[ upstream commit fc066e6accfd593362b2786a7153557727b36e11 ]
+
Currently, when the API interface named rte_eth_dev_get_reg_info is
called by upper applications based on VF device, it returns error.
@@ -17,7 +19,6 @@
function.
Fixes: 936eda25e8da ("net/hns3: support dump register")
-Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix link status on failed query' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (79 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix dumping VF register information' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' " luca.boccassi
` (107 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Wei Hu (Xavier); +Cc: Hongbo Zheng, Huisong Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bfd523f593e5467b852d992f5ca3bd78a656e7fc Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:58 +0800
Subject: [PATCH] net/hns3: fix link status on failed query
[ upstream commit eee015976b46af8cc218263b97f90e8a5937707c ]
Currently, the hns3 PMD driver issues command to the firmware and gets
link status information.
When the driver fails to call internal interface function named
hns3_cmd_send to query the status from firmware for some reason, the
link status queried by the driver should be down.
Fixes: 59fad0f32135 ("net/hns3: support link update operation")
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f41a2fefd8..7e601b8bf8 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3786,7 +3786,7 @@ hns3_get_mac_link_status(struct hns3_hw *hw)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret) {
hns3_err(hw, "get link status cmd failed %d", ret);
- return ret;
+ return ETH_LINK_DOWN;
}
req = (struct hns3_link_status_cmd *)desc.data;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.809476826 +0000
+++ 0082-net-hns3-fix-link-status-on-failed-query.patch 2020-02-11 11:17:38.520003591 +0000
@@ -1,8 +1,10 @@
-From eee015976b46af8cc218263b97f90e8a5937707c Mon Sep 17 00:00:00 2001
+From bfd523f593e5467b852d992f5ca3bd78a656e7fc Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jan 2020 11:15:58 +0800
Subject: [PATCH] net/hns3: fix link status on failed query
+[ upstream commit eee015976b46af8cc218263b97f90e8a5937707c ]
+
Currently, the hns3 PMD driver issues command to the firmware and gets
link status information.
@@ -11,7 +13,6 @@
link status queried by the driver should be down.
Fixes: 59fad0f32135 ("net/hns3: support link update operation")
-Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
@@ -21,10 +22,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index b05a557814..9866d147be 100644
+index f41a2fefd8..7e601b8bf8 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -3836,7 +3836,7 @@ hns3_get_mac_link_status(struct hns3_hw *hw)
+@@ -3786,7 +3786,7 @@ hns3_get_mac_link_status(struct hns3_hw *hw)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret) {
hns3_err(hw, "get link status cmd failed %d", ret);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (80 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix link status on failed query' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/qede/base: fix number of ports per engine' " luca.boccassi
` (106 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Wei Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 9 Jan 2020 11:15:59 +0800
Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process
[ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ]
Currently, reset related operations can only be performed in the primary
process and are not allowed in the slave process in hns3 PMD driver.
In the internal function interface named hns3_cmd_send used for
communication between driver and firmware, if the wrong head value is
detected in the static subfunction hns3_cmd_csq_clean, driver will
trigger a function level reset to make the hardware work normally again.
This patch adds check condition to prevent triggering reset procedure in
the slave process to avoid failure.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
drivers/net/hns3/hns3_cmd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 65a5af8e4f..5ec3dfe016 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -215,12 +215,12 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
head = hns3_read_dev(hw, HNS3_CMDQ_TX_HEAD_REG);
if (!is_valid_csq_clean_head(csq, head)) {
- struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
hns3_err(hw, "wrong cmd head (%u, %u-%u)", head,
csq->next_to_use, csq->next_to_clean);
- rte_atomic16_set(&hw->reset.disable_cmd, 1);
-
- hns3_schedule_delayed_reset(hns);
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ rte_atomic16_set(&hw->reset.disable_cmd, 1);
+ hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw));
+ }
return -EIO;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.840127874 +0000
+++ 0083-net-hns3-fix-triggering-reset-procedure-in-slave-pro.patch 2020-02-11 11:17:38.520003591 +0000
@@ -1,8 +1,10 @@
-From a1f381ad5349af335bda4b7152b7c6fd5f56573a Mon Sep 17 00:00:00 2001
+From 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 9 Jan 2020 11:15:59 +0800
Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process
+[ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ]
+
Currently, reset related operations can only be performed in the primary
process and are not allowed in the slave process in hns3 PMD driver.
@@ -15,7 +17,6 @@
the slave process to avoid failure.
Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/qede/base: fix number of ports per engine' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (81 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnx2x: support secondary process' " luca.boccassi
` (105 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cc04f2115dc3beb9b3f0313d8928eb65d7acf852 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Fri, 20 Dec 2019 17:34:51 -0800
Subject: [PATCH] net/qede/base: fix number of ports per engine
[ upstream commit 117e4a77bada8337c9fec3f44d4e2c228c6fbd7c ]
Fix the way in which the number of ports per engine of an adapter is
determined by reading port mode register. Set default value to 1.
Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0")
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/base/ecore_dev.c | 38 ++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index 9d1db14590..f33b9910c0 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -5253,7 +5253,6 @@ static void ecore_emul_hw_info_port_num(struct ecore_hwfn *p_hwfn,
/* MISCS_REG_ECO_RESERVED[15:12]: num of ports in an engine */
eco_reserved = ecore_rd(p_hwfn, p_ptt, MISCS_REG_ECO_RESERVED);
-
switch ((eco_reserved & 0xf000) >> 12) {
case 1:
p_dev->num_ports_in_engine = 1;
@@ -5268,7 +5267,7 @@ static void ecore_emul_hw_info_port_num(struct ecore_hwfn *p_hwfn,
DP_NOTICE(p_hwfn, false,
"Emulation: Unknown port mode [ECO_RESERVED 0x%08x]\n",
eco_reserved);
- p_dev->num_ports_in_engine = 2; /* Default to something */
+ p_dev->num_ports_in_engine = 1; /* Default to something */
break;
}
@@ -5281,8 +5280,8 @@ static void ecore_emul_hw_info_port_num(struct ecore_hwfn *p_hwfn,
static void ecore_hw_info_port_num(struct ecore_hwfn *p_hwfn,
struct ecore_ptt *p_ptt)
{
+ u32 addr, global_offsize, global_addr, port_mode;
struct ecore_dev *p_dev = p_hwfn->p_dev;
- u32 addr, global_offsize, global_addr;
#ifndef ASIC_ONLY
if (CHIP_REV_IS_TEDIBEAR(p_dev)) {
@@ -5304,15 +5303,32 @@ static void ecore_hw_info_port_num(struct ecore_hwfn *p_hwfn,
return;
}
- addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
- PUBLIC_GLOBAL);
- global_offsize = ecore_rd(p_hwfn, p_ptt, addr);
- global_addr = SECTION_ADDR(global_offsize, 0);
- addr = global_addr + OFFSETOF(struct public_global, max_ports);
- p_dev->num_ports = (u8)ecore_rd(p_hwfn, p_ptt, addr);
+ /* Determine the number of ports per engine */
+ port_mode = ecore_rd(p_hwfn, p_ptt, MISC_REG_PORT_MODE);
+ switch (port_mode) {
+ case 0x0:
+ p_dev->num_ports_in_engine = 1;
+ break;
+ case 0x1:
+ p_dev->num_ports_in_engine = 2;
+ break;
+ case 0x2:
+ p_dev->num_ports_in_engine = 4;
+ break;
+ default:
+ DP_NOTICE(p_hwfn, false, "Unknown port mode 0x%08x\n",
+ port_mode);
+ p_dev->num_ports_in_engine = 1; /* Default to something */
+ break;
+ }
- p_dev->num_ports_in_engine = p_dev->num_ports >>
- (ecore_device_num_engines(p_dev) - 1);
+ /* Get the total number of ports of the device */
+ addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
+ PUBLIC_GLOBAL);
+ global_offsize = ecore_rd(p_hwfn, p_ptt, addr);
+ global_addr = SECTION_ADDR(global_offsize, 0);
+ addr = global_addr + OFFSETOF(struct public_global, max_ports);
+ p_dev->num_ports = (u8)ecore_rd(p_hwfn, p_ptt, addr);
}
static void ecore_mcp_get_eee_caps(struct ecore_hwfn *p_hwfn,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.867632379 +0000
+++ 0084-net-qede-base-fix-number-of-ports-per-engine.patch 2020-02-11 11:17:38.524003666 +0000
@@ -1,13 +1,14 @@
-From 117e4a77bada8337c9fec3f44d4e2c228c6fbd7c Mon Sep 17 00:00:00 2001
+From cc04f2115dc3beb9b3f0313d8928eb65d7acf852 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Fri, 20 Dec 2019 17:34:51 -0800
Subject: [PATCH] net/qede/base: fix number of ports per engine
+[ upstream commit 117e4a77bada8337c9fec3f44d4e2c228c6fbd7c ]
+
Fix the way in which the number of ports per engine of an adapter is
determined by reading port mode register. Set default value to 1.
Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0")
-Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnx2x: support secondary process' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (82 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/qede/base: fix number of ports per engine' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool/octeontx: fix error handling in initialization' " luca.boccassi
` (104 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8aab34df066f62edb706b58fac3ba978ae854c4c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Fri, 20 Dec 2019 17:41:46 -0800
Subject: [PATCH] net/bnx2x: support secondary process
[ upstream commit b0b9fdad24e7808f2fbad01b35f0852109639293 ]
Skip the device re-initialization for secondary process.
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 20b045ff87..7864b5b80a 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+ PMD_DRV_LOG(ERR, sc, "Skipping device init from secondary process");
+ return 0;
+ }
+
rte_eth_copy_pci_info(eth_dev, pci_dev);
sc->pcie_bus = pci_dev->addr.bus;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.900437069 +0000
+++ 0085-net-bnx2x-support-secondary-process.patch 2020-02-11 11:17:38.524003666 +0000
@@ -1,11 +1,11 @@
-From b0b9fdad24e7808f2fbad01b35f0852109639293 Mon Sep 17 00:00:00 2001
+From 8aab34df066f62edb706b58fac3ba978ae854c4c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Fri, 20 Dec 2019 17:41:46 -0800
Subject: [PATCH] net/bnx2x: support secondary process
-Skip the device re-initialization for secondary process.
+[ upstream commit b0b9fdad24e7808f2fbad01b35f0852109639293 ]
-Cc: stable@dpdk.org
+Skip the device re-initialization for secondary process.
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mempool/octeontx: fix error handling in initialization' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (83 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnx2x: support secondary process' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " luca.boccassi
` (103 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Krzysztof Kanas; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3f1a929aadc613921a352507ba54fc4eac4dbc4e Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <kkanas@marvell.com>
Date: Thu, 19 Dec 2019 11:44:34 +0100
Subject: [PATCH] mempool/octeontx: fix error handling in initialization
[ upstream commit 4f2c3c7b1da78bbb6270668e7a2b412863439b7f ]
When octeontx_get_fpavf fails fpa pointer is used to get
pool_stack_base, which is then freed.
Coverity issue: 351263
Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation")
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/mempool/octeontx/octeontx_fpavf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index c97267db3c..63f8fb3b50 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -305,10 +305,8 @@ octeontx_fpapf_pool_destroy(unsigned int gpool_index)
int ret = -1;
fpa = octeontx_get_fpavf(gpool_index);
- if (fpa == NULL) {
- ret = -EINVAL;
- goto err;
- }
+ if (fpa == NULL)
+ return -EINVAL;
hdr.coproc = FPA_COPROC;
hdr.msg = FPA_CONFIGSET;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.928004926 +0000
+++ 0086-mempool-octeontx-fix-error-handling-in-initializatio.patch 2020-02-11 11:17:38.524003666 +0000
@@ -1,14 +1,15 @@
-From 4f2c3c7b1da78bbb6270668e7a2b412863439b7f Mon Sep 17 00:00:00 2001
+From 3f1a929aadc613921a352507ba54fc4eac4dbc4e Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <kkanas@marvell.com>
Date: Thu, 19 Dec 2019 11:44:34 +0100
Subject: [PATCH] mempool/octeontx: fix error handling in initialization
+[ upstream commit 4f2c3c7b1da78bbb6270668e7a2b412863439b7f ]
+
When octeontx_get_fpavf fails fpa pointer is used to get
pool_stack_base, which is then freed.
Coverity issue: 351263
Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation")
-Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (84 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool/octeontx: fix error handling in initialization' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " luca.boccassi
` (102 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 13 Jan 2020 11:12:38 -0800
Subject: [PATCH] net/netvsc: fix crash in secondary process
[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ]
The secondary process would crash trying to get the offload
capability of the device. Since the device capabilities were
already set by the primary process this was unnecessary.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/netvsc/hn_ethdev.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 159116f7f6..c79f924379 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -257,15 +257,16 @@ static int hn_dev_info_get(struct rte_eth_dev *dev,
dev_info->max_rx_queues = hv->max_queues;
dev_info->max_tx_queues = hv->max_queues;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ /* fills in rx and tx offload capability */
rc = hn_rndis_get_offload(hv, dev_info);
if (rc != 0)
return rc;
- rc = hn_vf_info_get(hv, dev_info);
- if (rc != 0)
- return rc;
-
- return 0;
+ /* merges the offload and queues of vf */
+ return hn_vf_info_get(hv, dev_info);
}
static int hn_rss_reta_update(struct rte_eth_dev *dev,
@@ -929,16 +930,16 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
eth_dev->tx_pkt_burst = &hn_xmit_pkts;
eth_dev->rx_pkt_burst = &hn_recv_pkts;
- /*
- * for secondary processes, we don't initialize any further as primary
- * has already done this work.
- */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return 0;
-
/* Since Hyper-V only supports one MAC address, just use local data */
eth_dev->data->mac_addrs = &hv->mac_addr;
+ /*
+ * for secondary processes, we don't initialize any further as primary
+ * has already done this work.
+ */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
hv->vmbus = vmbus;
hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP];
hv->chim_res = &vmbus->resource[HV_SEND_BUF_MAP];
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.955721636 +0000
+++ 0087-net-netvsc-fix-crash-in-secondary-process.patch 2020-02-11 11:17:38.528003740 +0000
@@ -1,14 +1,15 @@
-From f8279f47dd89c026d760ebce99452393d1270849 Mon Sep 17 00:00:00 2001
+From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 13 Jan 2020 11:12:38 -0800
Subject: [PATCH] net/netvsc: fix crash in secondary process
+[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ]
+
The secondary process would crash trying to get the offload
capability of the device. Since the device capabilities were
already set by the primary process this was unnecessary.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (85 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix PTP and HIGIG2 coexistence' " luca.boccassi
` (101 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: Chas Williams, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9b8b9e076b9966564e1fbf922c3697388f0abc07 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 14 Jan 2020 15:13:22 +0530
Subject: [PATCH] net/cxgbe: announce Tx multi-segments offload
[ upstream commit acbe92bdb2d25f47a690c917f577a0918ba562a1 ]
Multi-segs Tx is already supported by CXGBE PMD. So, add the missing
DEV_TX_OFFLOAD_MULTI_SEGS flag to the list of supported Tx offload
features.
Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API")
Reported-by: Chas Williams <3chas3@gmail.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 6c1f73ac4b..75a2e9931b 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -40,7 +40,8 @@
DEV_TX_OFFLOAD_IPV4_CKSUM | \
DEV_TX_OFFLOAD_UDP_CKSUM | \
DEV_TX_OFFLOAD_TCP_CKSUM | \
- DEV_TX_OFFLOAD_TCP_TSO)
+ DEV_TX_OFFLOAD_TCP_TSO | \
+ DEV_TX_OFFLOAD_MULTI_SEGS)
#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP | \
DEV_RX_OFFLOAD_IPV4_CKSUM | \
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:41.983415026 +0000
+++ 0088-net-cxgbe-announce-Tx-multi-segments-offload.patch 2020-02-11 11:17:38.528003740 +0000
@@ -1,14 +1,15 @@
-From acbe92bdb2d25f47a690c917f577a0918ba562a1 Mon Sep 17 00:00:00 2001
+From 9b8b9e076b9966564e1fbf922c3697388f0abc07 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 14 Jan 2020 15:13:22 +0530
Subject: [PATCH] net/cxgbe: announce Tx multi-segments offload
+[ upstream commit acbe92bdb2d25f47a690c917f577a0918ba562a1 ]
+
Multi-segs Tx is already supported by CXGBE PMD. So, add the missing
DEV_TX_OFFLOAD_MULTI_SEGS flag to the list of supported Tx offload
features.
Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API")
-Cc: stable@dpdk.org
Reported-by: Chas Williams <3chas3@gmail.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix PTP and HIGIG2 coexistence' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (86 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " luca.boccassi
` (100 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Kiran Kumar K; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 22db84d0ca4a1355a401891e378c368daf2a9f1c Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Tue, 14 Jan 2020 14:56:22 +0530
Subject: [PATCH] net/octeontx2: fix PTP and HIGIG2 coexistence
[ upstream commit 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 ]
octeontx2 PMD does not support both PTP and HIGIG2 together.
Added a check to enforce this and updated the Rx offload capabilities when
Higig2 mode enabled.
Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2")
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_ethdev.c | 9 ++++++++-
drivers/net/octeontx2/otx2_ptp.c | 5 +++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 43c6107a80..268b383dbd 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -18,7 +18,8 @@ nix_get_rx_offload_capa(struct otx2_eth_dev *dev)
{
uint64_t capa = NIX_RX_OFFLOAD_CAPA;
- if (otx2_dev_is_vf(dev))
+ if (otx2_dev_is_vf(dev) ||
+ dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG)
capa &= ~DEV_RX_OFFLOAD_TIMESTAMP;
return capa;
@@ -1641,6 +1642,12 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
goto fail_offloads;
}
+ if (dev->ptp_en &&
+ dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) {
+ otx2_err("Both PTP and switch header enabled");
+ goto free_nix_lf;
+ }
+
rc = nix_lf_switch_header_type_enable(dev);
if (rc) {
otx2_err("Failed to enable switch type nix_lf rc=%d", rc);
diff --git a/drivers/net/octeontx2/otx2_ptp.c b/drivers/net/octeontx2/otx2_ptp.c
index f34b9339c4..ae5a2b7cd1 100644
--- a/drivers/net/octeontx2/otx2_ptp.c
+++ b/drivers/net/octeontx2/otx2_ptp.c
@@ -221,6 +221,11 @@ otx2_nix_timesync_enable(struct rte_eth_dev *eth_dev)
return -EINVAL;
}
+ if (dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) {
+ otx2_err("Both PTP and switch header enabled");
+ return -EINVAL;
+ }
+
/* Allocating a iova address for tx tstamp */
const struct rte_memzone *ts;
ts = rte_eth_dma_zone_reserve(eth_dev, "otx2_ts",
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.011577531 +0000
+++ 0089-net-octeontx2-fix-PTP-and-HIGIG2-coexistence.patch 2020-02-11 11:17:38.528003740 +0000
@@ -1,14 +1,15 @@
-From 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 Mon Sep 17 00:00:00 2001
+From 22db84d0ca4a1355a401891e378c368daf2a9f1c Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Tue, 14 Jan 2020 14:56:22 +0530
Subject: [PATCH] net/octeontx2: fix PTP and HIGIG2 coexistence
+[ upstream commit 8dc4ff37fe8b7c656aafdf81360f2ef2cd0d94d3 ]
+
octeontx2 PMD does not support both PTP and HIGIG2 together.
Added a check to enforce this and updated the Rx offload capabilities when
Higig2 mode enabled.
Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2")
-Cc: stable@dpdk.org
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: update recommended versions for i40e' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (87 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix PTP and HIGIG2 coexistence' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' " luca.boccassi
` (99 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Zhaoyan Chen; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 61fbefb661be5bf14d459b0f0107831600294f81 Mon Sep 17 00:00:00 2001
From: Zhaoyan Chen <zhaoyan.chen@intel.com>
Date: Fri, 3 Jan 2020 11:03:39 +0800
Subject: [PATCH] doc: update recommended versions for i40e
[ upstream commit 904b030dc961fd393d98b8dde0b85f1688c616ac ]
Update supported Intel NIC driver version and firmware version for 19.11
Update supported Intel NIC driver version to 2.8.43 for 19.08 which is
widely tested.
Fixes: cb8a35c22aa9 ("doc: update supported i40e driver and firmware version")
Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
doc/guides/nics/i40e.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 38acf5906d..c7c34b62f6 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -69,7 +69,9 @@ to chapter Tested Platforms/Tested NICs in release notes.
+--------------+-----------------------+------------------+
| DPDK version | Kernel driver version | Firmware version |
+==============+=======================+==================+
- | 19.08 | 2.9.21 | 7.00 |
+ | 19.11 | 2.9.21 | 7.00 |
+ +--------------+-----------------------+------------------+
+ | 19.08 | 2.8.43 | 7.00 |
+--------------+-----------------------+------------------+
| 19.05 | 2.7.29 | 6.80 |
+--------------+-----------------------+------------------+
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.040781989 +0000
+++ 0090-doc-update-recommended-versions-for-i40e.patch 2020-02-11 11:17:38.528003740 +0000
@@ -1,14 +1,15 @@
-From 904b030dc961fd393d98b8dde0b85f1688c616ac Mon Sep 17 00:00:00 2001
+From 61fbefb661be5bf14d459b0f0107831600294f81 Mon Sep 17 00:00:00 2001
From: Zhaoyan Chen <zhaoyan.chen@intel.com>
Date: Fri, 3 Jan 2020 11:03:39 +0800
Subject: [PATCH] doc: update recommended versions for i40e
+[ upstream commit 904b030dc961fd393d98b8dde0b85f1688c616ac ]
+
Update supported Intel NIC driver version and firmware version for 19.11
Update supported Intel NIC driver version to 2.8.43 for 19.08 which is
widely tested.
Fixes: cb8a35c22aa9 ("doc: update supported i40e driver and firmware version")
-Cc: stable@dpdk.org
Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (88 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " luca.boccassi
` (98 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 45111bf63dd1e8f9726ece577ae38f4aea4d2e3e Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 25 Nov 2019 16:14:40 +0800
Subject: [PATCH] net/virtio-user: do not close tap when disabling queue pairs
[ upstream commit 47ac9661b68275321fae0876cce743b9d17671fe ]
Do not close the tap fds when disabling queue pairs, instead,
we just need to unbind the backend. Otherwise, tap port can be
destroyed unexpectedly.
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user/vhost_kernel.c | 34 +++++++++++++++----
.../net/virtio/virtio_user/vhost_kernel_tap.c | 34 ++++++++++++-------
.../net/virtio/virtio_user/vhost_kernel_tap.h | 8 +++++
drivers/net/virtio/virtio_user/vhost_user.c | 4 +++
.../net/virtio/virtio_user/virtio_user_dev.c | 5 ++-
.../net/virtio/virtio_user/virtio_user_dev.h | 1 +
6 files changed, 65 insertions(+), 21 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel.c b/drivers/net/virtio/virtio_user/vhost_kernel.c
index 5c81e8dd9f..2c805077af 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel.c
@@ -330,16 +330,34 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
vhostfd = dev->vhostfds[pair_idx];
+ if (dev->qp_enabled[pair_idx] == enable)
+ return 0;
+
if (!enable) {
- if (dev->tapfds[pair_idx] >= 0) {
- close(dev->tapfds[pair_idx]);
- dev->tapfds[pair_idx] = -1;
+ tapfd = dev->tapfds[pair_idx];
+ if (vhost_kernel_set_backend(vhostfd, -1) < 0) {
+ PMD_DRV_LOG(ERR, "fail to set backend for vhost kernel");
+ return -1;
}
- return vhost_kernel_set_backend(vhostfd, -1);
- } else if (dev->tapfds[pair_idx] >= 0) {
+ if (req_mq && vhost_kernel_tap_set_queue(tapfd, false) < 0) {
+ PMD_DRV_LOG(ERR, "fail to disable tap for vhost kernel");
+ return -1;
+ }
+ dev->qp_enabled[pair_idx] = false;
return 0;
}
+ if (dev->tapfds[pair_idx] >= 0) {
+ tapfd = dev->tapfds[pair_idx];
+ if (vhost_kernel_tap_set_offload(tapfd, dev->features) == -1)
+ return -1;
+ if (req_mq && vhost_kernel_tap_set_queue(tapfd, true) < 0) {
+ PMD_DRV_LOG(ERR, "fail to enable tap for vhost kernel");
+ return -1;
+ }
+ goto set_backend;
+ }
+
if ((dev->features & (1ULL << VIRTIO_NET_F_MRG_RXBUF)) ||
(dev->features & (1ULL << VIRTIO_F_VERSION_1)))
hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf);
@@ -353,13 +371,15 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
return -1;
}
+ dev->tapfds[pair_idx] = tapfd;
+
+set_backend:
if (vhost_kernel_set_backend(vhostfd, tapfd) < 0) {
PMD_DRV_LOG(ERR, "fail to set backend for vhost kernel");
- close(tapfd);
return -1;
}
- dev->tapfds[pair_idx] = tapfd;
+ dev->qp_enabled[pair_idx] = true;
return 0;
}
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 76bf75423e..2fbfecba12 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -18,7 +18,7 @@
#include "../virtio_logs.h"
#include "../virtio_pci.h"
-static int
+int
vhost_kernel_tap_set_offload(int fd, uint64_t features)
{
unsigned int offload = 0;
@@ -37,26 +37,34 @@ vhost_kernel_tap_set_offload(int fd, uint64_t features)
offload |= TUN_F_UFO;
}
- if (offload != 0) {
- /* Check if our kernel supports TUNSETOFFLOAD */
- if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) {
- PMD_DRV_LOG(ERR, "Kernel does't support TUNSETOFFLOAD\n");
- return -ENOTSUP;
- }
+ /* Check if our kernel supports TUNSETOFFLOAD */
+ if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) {
+ PMD_DRV_LOG(ERR, "Kernel does't support TUNSETOFFLOAD\n");
+ return -ENOTSUP;
+ }
+ if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
+ offload &= ~TUN_F_UFO;
if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
- offload &= ~TUN_F_UFO;
- if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
- PMD_DRV_LOG(ERR, "TUNSETOFFLOAD ioctl() failed: %s\n",
- strerror(errno));
- return -1;
- }
+ PMD_DRV_LOG(ERR, "TUNSETOFFLOAD ioctl() failed: %s\n",
+ strerror(errno));
+ return -1;
}
}
return 0;
}
+int
+vhost_kernel_tap_set_queue(int fd, bool attach)
+{
+ struct ifreq ifr = {
+ .ifr_flags = attach ? IFF_ATTACH_QUEUE : IFF_DETACH_QUEUE,
+ };
+
+ return ioctl(fd, TUNSETQUEUE, &ifr);
+}
+
int
vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
const char *mac, uint64_t features)
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.h b/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
index e0e95b4f59..5c4447b296 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
@@ -2,6 +2,10 @@
* Copyright(c) 2016 Intel Corporation
*/
+#ifndef _VHOST_KERNEL_TAP_H
+#define _VHOST_KERNEL_TAP_H
+
+#include <stdbool.h>
#include <sys/ioctl.h>
/* TUN ioctls */
@@ -37,3 +41,7 @@
int vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
const char *mac, uint64_t features);
+int vhost_kernel_tap_set_offload(int fd, uint64_t features);
+int vhost_kernel_tap_set_queue(int fd, bool attach);
+
+#endif
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index a4b5c25cd3..d8e083ba8b 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -456,6 +456,9 @@ vhost_user_enable_queue_pair(struct virtio_user_dev *dev,
{
int i;
+ if (dev->qp_enabled[pair_idx] == enable)
+ return 0;
+
for (i = 0; i < 2; ++i) {
struct vhost_vring_state state = {
.index = pair_idx * 2 + i,
@@ -466,6 +469,7 @@ vhost_user_enable_queue_pair(struct virtio_user_dev *dev,
return -1;
}
+ dev->qp_enabled[pair_idx] = enable;
return 0;
}
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index ffbaa75b7e..1c6b26f8d3 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -546,8 +546,11 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
}
if (dev->vhostfds) {
- for (i = 0; i < dev->max_queue_pairs; ++i)
+ for (i = 0; i < dev->max_queue_pairs; ++i) {
close(dev->vhostfds[i]);
+ if (dev->tapfds[i] >= 0)
+ close(dev->tapfds[i]);
+ }
free(dev->vhostfds);
free(dev->tapfds);
}
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index ad86837717..3b6b6065a5 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -49,6 +49,7 @@ struct virtio_user_dev {
struct vring_packed packed_vrings[VIRTIO_MAX_VIRTQUEUES];
};
struct virtio_user_queue packed_queues[VIRTIO_MAX_VIRTQUEUES];
+ bool qp_enabled[VIRTIO_MAX_VIRTQUEUE_PAIRS];
struct virtio_user_backend_ops *ops;
pthread_mutex_t mutex;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.068799470 +0000
+++ 0091-net-virtio-user-do-not-close-tap-when-disabling-queu.patch 2020-02-11 11:17:38.532003815 +0000
@@ -1,14 +1,15 @@
-From 47ac9661b68275321fae0876cce743b9d17671fe Mon Sep 17 00:00:00 2001
+From 45111bf63dd1e8f9726ece577ae38f4aea4d2e3e Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 25 Nov 2019 16:14:40 +0800
Subject: [PATCH] net/virtio-user: do not close tap when disabling queue pairs
+[ upstream commit 47ac9661b68275321fae0876cce743b9d17671fe ]
+
Do not close the tap fds when disabling queue pairs, instead,
we just need to unbind the backend. Otherwise, tap port can be
destroyed unexpectedly.
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
-Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (89 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " luca.boccassi
` (97 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b14d5ed90a4bff8043d6cbf27930a36672eacf8b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 13 Jan 2020 15:40:31 +0800
Subject: [PATCH] net/virtio-user: check tap offload setting failure
[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]
The function vhost_kernel_tap_set_offload() could return errors,
the return value need to be checked. And there is no need to fail
when error is -ENOTSUP.
Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 2fbfecba12..2fa4f0d661 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -74,6 +74,7 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
int sndbuf = INT_MAX;
struct ifreq ifr;
int tapfd;
+ int ret;
/* TODO:
* 1. verify we can get/set vnet_hdr_len, tap_probe_vnet_hdr_len
@@ -139,7 +140,9 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
goto error;
}
- vhost_kernel_tap_set_offload(tapfd, features);
+ ret = vhost_kernel_tap_set_offload(tapfd, features);
+ if (ret < 0 && ret != -ENOTSUP)
+ goto error;
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_hwaddr.sa_family = ARPHRD_ETHER;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.097645526 +0000
+++ 0092-net-virtio-user-check-tap-offload-setting-failure.patch 2020-02-11 11:17:38.532003815 +0000
@@ -1,14 +1,15 @@
-From 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 Mon Sep 17 00:00:00 2001
+From b14d5ed90a4bff8043d6cbf27930a36672eacf8b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 13 Jan 2020 15:40:31 +0800
Subject: [PATCH] net/virtio-user: check tap offload setting failure
+[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]
+
The function vhost_kernel_tap_set_offload() could return errors,
the return value need to be checked. And there is no need to fail
when error is -ENOTSUP.
Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")
-Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: fix deadlock on port deletion' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (90 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: fix packed ring server mode' " luca.boccassi
` (96 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Tiwei Bie, Eelco Chaudron, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4e1bf3fcbafa4f23d69097d8cf2bc55d3b297e9a Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 14 Jan 2020 19:53:57 +0100
Subject: [PATCH] vhost: fix deadlock on port deletion
[ upstream commit 5efb18e85f7fdb436d3e56591656051c16802066 ]
If the vhost-user application (e.g. OVS) deletes the vhost-user
port while Qemu sends a vhost-user request, a deadlock can
happen if the request handler tries to acquire vhost-user's
global mutex, which is also locked by the vhost-user port
deletion API (rte_vhost_driver_unregister).
This patch prevents the deadlock by making
rte_vhost_driver_unregister() to release the mutex and try
again if a request is being handled to give a chance to
the request handler to complete.
Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode")
Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
lib/librte_vhost/socket.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 834f0b88ad..785cea46e5 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -1052,9 +1052,10 @@ again:
next = TAILQ_NEXT(conn, next);
/*
- * If r/wcb is executing, release the
- * conn_mutex lock, and try again since
- * the r/wcb may use the conn_mutex lock.
+ * If r/wcb is executing, release vsocket's
+ * conn_mutex and vhost_user's mutex locks, and
+ * try again since the r/wcb may use the
+ * conn_mutex and mutex locks.
*/
if (fdset_try_del(&vhost_user.fdset,
conn->connfd) == -1) {
@@ -1075,8 +1076,17 @@ again:
pthread_mutex_unlock(&vsocket->conn_mutex);
if (vsocket->is_server) {
- fdset_del(&vhost_user.fdset,
- vsocket->socket_fd);
+ /*
+ * If r/wcb is executing, release vhost_user's
+ * mutex lock, and try again since the r/wcb
+ * may use the mutex lock.
+ */
+ if (fdset_try_del(&vhost_user.fdset,
+ vsocket->socket_fd) == -1) {
+ pthread_mutex_unlock(&vhost_user.mutex);
+ goto again;
+ }
+
close(vsocket->socket_fd);
unlink(path);
} else if (vsocket->reconnect) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.124598769 +0000
+++ 0093-vhost-fix-deadlock-on-port-deletion.patch 2020-02-11 11:17:38.532003815 +0000
@@ -1,8 +1,10 @@
-From 5efb18e85f7fdb436d3e56591656051c16802066 Mon Sep 17 00:00:00 2001
+From 4e1bf3fcbafa4f23d69097d8cf2bc55d3b297e9a Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 14 Jan 2020 19:53:57 +0100
Subject: [PATCH] vhost: fix deadlock on port deletion
+[ upstream commit 5efb18e85f7fdb436d3e56591656051c16802066 ]
+
If the vhost-user application (e.g. OVS) deletes the vhost-user
port while Qemu sends a vhost-user request, a deadlock can
happen if the request handler tries to acquire vhost-user's
@@ -16,7 +18,6 @@
Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode")
Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs")
-Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -26,7 +27,7 @@
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 8bc1e3a03c..9740fb3403 100644
+index 834f0b88ad..785cea46e5 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -1052,9 +1052,10 @@ again:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: fix packed ring server mode' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (91 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix doorbell register offset type' " luca.boccassi
` (95 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xuan Ding; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1d8dce55d16abced072aac16a293cf5d3b49fdfb Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Wed, 15 Jan 2020 06:13:58 +0000
Subject: [PATCH] net/virtio-user: fix packed ring server mode
[ upstream commit 6ebbf4109f3529a1af880ce195869cee84647178 ]
This patch fixes the situation where data path does not work properly
when vhost reconnects to virtio in server mode with packed ring.
Currently, virtio and vhost share memory of vring. For split ring, vhost
can read the status of descriptors directly from the available ring and
the used ring during reconnection. Therefore, the data path can
continue.
But for packed ring, when reconnecting to virtio, vhost cannot get the
status of descriptors via the descriptor ring. By resetting Tx
and Rx queues, the data path can restart from the beginning.
Fixes: 4c3f5822eb21 ("net/virtio: add packed virtqueue defines")
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 4 +-
drivers/net/virtio/virtio_user_ethdev.c | 43 +++++++++++++++
drivers/net/virtio/virtqueue.c | 71 +++++++++++++++++++++++++
drivers/net/virtio/virtqueue.h | 4 ++
4 files changed, 120 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 044eb10a70..f9d0ea70db 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1913,6 +1913,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
goto err_vtpci_init;
}
+ rte_spinlock_init(&hw->state_lock);
+
/* reset device and negotiate default features */
ret = virtio_init_device(eth_dev, VIRTIO_PMD_DEFAULT_GUEST_FEATURES);
if (ret < 0)
@@ -2155,8 +2157,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return -EBUSY;
}
- rte_spinlock_init(&hw->state_lock);
-
hw->use_simple_rx = 1;
if (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 3fc1725736..f3b35d1bdd 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -13,6 +13,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_bus_vdev.h>
#include <rte_alarm.h>
+#include <rte_cycles.h>
#include "virtio_ethdev.h"
#include "virtio_logs.h"
@@ -25,12 +26,48 @@
#define virtio_user_get_dev(hw) \
((struct virtio_user_dev *)(hw)->virtio_user_dev)
+static void
+virtio_user_reset_queues_packed(struct rte_eth_dev *dev)
+{
+ struct virtio_hw *hw = dev->data->dev_private;
+ struct virtnet_rx *rxvq;
+ struct virtnet_tx *txvq;
+ uint16_t i;
+
+ /* Add lock to avoid queue contention. */
+ rte_spinlock_lock(&hw->state_lock);
+ hw->started = 0;
+
+ /*
+ * Waitting for datapath to complete before resetting queues.
+ * 1 ms should be enough for the ongoing Tx/Rx function to finish.
+ */
+ rte_delay_ms(1);
+
+ /* Vring reset for each Tx queue and Rx queue. */
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ rxvq = dev->data->rx_queues[i];
+ virtqueue_rxvq_reset_packed(rxvq->vq);
+ virtio_dev_rx_queue_setup_finish(dev, i);
+ }
+
+ for (i = 0; i < dev->data->nb_tx_queues; i++) {
+ txvq = dev->data->tx_queues[i];
+ virtqueue_txvq_reset_packed(txvq->vq);
+ }
+
+ hw->started = 1;
+ rte_spinlock_unlock(&hw->state_lock);
+}
+
+
static int
virtio_user_server_reconnect(struct virtio_user_dev *dev)
{
int ret;
int connectfd;
struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
+ struct virtio_hw *hw = eth_dev->data->dev_private;
connectfd = accept(dev->listenfd, NULL, NULL);
if (connectfd < 0)
@@ -51,6 +88,12 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
dev->features &= dev->device_features;
+ /* For packed ring, resetting queues is required in reconnection. */
+ if (vtpci_packed_queue(hw))
+ PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
+ " when packed ring reconnecting.");
+ virtio_user_reset_queues_packed(eth_dev);
+
ret = virtio_user_start_device(dev);
if (ret < 0)
return -1;
diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 5ff1e3587e..0b4e3bf3e2 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -141,3 +141,74 @@ virtqueue_rxvq_flush(struct virtqueue *vq)
else
virtqueue_rxvq_flush_split(vq);
}
+
+int
+virtqueue_rxvq_reset_packed(struct virtqueue *vq)
+{
+ int size = vq->vq_nentries;
+ struct vq_desc_extra *dxp;
+ struct virtnet_rx *rxvq;
+ uint16_t desc_idx;
+
+ vq->vq_used_cons_idx = 0;
+ vq->vq_desc_head_idx = 0;
+ vq->vq_avail_idx = 0;
+ vq->vq_desc_tail_idx = (uint16_t)(vq->vq_nentries - 1);
+ vq->vq_free_cnt = vq->vq_nentries;
+
+ vq->vq_packed.used_wrap_counter = 1;
+ vq->vq_packed.cached_flags = VRING_PACKED_DESC_F_AVAIL;
+ vq->vq_packed.event_flags_shadow = 0;
+ vq->vq_packed.cached_flags |= VRING_DESC_F_WRITE;
+
+ rxvq = &vq->rxq;
+ memset(rxvq->mz->addr, 0, rxvq->mz->len);
+
+ for (desc_idx = 0; desc_idx < vq->vq_nentries; desc_idx++) {
+ dxp = &vq->vq_descx[desc_idx];
+ if (dxp->cookie != NULL) {
+ rte_pktmbuf_free(dxp->cookie);
+ dxp->cookie = NULL;
+ }
+ }
+
+ vring_desc_init_packed(vq, size);
+
+ return 0;
+}
+
+int
+virtqueue_txvq_reset_packed(struct virtqueue *vq)
+{
+ int size = vq->vq_nentries;
+ struct vq_desc_extra *dxp;
+ struct virtnet_tx *txvq;
+ uint16_t desc_idx;
+
+ vq->vq_used_cons_idx = 0;
+ vq->vq_desc_head_idx = 0;
+ vq->vq_avail_idx = 0;
+ vq->vq_desc_tail_idx = (uint16_t)(vq->vq_nentries - 1);
+ vq->vq_free_cnt = vq->vq_nentries;
+
+ vq->vq_packed.used_wrap_counter = 1;
+ vq->vq_packed.cached_flags = VRING_PACKED_DESC_F_AVAIL;
+ vq->vq_packed.event_flags_shadow = 0;
+
+ txvq = &vq->txq;
+ memset(txvq->mz->addr, 0, txvq->mz->len);
+ memset(txvq->virtio_net_hdr_mz->addr, 0,
+ txvq->virtio_net_hdr_mz->len);
+
+ for (desc_idx = 0; desc_idx < vq->vq_nentries; desc_idx++) {
+ dxp = &vq->vq_descx[desc_idx];
+ if (dxp->cookie != NULL) {
+ rte_pktmbuf_free(dxp->cookie);
+ dxp->cookie = NULL;
+ }
+ }
+
+ vring_desc_init_packed(vq, size);
+
+ return 0;
+}
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 8d7f197b13..58ad7309ae 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -443,6 +443,10 @@ struct rte_mbuf *virtqueue_detach_unused(struct virtqueue *vq);
/* Flush the elements in the used ring. */
void virtqueue_rxvq_flush(struct virtqueue *vq);
+int virtqueue_rxvq_reset_packed(struct virtqueue *vq);
+
+int virtqueue_txvq_reset_packed(struct virtqueue *vq);
+
static inline int
virtqueue_full(const struct virtqueue *vq)
{
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.152638556 +0000
+++ 0094-net-virtio-user-fix-packed-ring-server-mode.patch 2020-02-11 11:17:38.536003890 +0000
@@ -1,8 +1,10 @@
-From 6ebbf4109f3529a1af880ce195869cee84647178 Mon Sep 17 00:00:00 2001
+From 1d8dce55d16abced072aac16a293cf5d3b49fdfb Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Wed, 15 Jan 2020 06:13:58 +0000
Subject: [PATCH] net/virtio-user: fix packed ring server mode
+[ upstream commit 6ebbf4109f3529a1af880ce195869cee84647178 ]
+
This patch fixes the situation where data path does not work properly
when vhost reconnects to virtio in server mode with packed ring.
@@ -16,7 +18,6 @@
and Rx queues, the data path can restart from the beginning.
Fixes: 4c3f5822eb21 ("net/virtio: add packed virtqueue defines")
-Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix doorbell register offset type' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (92 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: fix packed ring server mode' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: fix Tx when TSO is enabled' " luca.boccassi
` (94 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c2a4f50aec8d9a4380089a4df6b55e707aaea7aa Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Mon, 13 Jan 2020 14:22:37 +0000
Subject: [PATCH] net/mlx5: fix doorbell register offset type
[ upstream commit 7b836d84435e887727f16521ece721e6a75984a5 ]
The doorbell register is mapped using mmap() and offset
must have off_t instead of unsigned int. Bug is not critical
due to only least significant bits of offset are currently
tested to determine mapping mode.
Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_txq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1c4f7e7a5d..16856d796c 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -314,7 +314,7 @@ static void
txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size)
{
struct mlx5_priv *priv = txq_ctrl->priv;
- unsigned int cmd;
+ off_t cmd;
txq_ctrl->txq.db_heu = priv->config.dbnc == MLX5_TXDB_HEURISTIC;
txq_ctrl->txq.db_nc = 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.183058734 +0000
+++ 0095-net-mlx5-fix-doorbell-register-offset-type.patch 2020-02-11 11:17:38.536003890 +0000
@@ -1,15 +1,16 @@
-From 7b836d84435e887727f16521ece721e6a75984a5 Mon Sep 17 00:00:00 2001
+From c2a4f50aec8d9a4380089a4df6b55e707aaea7aa Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Mon, 13 Jan 2020 14:22:37 +0000
Subject: [PATCH] net/mlx5: fix doorbell register offset type
+[ upstream commit 7b836d84435e887727f16521ece721e6a75984a5 ]
+
The doorbell register is mapped using mmap() and offset
must have off_t instead of unsigned int. Bug is not critical
due to only least significant bits of offset are currently
tested to determine mapping mode.
Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix Tx when TSO is enabled' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (93 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix doorbell register offset type' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " luca.boccassi
` (93 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 600e7b622abdaf4405005fcb6e8226e4e5f34195 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 26 Dec 2019 14:54:28 +0800
Subject: [PATCH] net/ice: fix Tx when TSO is enabled
[ upstream commit f1514bcb27214557d349ca96a94857421135a844 ]
Hardware limits that max buffer size per Tx descriptor should be
(16K-1)B. So when TSO enabled, the mbuf data size may exceed the
limit and cause malicious behavior to the NIC. This patch fixes
this issue by using more Tx descs for this kind of large buffer.
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx.c | 58 ++++++++++++++++++++++++++++++++++----
1 file changed, 53 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index b4f5367c5a..ccc2c93398 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2421,6 +2421,24 @@ ice_set_tso_ctx(struct rte_mbuf *mbuf, union ice_tx_offload tx_offload)
return ctx_desc;
}
+/* HW requires that TX buffer size ranges from 1B up to (16K-1)B. */
+#define ICE_MAX_DATA_PER_TXD \
+ (ICE_TXD_QW1_TX_BUF_SZ_M >> ICE_TXD_QW1_TX_BUF_SZ_S)
+/* Calculate the number of TX descriptors needed for each pkt */
+static inline uint16_t
+ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
+{
+ struct rte_mbuf *txd = tx_pkt;
+ uint16_t count = 0;
+
+ while (txd != NULL) {
+ count += DIV_ROUND_UP(txd->data_len, ICE_MAX_DATA_PER_TXD);
+ txd = txd->next;
+ }
+
+ return count;
+}
+
uint16_t
ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
{
@@ -2440,6 +2458,7 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
uint32_t td_offset = 0;
uint32_t td_tag = 0;
uint16_t tx_last;
+ uint16_t slen;
uint64_t buf_dma_addr;
uint64_t ol_flags;
union ice_tx_offload tx_offload = {0};
@@ -2471,8 +2490,15 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* The number of descriptors that must be allocated for
* a packet equals to the number of the segments of that
* packet plus the number of context descriptor if needed.
+ * Recalculate the needed tx descs when TSO enabled in case
+ * the mbuf data size exceeds max data size that hw allows
+ * per tx desc.
*/
- nb_used = (uint16_t)(tx_pkt->nb_segs + nb_ctx);
+ if (ol_flags & PKT_TX_TCP_SEG)
+ nb_used = (uint16_t)(ice_calc_pkt_desc(tx_pkt) +
+ nb_ctx);
+ else
+ nb_used = (uint16_t)(tx_pkt->nb_segs + nb_ctx);
tx_last = (uint16_t)(tx_id + nb_used - 1);
/* Circular ring */
@@ -2562,15 +2588,37 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
txe->mbuf = m_seg;
/* Setup TX Descriptor */
+ slen = m_seg->data_len;
buf_dma_addr = rte_mbuf_data_iova(m_seg);
+
+ while ((ol_flags & PKT_TX_TCP_SEG) &&
+ unlikely(slen > ICE_MAX_DATA_PER_TXD)) {
+ txd->buf_addr = rte_cpu_to_le_64(buf_dma_addr);
+ txd->cmd_type_offset_bsz =
+ rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DATA |
+ ((uint64_t)td_cmd << ICE_TXD_QW1_CMD_S) |
+ ((uint64_t)td_offset << ICE_TXD_QW1_OFFSET_S) |
+ ((uint64_t)ICE_MAX_DATA_PER_TXD <<
+ ICE_TXD_QW1_TX_BUF_SZ_S) |
+ ((uint64_t)td_tag << ICE_TXD_QW1_L2TAG1_S));
+
+ buf_dma_addr += ICE_MAX_DATA_PER_TXD;
+ slen -= ICE_MAX_DATA_PER_TXD;
+
+ txe->last_id = tx_last;
+ tx_id = txe->next_id;
+ txe = txn;
+ txd = &tx_ring[tx_id];
+ txn = &sw_ring[txe->next_id];
+ }
+
txd->buf_addr = rte_cpu_to_le_64(buf_dma_addr);
txd->cmd_type_offset_bsz =
rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DATA |
- ((uint64_t)td_cmd << ICE_TXD_QW1_CMD_S) |
+ ((uint64_t)td_cmd << ICE_TXD_QW1_CMD_S) |
((uint64_t)td_offset << ICE_TXD_QW1_OFFSET_S) |
- ((uint64_t)m_seg->data_len <<
- ICE_TXD_QW1_TX_BUF_SZ_S) |
- ((uint64_t)td_tag << ICE_TXD_QW1_L2TAG1_S));
+ ((uint64_t)slen << ICE_TXD_QW1_TX_BUF_SZ_S) |
+ ((uint64_t)td_tag << ICE_TXD_QW1_L2TAG1_S));
txe->last_id = tx_last;
tx_id = txe->next_id;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.211429873 +0000
+++ 0096-net-ice-fix-Tx-when-TSO-is-enabled.patch 2020-02-11 11:17:38.536003890 +0000
@@ -1,15 +1,16 @@
-From f1514bcb27214557d349ca96a94857421135a844 Mon Sep 17 00:00:00 2001
+From 600e7b622abdaf4405005fcb6e8226e4e5f34195 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 26 Dec 2019 14:54:28 +0800
Subject: [PATCH] net/ice: fix Tx when TSO is enabled
+[ upstream commit f1514bcb27214557d349ca96a94857421135a844 ]
+
Hardware limits that max buffer size per Tx descriptor should be
(16K-1)B. So when TSO enabled, the mbuf data size may exceed the
limit and cause malicious behavior to the NIC. This patch fixes
this issue by using more Tx descs for this kind of large buffer.
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -18,7 +19,7 @@
1 file changed, 53 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index 5f4fc42a8e..2fa737a97c 100644
+index b4f5367c5a..ccc2c93398 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2421,6 +2421,24 @@ ice_set_tso_ctx(struct rte_mbuf *mbuf, union ice_tx_offload tx_offload)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (94 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: fix Tx when TSO is enabled' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " luca.boccassi
` (92 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Reshma Pattan; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 43275cf718b04338c078912742ac0e67a52d84b9 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 14 Jan 2020 11:29:43 +0000
Subject: [PATCH] net/ixgbe: remove duplicate function declaration
[ upstream commit 1438472e6ec3bb411bc44f17147a2f0d4d0238de ]
Remove duplicate declarations of ixgbe_xmit_fixed_burst_vec
from ixgbe_rxtx.c
Fixes: 646412f9ff62 ("net/ixgbe: remove limit of Tx burst size")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184d..91f5fe1517 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -87,11 +87,6 @@
#define rte_ixgbe_prefetch(p) do {} while (0)
#endif
-#ifdef RTE_IXGBE_INC_VECTOR
-uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
-#endif
-
/*********************************************************************
*
* TX functions
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.241162165 +0000
+++ 0097-net-ixgbe-remove-duplicate-function-declaration.patch 2020-02-11 11:17:38.544004040 +0000
@@ -1,13 +1,14 @@
-From 1438472e6ec3bb411bc44f17147a2f0d4d0238de Mon Sep 17 00:00:00 2001
+From 43275cf718b04338c078912742ac0e67a52d84b9 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 14 Jan 2020 11:29:43 +0000
Subject: [PATCH] net/ixgbe: remove duplicate function declaration
+[ upstream commit 1438472e6ec3bb411bc44f17147a2f0d4d0238de ]
+
Remove duplicate declarations of ixgbe_xmit_fixed_burst_vec
from ixgbe_rxtx.c
Fixes: 646412f9ff62 ("net/ixgbe: remove limit of Tx burst size")
-Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -16,14 +17,14 @@
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index ac8fae745e..1b9554ce91 100644
+index fa572d184d..91f5fe1517 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -87,11 +87,6 @@
#define rte_ixgbe_prefetch(p) do {} while (0)
#endif
--#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+-#ifdef RTE_IXGBE_INC_VECTOR
-uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
-#endif
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (95 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " luca.boccassi
` (91 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Apeksha Gupta; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ba0d3f9bae1e243b9573b06c61c4f3793c052a39 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Thu, 16 Jan 2020 13:26:38 +0530
Subject: [PATCH] net/dpaa: fix Rx offload flags on jumbo MTU set
[ upstream commit 40c79ea091e37efc836597cac2fa98be08feb72a ]
The JUMBO frame handling in dpaa_dev_mtu_set api was not correct.
When frame_size is greater than RTE_ETHER_MAX_LEN, the
intention is to add JUMBO flag in rx offload while it was resetting
all other flags other than JUMBO as AND operator was used instead of OR.
Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 26805f17b7..fce9ce2feb 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -174,7 +174,7 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
}
if (frame_size > RTE_ETHER_MAX_LEN)
- dev->data->dev_conf.rxmode.offloads &=
+ dev->data->dev_conf.rxmode.offloads |=
DEV_RX_OFFLOAD_JUMBO_FRAME;
else
dev->data->dev_conf.rxmode.offloads &=
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.273433964 +0000
+++ 0098-net-dpaa-fix-Rx-offload-flags-on-jumbo-MTU-set.patch 2020-02-11 11:17:38.544004040 +0000
@@ -1,15 +1,16 @@
-From 40c79ea091e37efc836597cac2fa98be08feb72a Mon Sep 17 00:00:00 2001
+From ba0d3f9bae1e243b9573b06c61c4f3793c052a39 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Thu, 16 Jan 2020 13:26:38 +0530
Subject: [PATCH] net/dpaa: fix Rx offload flags on jumbo MTU set
+[ upstream commit 40c79ea091e37efc836597cac2fa98be08feb72a ]
+
The JUMBO frame handling in dpaa_dev_mtu_set api was not correct.
When frame_size is greater than RTE_ETHER_MAX_LEN, the
intention is to add JUMBO flag in rx offload while it was resetting
all other flags other than JUMBO as AND operator was used instead of OR.
Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
-Cc: stable@dpdk.org
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ethdev: fix switching domain allocation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (96 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix shared metadata matcher field setup' " luca.boccassi
` (90 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a24a24e86348360770e8637da79c482e7ec007b7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 16 Jan 2020 16:19:54 +0000
Subject: [PATCH] ethdev: fix switching domain allocation
[ upstream commit 7e9165b1beb77554916686cb4ff4d16c4e995b74 ]
The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.
The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
updated to initialize dev_ibfo structure accordingly.
Fixes: ce9250406323 ("ethdev: add switch domain allocator")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.c | 4 ++--
lib/librte_ethdev/rte_ethdev.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index aec2d0f704..42ce177fe1 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2968,6 +2968,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
* return status and does not know if get is successful or not.
*/
memset(dev_info, 0, sizeof(struct rte_eth_dev_info));
+ dev_info->switch_info.domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
dev = &rte_eth_devices[port_id];
@@ -5064,8 +5065,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id)
*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
- for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
- i < RTE_MAX_ETHPORTS; i++) {
+ for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
if (rte_eth_switch_domains[i].state ==
RTE_ETH_SWITCH_DOMAIN_UNUSED) {
rte_eth_switch_domains[i].state =
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 18a9defc24..d1a593ad11 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1196,7 +1196,7 @@ struct rte_eth_dev_portconf {
* Default values for switch domain id when ethdev does not support switch
* domain definitions.
*/
-#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (0)
+#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX)
/**
* Ethernet device associated switch information
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.301683295 +0000
+++ 0099-ethdev-fix-switching-domain-allocation.patch 2020-02-11 11:17:38.548004114 +0000
@@ -1,8 +1,10 @@
-From 7e9165b1beb77554916686cb4ff4d16c4e995b74 Mon Sep 17 00:00:00 2001
+From a24a24e86348360770e8637da79c482e7ec007b7 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 16 Jan 2020 16:19:54 +0000
Subject: [PATCH] ethdev: fix switching domain allocation
+[ upstream commit 7e9165b1beb77554916686cb4ff4d16c4e995b74 ]
+
The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.
@@ -12,7 +14,6 @@
updated to initialize dev_ibfo structure accordingly.
Fixes: ce9250406323 ("ethdev: add switch domain allocator")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix shared metadata matcher field setup' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (97 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix matcher field usage for metadata entities' " luca.boccassi
` (89 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a7a7bbba6c9a59fcdb10e1a89eecb920416458ed Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 11:01:34 +0000
Subject: [PATCH] net/mlx5: fix shared metadata matcher field setup
[ upstream commit abde8206f236c39b33498b8098c4760f68d78f18 ]
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. Some fields
in this structure might be split (by software) between multiple items.
For example, the metadata register c0 field in the matcher might be
split into two independent subfields - the source vport index and
META item value. These subfields have no permanent assigned masks,
the actual configuration is queried from the kernel drivers in
runtime. To handle source vport value (the port of e-Switch which
is origin of the packet) the kernel might use the dedicated vport
field in the matcher or the part of register c0 field, depending
on configuration.
To setup the matcher structure fields the macro MLX5_SET is used.
MLX5_SET configures the specified 32-bit field as whole entity.
For metadata register c0 we should take into account the provided
mask in order to configure the specified subfield bits only,
otherwise setting vport overrides the META values and vice versa.
Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index baf617aaa6..9dd0dbdc0a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5748,6 +5748,7 @@ flow_dv_match_meta_reg(void *matcher, void *key,
MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_2);
void *misc2_v =
MLX5_ADDR_OF(fte_match_param, key, misc_parameters_2);
+ uint32_t temp;
data &= mask;
switch (reg_type) {
@@ -5760,8 +5761,18 @@ flow_dv_match_meta_reg(void *matcher, void *key,
MLX5_SET(fte_match_set_misc2, misc2_v, metadata_reg_b, data);
break;
case REG_C_0:
- MLX5_SET(fte_match_set_misc2, misc2_m, metadata_reg_c_0, mask);
- MLX5_SET(fte_match_set_misc2, misc2_v, metadata_reg_c_0, data);
+ /*
+ * The metadata register C0 field might be divided into
+ * source vport index and META item value, we should set
+ * this field according to specified mask, not as whole one.
+ */
+ temp = MLX5_GET(fte_match_set_misc2, misc2_m, metadata_reg_c_0);
+ temp |= mask;
+ MLX5_SET(fte_match_set_misc2, misc2_m, metadata_reg_c_0, temp);
+ temp = MLX5_GET(fte_match_set_misc2, misc2_v, metadata_reg_c_0);
+ temp &= ~mask;
+ temp |= data;
+ MLX5_SET(fte_match_set_misc2, misc2_v, metadata_reg_c_0, temp);
break;
case REG_C_1:
MLX5_SET(fte_match_set_misc2, misc2_m, metadata_reg_c_1, mask);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.336879158 +0000
+++ 0100-net-mlx5-fix-shared-metadata-matcher-field-setup.patch 2020-02-11 11:17:38.556004264 +0000
@@ -1,8 +1,10 @@
-From abde8206f236c39b33498b8098c4760f68d78f18 Mon Sep 17 00:00:00 2001
+From a7a7bbba6c9a59fcdb10e1a89eecb920416458ed Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 11:01:34 +0000
Subject: [PATCH] net/mlx5: fix shared metadata matcher field setup
+[ upstream commit abde8206f236c39b33498b8098c4760f68d78f18 ]
+
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. Some fields
in this structure might be split (by software) between multiple items.
@@ -23,7 +25,6 @@
otherwise setting vport overrides the META values and vice versa.
Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -32,10 +33,10 @@
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e37ed93c12..e1b2534d9f 100644
+index baf617aaa6..9dd0dbdc0a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5920,6 +5920,7 @@ flow_dv_match_meta_reg(void *matcher, void *key,
+@@ -5748,6 +5748,7 @@ flow_dv_match_meta_reg(void *matcher, void *key,
MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_2);
void *misc2_v =
MLX5_ADDR_OF(fte_match_param, key, misc_parameters_2);
@@ -43,7 +44,7 @@
data &= mask;
switch (reg_type) {
-@@ -5932,8 +5933,18 @@ flow_dv_match_meta_reg(void *matcher, void *key,
+@@ -5760,8 +5761,18 @@ flow_dv_match_meta_reg(void *matcher, void *key,
MLX5_SET(fte_match_set_misc2, misc2_v, metadata_reg_b, data);
break;
case REG_C_0:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix matcher field usage for metadata entities' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (98 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix shared metadata matcher field setup' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix metadata item endianness conversion' " luca.boccassi
` (88 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From aa2fd4ad6061da72ecfcf20ef1d8a7237c8ef6c9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 11:16:06 +0000
Subject: [PATCH] net/mlx5: fix matcher field usage for metadata entities
[ upstream commit fde4341b665786632c6e4375ac25af65a3a5eebb ]
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. This structure
includes the metadata register c0 field, that might be engaged to
support META and MARK related flow items and actions. Also, this
register might be used by kernel to specify the source vport index.
In this case (if kernel uses the field) the register c0 is split
into two 16-bit subfields - one for META/MARK items and another
to handle vport.
The actual configuration is queried by PMD from kernel in runtime
and depending on the mask returned by kernel the PMD can use upper
or lower half of register c0 field. This patch adds the missing
support for upper half. This missed support caused the non-operational
META/MARK items on some kernel configurations.
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 39 +++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9dd0dbdc0a..c9bb76a8fc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1088,6 +1088,14 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
if (reg < 0)
return reg;
assert(reg > 0);
+ if (reg == REG_C_0) {
+ uint32_t msk_c0 = priv->sh->dv_regc0_mask;
+ uint32_t shl_c0 = rte_bsf32(msk_c0);
+
+ data = rte_cpu_to_be_32(rte_cpu_to_be_32(data) << shl_c0);
+ mask = rte_cpu_to_be_32(mask) & msk_c0;
+ mask = rte_cpu_to_be_32(mask << shl_c0);
+ }
reg_c_x[0].id = reg_to_field[reg];
return flow_dv_convert_modify_action(&item, reg_c_x, NULL, resource,
MLX5_MODIFICATION_TYPE_SET, error);
@@ -5842,6 +5850,15 @@ flow_dv_translate_item_mark(struct rte_eth_dev *dev,
/* Get the metadata register index for the mark. */
reg = mlx5_flow_get_reg_id(dev, MLX5_FLOW_MARK, 0, NULL);
assert(reg > 0);
+ if (reg == REG_C_0) {
+ struct mlx5_priv *priv = dev->data->dev_private;
+ uint32_t msk_c0 = priv->sh->dv_regc0_mask;
+ uint32_t shl_c0 = rte_bsf32(msk_c0);
+
+ mask &= msk_c0;
+ mask <<= shl_c0;
+ value <<= shl_c0;
+ }
flow_dv_match_meta_reg(matcher, key, reg, value, mask);
}
}
@@ -5923,6 +5940,8 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
/**
* Add tag item to matcher
*
+ * @param[in] dev
+ * The devich to configure through.
* @param[in, out] matcher
* Flow matcher.
* @param[in, out] key
@@ -5931,15 +5950,27 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
* Flow pattern to translate.
*/
static void
-flow_dv_translate_mlx5_item_tag(void *matcher, void *key,
+flow_dv_translate_mlx5_item_tag(struct rte_eth_dev *dev,
+ void *matcher, void *key,
const struct rte_flow_item *item)
{
const struct mlx5_rte_flow_item_tag *tag_v = item->spec;
const struct mlx5_rte_flow_item_tag *tag_m = item->mask;
+ uint32_t mask, value;
assert(tag_v);
- flow_dv_match_meta_reg(matcher, key, tag_v->id, tag_v->data,
- tag_m ? tag_m->data : UINT32_MAX);
+ value = tag_v->data;
+ mask = tag_m ? tag_m->data : UINT32_MAX;
+ if (tag_v->id == REG_C_0) {
+ struct mlx5_priv *priv = dev->data->dev_private;
+ uint32_t msk_c0 = priv->sh->dv_regc0_mask;
+ uint32_t shl_c0 = rte_bsf32(msk_c0);
+
+ mask &= msk_c0;
+ mask <<= shl_c0;
+ value <<= shl_c0;
+ }
+ flow_dv_match_meta_reg(matcher, key, tag_v->id, value, mask);
}
/**
@@ -7237,7 +7268,7 @@ cnt_err:
last_item = MLX5_FLOW_ITEM_TAG;
break;
case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
- flow_dv_translate_mlx5_item_tag(match_mask,
+ flow_dv_translate_mlx5_item_tag(dev, match_mask,
match_value, items);
last_item = MLX5_FLOW_ITEM_TAG;
break;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.371368102 +0000
+++ 0101-net-mlx5-fix-matcher-field-usage-for-metadata-entiti.patch 2020-02-11 11:17:38.564004414 +0000
@@ -1,8 +1,10 @@
-From fde4341b665786632c6e4375ac25af65a3a5eebb Mon Sep 17 00:00:00 2001
+From aa2fd4ad6061da72ecfcf20ef1d8a7237c8ef6c9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 11:16:06 +0000
Subject: [PATCH] net/mlx5: fix matcher field usage for metadata entities
+[ upstream commit fde4341b665786632c6e4375ac25af65a3a5eebb ]
+
Matcher is flow table related structure providing the flow pattern
to be translated directly in hardware controlling data. This structure
includes the metadata register c0 field, that might be engaged to
@@ -19,7 +21,6 @@
META/MARK items on some kernel configurations.
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -28,10 +29,10 @@
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e1b2534d9f..da988f9dd7 100644
+index 9dd0dbdc0a..c9bb76a8fc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1090,6 +1090,14 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
+@@ -1088,6 +1088,14 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
if (reg < 0)
return reg;
assert(reg > 0);
@@ -46,7 +47,7 @@
reg_c_x[0].id = reg_to_field[reg];
return flow_dv_convert_modify_action(&item, reg_c_x, NULL, resource,
MLX5_MODIFICATION_TYPE_SET, error);
-@@ -6014,6 +6022,15 @@ flow_dv_translate_item_mark(struct rte_eth_dev *dev,
+@@ -5842,6 +5850,15 @@ flow_dv_translate_item_mark(struct rte_eth_dev *dev,
/* Get the metadata register index for the mark. */
reg = mlx5_flow_get_reg_id(dev, MLX5_FLOW_MARK, 0, NULL);
assert(reg > 0);
@@ -62,7 +63,7 @@
flow_dv_match_meta_reg(matcher, key, reg, value, mask);
}
}
-@@ -6095,6 +6112,8 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
+@@ -5923,6 +5940,8 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
/**
* Add tag item to matcher
*
@@ -71,7 +72,7 @@
* @param[in, out] matcher
* Flow matcher.
* @param[in, out] key
-@@ -6103,15 +6122,27 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
+@@ -5931,15 +5950,27 @@ flow_dv_translate_item_meta_vport(void *matcher, void *key,
* Flow pattern to translate.
*/
static void
@@ -102,7 +103,7 @@
}
/**
-@@ -7470,7 +7501,7 @@ cnt_err:
+@@ -7237,7 +7268,7 @@ cnt_err:
last_item = MLX5_FLOW_ITEM_TAG;
break;
case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix metadata item endianness conversion' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (99 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix matcher field usage for metadata entities' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " luca.boccassi
` (87 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cbc1f8d1408a58b1b1fc89ba82c7e2bbc94ab9a9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 14:59:32 +0000
Subject: [PATCH] net/mlx5: fix metadata item endianness conversion
[ upstream commit 39c09c22e5b5c46cf8f44826a1c759e036f3af3a ]
The mlx5 datapath does not implement any endianness conversions
for the metadata being sent and received to provide the better
performance (because these conversions would be performed for
each packet). These metadata are also involved into flow processing
(there might be some flows matching on metadata patterns or setting
the new metadata values) inside the NIC. It order to configure
hardware in correct way all necessary endianness conversions are
done by rte_flow handling code (only once on flow creation). This
patch fixes one of these conversions for the little-endian hosts
in case if META/MARK items are less than 32 bits.
Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index c9bb76a8fc..8f77909419 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5909,8 +5909,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
struct mlx5_priv *priv = dev->data->dev_private;
uint32_t msk_c0 = priv->sh->dv_regc0_mask;
uint32_t shl_c0 = rte_bsf32(msk_c0);
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+ uint32_t shr_c0 = __builtin_clz(priv->sh->dv_meta_mask);
- msk_c0 = rte_cpu_to_be_32(msk_c0);
+ value >>= shr_c0;
+ mask >>= shr_c0;
+#endif
value <<= shl_c0;
mask <<= shl_c0;
assert(msk_c0);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.406568083 +0000
+++ 0102-net-mlx5-fix-metadata-item-endianness-conversion.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,8 +1,10 @@
-From 39c09c22e5b5c46cf8f44826a1c759e036f3af3a Mon Sep 17 00:00:00 2001
+From cbc1f8d1408a58b1b1fc89ba82c7e2bbc94ab9a9 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Fri, 17 Jan 2020 14:59:32 +0000
Subject: [PATCH] net/mlx5: fix metadata item endianness conversion
+[ upstream commit 39c09c22e5b5c46cf8f44826a1c759e036f3af3a ]
+
The mlx5 datapath does not implement any endianness conversions
for the metadata being sent and received to provide the better
performance (because these conversions would be performed for
@@ -15,7 +17,6 @@
in case if META/MARK items are less than 32 bits.
Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -24,10 +25,10 @@
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index da988f9dd7..c02517aaf3 100644
+index c9bb76a8fc..8f77909419 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -6081,8 +6081,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
+@@ -5909,8 +5909,12 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
struct mlx5_priv *priv = dev->data->dev_private;
uint32_t msk_c0 = priv->sh->dv_regc0_mask;
uint32_t shl_c0 = rte_bsf32(msk_c0);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (100 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix metadata item endianness conversion' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " luca.boccassi
` (86 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Fang TongHao; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 467052faa5d3363b174ceff3f8e54fba5ddc9c20 Mon Sep 17 00:00:00 2001
From: Fang TongHao <fangtonghao@sangfor.com.cn>
Date: Fri, 17 Jan 2020 10:08:04 +0800
Subject: [PATCH] ethdev: fix secondary process memory overwrite
[ upstream commit 99ef90317da69a5e6ecc831ad05c6d2053e2b065 ]
Avoid overwriting device flags and other information in device
data stored in shared memory when a secondary process
probes PCI device.
Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer")
Signed-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev_pci.h | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index ccdbb46ec0..cca94ec864 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -42,6 +42,8 @@
/**
* Copy pci device info to the Ethernet device data.
+ * Shared memory (eth_dev->data) only updated by primary process, so it is safe
+ * to call this function from both primary and secondary processes.
*
* @param eth_dev
* The *eth_dev* pointer is the address of the *rte_eth_dev* structure.
@@ -60,14 +62,16 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
eth_dev->intr_handle = &pci_dev->intr_handle;
- eth_dev->data->dev_flags = 0;
- if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
- eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
- if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)
- eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ eth_dev->data->dev_flags = 0;
+ if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+ if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;
- eth_dev->data->kdrv = pci_dev->kdrv;
- eth_dev->data->numa_node = pci_dev->device.numa_node;
+ eth_dev->data->kdrv = pci_dev->kdrv;
+ eth_dev->data->numa_node = pci_dev->device.numa_node;
+ }
}
static inline int
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.440402307 +0000
+++ 0103-ethdev-fix-secondary-process-memory-overwrite.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,14 +1,15 @@
-From 99ef90317da69a5e6ecc831ad05c6d2053e2b065 Mon Sep 17 00:00:00 2001
+From 467052faa5d3363b174ceff3f8e54fba5ddc9c20 Mon Sep 17 00:00:00 2001
From: Fang TongHao <fangtonghao@sangfor.com.cn>
Date: Fri, 17 Jan 2020 10:08:04 +0800
Subject: [PATCH] ethdev: fix secondary process memory overwrite
+[ upstream commit 99ef90317da69a5e6ecc831ad05c6d2053e2b065 ]
+
Avoid overwriting device flags and other information in device
data stored in shared memory when a secondary process
probes PCI device.
Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer")
-Cc: stable@dpdk.org
Signed-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (101 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'eal/linux: fix build when VFIO is disabled' " luca.boccassi
` (85 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
Cc: Rafael Ávila de Espíndola, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4d7f82d2113dd9d7170ffd5a07a846c95af7fc10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
<espindola@scylladb.com>
Date: Thu, 12 Dec 2019 09:53:12 -0800
Subject: [PATCH] mk: avoid combining -r and -export-dynamic linker options
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]
Running ld with -r switches the linker to a very special mode where
some other linker options don't make sense.
In particular, -export-dynamic normally requires that all global
symbols be included in the dynamic symbol table, but a .o file doesn't
even have a dynamic symbol table.
When given both options it looks like the gnu linker just ignores
-export-dynamic.
Unfortunately some versions of lld (https://lld.llvm.org/) have a bug
that causes it to try to create a dynamic symbol table in the output
.o file and ends up corrupting it
(https://bugs.llvm.org/show_bug.cgi?id=43552). Current (git) version
of lld now issues an error.
This patch filters out -export-dynamic from $(LDFLAGS) when using
-r. With this patch I can build dpdk with lld.
Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
---
mk/internal/rte.compile-pre.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 0cf3791b4d..82fe098f7c 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -61,7 +61,7 @@ CHECK_EXPERIMENTAL = $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(EXPORT_MAP) $@
PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c
PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c
-PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@
PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \
echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \
$(PMDINFO_GEN) && \
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.468892392 +0000
+++ 0104-mk-avoid-combining-r-and-export-dynamic-linker-optio.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,4 +1,4 @@
-From 5a352a3a98e3297555cb08d2db6e45a93ce7e058 Mon Sep 17 00:00:00 2001
+From 4d7f82d2113dd9d7170ffd5a07a846c95af7fc10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
<espindola@scylladb.com>
Date: Thu, 12 Dec 2019 09:53:12 -0800
@@ -7,6 +7,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]
+
Running ld with -r switches the linker to a very special mode where
some other linker options don't make sense.
@@ -27,7 +29,6 @@
-r. With this patch I can build dpdk with lld.
Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
-Cc: stable@dpdk.org
Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'eal/linux: fix build when VFIO is disabled' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (102 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " luca.boccassi
` (84 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Ali Alnubani; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b01bd42ae75770b2622e9f58127c9772a49e236f Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Wed, 11 Dec 2019 18:25:59 +0000
Subject: [PATCH] eal/linux: fix build when VFIO is disabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e8a17faa5ebc7067473b4948805753251dc0c2e9 ]
The header linux/version.h isn't included when CONFIG_RTE_EAL_VFIO
is explicitly disabled. LINUX_VERSION_CODE and KERNEL_VERSION are
therefore undefined, causing the build failure:
lib/librte_eal/linux/eal/eal.c: In function ‘rte_eal_init’:
lib/librte_eal/linux/eal/eal.c:1076:32: error: "LINUX_VERSION_CODE" is
not defined, evaluates to 0 [-Werror=undef]
Fixes: a0dede62a537 ("eal/linux: remove KNI restriction on IOVA")
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
---
lib/librte_eal/linux/eal/eal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index c4233ec3c8..9530ee55f8 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -25,6 +25,7 @@
#if defined(RTE_ARCH_X86)
#include <sys/io.h>
#endif
+#include <linux/version.h>
#include <rte_compat.h>
#include <rte_common.h>
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.495532340 +0000
+++ 0105-eal-linux-fix-build-when-VFIO-is-disabled.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,4 +1,4 @@
-From e8a17faa5ebc7067473b4948805753251dc0c2e9 Mon Sep 17 00:00:00 2001
+From b01bd42ae75770b2622e9f58127c9772a49e236f Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Wed, 11 Dec 2019 18:25:59 +0000
Subject: [PATCH] eal/linux: fix build when VFIO is disabled
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit e8a17faa5ebc7067473b4948805753251dc0c2e9 ]
+
The header linux/version.h isn't included when CONFIG_RTE_EAL_VFIO
is explicitly disabled. LINUX_VERSION_CODE and KERNEL_VERSION are
therefore undefined, causing the build failure:
@@ -15,7 +17,6 @@
not defined, evaluates to 0 [-Werror=undef]
Fixes: a0dede62a537 ("eal/linux: remove KNI restriction on IOVA")
-Cc: stable@dpdk.org
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'kni: rename variable with namespace prefix' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (103 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'eal/linux: fix build when VFIO is disabled' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " luca.boccassi
` (83 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 78d9a1a7139a90a23053730d00a5bbafca0a1c21 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 20 Dec 2019 17:02:14 -0800
Subject: [PATCH] kni: rename variable with namespace prefix
[ upstream commit c793dce9858d9194b999e2af626a2c314ef0cc43 ]
All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/kni_dev.h | 2 +-
kernel/linux/kni/kni_misc.c | 10 +++++-----
kernel/linux/kni/kni_net.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 5e75c6371f..ca5f92a47b 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -32,7 +32,7 @@
#define MBUF_BURST_SZ 32
/* Default carrier state for created KNI network interfaces */
-extern uint32_t dflt_carrier;
+extern uint32_t kni_dflt_carrier;
/**
* A structure describing the private information for a kni device.
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index cda71bde08..2b464c4381 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -39,7 +39,7 @@ static uint32_t multiple_kthread_on;
/* Default carrier state for created KNI network interfaces */
static char *carrier;
-uint32_t dflt_carrier;
+uint32_t kni_dflt_carrier;
#define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
@@ -554,14 +554,14 @@ static int __init
kni_parse_carrier_state(void)
{
if (!carrier) {
- dflt_carrier = 0;
+ kni_dflt_carrier = 0;
return 0;
}
if (strcmp(carrier, "off") == 0)
- dflt_carrier = 0;
+ kni_dflt_carrier = 0;
else if (strcmp(carrier, "on") == 0)
- dflt_carrier = 1;
+ kni_dflt_carrier = 1;
else
return -1;
@@ -588,7 +588,7 @@ kni_init(void)
return -EINVAL;
}
- if (dflt_carrier == 0)
+ if (kni_dflt_carrier == 0)
pr_debug("Default carrier state set to off.\n");
else
pr_debug("Default carrier state set to on.\n");
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 1ba9b1b99f..97fe85be9a 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -158,7 +158,7 @@ kni_net_open(struct net_device *dev)
struct kni_dev *kni = netdev_priv(dev);
netif_start_queue(dev);
- if (dflt_carrier == 1)
+ if (kni_dflt_carrier == 1)
netif_carrier_on(dev);
else
netif_carrier_off(dev);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.522961215 +0000
+++ 0106-kni-rename-variable-with-namespace-prefix.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,13 +1,14 @@
-From c793dce9858d9194b999e2af626a2c314ef0cc43 Mon Sep 17 00:00:00 2001
+From 78d9a1a7139a90a23053730d00a5bbafca0a1c21 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 20 Dec 2019 17:02:14 -0800
Subject: [PATCH] kni: rename variable with namespace prefix
+[ upstream commit c793dce9858d9194b999e2af626a2c314ef0cc43 ]
+
All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'cfgfile: fix symbols map' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (104 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " luca.boccassi
` (82 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Liron Himi; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From aa340f60dfc784d85b7cc42442e237bea6591113 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Tue, 17 Dec 2019 13:52:03 +0200
Subject: [PATCH] cfgfile: fix symbols map
[ upstream commit 94f73b5b6e0897071aa739e2cf82c36d27e51f05 ]
rte_cfgfile_section_num_entries_by_index was missing from the map file.
meson build failed when calling this function,
due to linking a binary to cfgfile built as a shared library.
Fixes: 3d2e0448ebb5 ("cfgfile: add section number of entries by index")
Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_cfgfile/rte_cfgfile_version.map | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
index 906eee96bf..22c999fe16 100644
--- a/lib/librte_cfgfile/rte_cfgfile_version.map
+++ b/lib/librte_cfgfile/rte_cfgfile_version.map
@@ -15,6 +15,7 @@ DPDK_20.0 {
rte_cfgfile_section_entries;
rte_cfgfile_section_entries_by_index;
rte_cfgfile_section_num_entries;
+ rte_cfgfile_section_num_entries_by_index;
rte_cfgfile_sections;
rte_cfgfile_set_entry;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.551470901 +0000
+++ 0107-cfgfile-fix-symbols-map.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,15 +1,16 @@
-From 94f73b5b6e0897071aa739e2cf82c36d27e51f05 Mon Sep 17 00:00:00 2001
+From aa340f60dfc784d85b7cc42442e237bea6591113 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Tue, 17 Dec 2019 13:52:03 +0200
Subject: [PATCH] cfgfile: fix symbols map
+[ upstream commit 94f73b5b6e0897071aa739e2cf82c36d27e51f05 ]
+
rte_cfgfile_section_num_entries_by_index was missing from the map file.
meson build failed when calling this function,
due to linking a binary to cfgfile built as a shared library.
Fixes: 3d2e0448ebb5 ("cfgfile: add section number of entries by index")
-Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'latency: fix calculation for multi-thread' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (105 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'raw/ntb: fix write memory barrier' " luca.boccassi
` (81 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Reshma Pattan; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 94047950e2b4887d5bf4be4073e6be37c3ae64c0 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Thu, 5 Dec 2019 17:18:11 +0000
Subject: [PATCH] latency: fix calculation for multi-thread
[ upstream commit 2a178702c00f2a8b547358fedc7107d376f8825e ]
Make latency calculation multithread safe by
using spinlock.
Fixes: 5cd3cac9ed ("latency: added new library for latency stats")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
lib/librte_latencystats/rte_latencystats.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c
index 98e018939e..ba2fff3bcb 100644
--- a/lib/librte_latencystats/rte_latencystats.c
+++ b/lib/librte_latencystats/rte_latencystats.c
@@ -42,6 +42,7 @@ struct rte_latency_stats {
float avg_latency; /**< Average latency in nano seconds */
float max_latency; /**< Maximum latency in nano seconds */
float jitter; /** Latency variation */
+ rte_spinlock_t lock; /** Latency calculation lock */
};
static struct rte_latency_stats *glob_stats;
@@ -164,6 +165,7 @@ calc_latency(uint16_t pid __rte_unused,
latency[cnt++] = now - pkts[i]->timestamp;
}
+ rte_spinlock_lock(&glob_stats->lock);
for (i = 0; i < cnt; i++) {
/*
* The jitter is calculated as statistical mean of interpacket
@@ -193,6 +195,7 @@ calc_latency(uint16_t pid __rte_unused,
alpha * (latency[i] - glob_stats->avg_latency);
prev_latency = latency[i];
}
+ rte_spinlock_unlock(&glob_stats->lock);
return nb_pkts;
}
@@ -223,6 +226,7 @@ rte_latencystats_init(uint64_t app_samp_intvl,
}
glob_stats = mz->addr;
+ rte_spinlock_init(&glob_stats->lock);
samp_intvl = app_samp_intvl * latencystat_cycles_per_ns();
/** Register latency stats with stats library */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.579087906 +0000
+++ 0108-latency-fix-calculation-for-multi-thread.patch 2020-02-11 11:17:38.572004563 +0000
@@ -1,13 +1,14 @@
-From 2a178702c00f2a8b547358fedc7107d376f8825e Mon Sep 17 00:00:00 2001
+From 94047950e2b4887d5bf4be4073e6be37c3ae64c0 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Thu, 5 Dec 2019 17:18:11 +0000
Subject: [PATCH] latency: fix calculation for multi-thread
+[ upstream commit 2a178702c00f2a8b547358fedc7107d376f8825e ]
+
Make latency calculation multithread safe by
using spinlock.
Fixes: 5cd3cac9ed ("latency: added new library for latency stats")
-Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'raw/ntb: fix write memory barrier' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (106 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: fix igb_uio parameter in ntb guide' " luca.boccassi
` (80 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Gavin Hu, Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 4 Dec 2019 23:19:16 +0800
Subject: [PATCH] raw/ntb: fix write memory barrier
[ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ]
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/raw/ntb/ntb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index ad7f6abfd3..dd0b72f8c5 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -683,8 +683,8 @@ end_of_tx:
sizeof(struct ntb_used) * nb1);
rte_memcpy(txq->tx_used_ring, tx_used + nb1,
sizeof(struct ntb_used) * nb2);
+ rte_wmb();
*txq->used_cnt = txq->last_used;
- rte_wmb();
/* update queue stats */
hw->ntb_xstats[NTB_TX_BYTES_ID + off] += bytes;
@@ -789,8 +789,8 @@ end_of_rx:
sizeof(struct ntb_desc) * nb1);
rte_memcpy(rxq->rx_desc_ring, rx_desc + nb1,
sizeof(struct ntb_desc) * nb2);
+ rte_wmb();
*rxq->avail_cnt = rxq->last_avail;
- rte_wmb();
/* update queue stats */
off = NTB_XSTATS_NUM * ((size_t)context + 1);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.605694771 +0000
+++ 0109-raw-ntb-fix-write-memory-barrier.patch 2020-02-11 11:17:38.576004638 +0000
@@ -1,14 +1,15 @@
-From 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b Mon Sep 17 00:00:00 2001
+From 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 4 Dec 2019 23:19:16 +0800
Subject: [PATCH] raw/ntb: fix write memory barrier
+[ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ]
+
All buffers and ring info should be written before tail register update.
This patch relocates the write memory barrier before updating tail register
to avoid potential issues.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix igb_uio parameter in ntb guide' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (107 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'raw/ntb: fix write memory barrier' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/ntb: fix mempool ops setting' " luca.boccassi
` (79 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 0a20f25097cb3755261c66e45c14b42109f1a86c Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 4 Dec 2019 23:19:31 +0800
Subject: [PATCH] doc: fix igb_uio parameter in ntb guide
[ upstream commit 971a48e7c8b945159c012d9f0c756197282c7ae8 ]
In prerequisites of ntb guide, the correct flag when loading igb_uio
module should be `wc_activate=1`, not `wc_active=1`.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
doc/guides/rawdevs/ntb.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/rawdevs/ntb.rst b/doc/guides/rawdevs/ntb.rst
index 58472135f5..aa7d809649 100644
--- a/doc/guides/rawdevs/ntb.rst
+++ b/doc/guides/rawdevs/ntb.rst
@@ -52,11 +52,11 @@ NTB PMD needs kernel PCI driver to support write combining (WC) to get
better performance. The difference will be more than 10 times.
To enable WC, there are 2 ways.
-- Insert igb_uio with ``wc_active=1`` flag if use igb_uio driver.
+- Insert igb_uio with ``wc_activate=1`` flag if use igb_uio driver.
.. code-block:: console
- insmod igb_uio.ko wc_active=1
+ insmod igb_uio.ko wc_activate=1
- Enable WC for NTB device's Bar 2 and Bar 4 (Mapped memory) manually.
The reference is https://www.kernel.org/doc/html/latest/x86/mtrr.html
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.633754258 +0000
+++ 0110-doc-fix-igb_uio-parameter-in-ntb-guide.patch 2020-02-11 11:17:38.576004638 +0000
@@ -1,13 +1,14 @@
-From 971a48e7c8b945159c012d9f0c756197282c7ae8 Mon Sep 17 00:00:00 2001
+From 0a20f25097cb3755261c66e45c14b42109f1a86c Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 4 Dec 2019 23:19:31 +0800
Subject: [PATCH] doc: fix igb_uio parameter in ntb guide
+[ upstream commit 971a48e7c8b945159c012d9f0c756197282c7ae8 ]
+
In prerequisites of ntb guide, the correct flag when loading igb_uio
module should be `wc_activate=1`, not `wc_active=1`.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ntb: fix mempool ops setting' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (108 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: fix igb_uio parameter in ntb guide' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " luca.boccassi
` (78 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 38498a1a3056c2f5cd2d266c3697a895375c8377 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 25 Dec 2019 17:09:42 +0800
Subject: [PATCH] examples/ntb: fix mempool ops setting
[ upstream commit 28a2568f469d9d715b9dfbafdce14537e35b7d4e ]
Mempool ops may register in different order when compiling. The default
ops index is always zero but the wanted ops is ring_mp_mc. This patch
sets best mempool ops before generating mbuf pool to fix this issue.
Fixes: 5194299d6ef5 ("examples/ntb: support more functions")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
examples/ntb/ntb_fwd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index c914256dd4..17eedcf0b8 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -19,6 +19,7 @@
#include <rte_lcore.h>
#include <rte_cycles.h>
#include <rte_pmd_ntb.h>
+#include <rte_mbuf_pool_ops.h>
/* Per-port statistics struct */
struct ntb_port_statistics {
@@ -1256,6 +1257,11 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf,
if (mp == NULL)
return NULL;
+ if (rte_mempool_set_ops_byname(mp, rte_mbuf_best_mempool_ops(), NULL)) {
+ printf("error setting mempool handler\n");
+ goto fail;
+ }
+
memset(&mbp_priv, 0, sizeof(mbp_priv));
mbp_priv.mbuf_data_room_size = mbuf_seg_size;
mbp_priv.mbuf_priv_size = 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.660872413 +0000
+++ 0111-examples-ntb-fix-mempool-ops-setting.patch 2020-02-11 11:17:38.576004638 +0000
@@ -1,14 +1,15 @@
-From 28a2568f469d9d715b9dfbafdce14537e35b7d4e Mon Sep 17 00:00:00 2001
+From 38498a1a3056c2f5cd2d266c3697a895375c8377 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed, 25 Dec 2019 17:09:42 +0800
Subject: [PATCH] examples/ntb: fix mempool ops setting
+[ upstream commit 28a2568f469d9d715b9dfbafdce14537e35b7d4e ]
+
Mempool ops may register in different order when compiling. The default
ops index is always zero but the wanted ops is ring_mp_mc. This patch
sets best mempool ops before generating mbuf pool to fix this issue.
Fixes: 5194299d6ef5 ("examples/ntb: support more functions")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mempool: fix anonymous populate' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (109 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/ntb: fix mempool ops setting' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix slow allocation of large pools' " luca.boccassi
` (77 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Olivier Matz; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2c3e77b93f9bcfa5004dfa7bfb5e7f54c4ec28a8 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 15:34:29 +0100
Subject: [PATCH] mempool: fix anonymous populate
[ upstream commit f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 ]
The documentation says that a negative errno is returned on error, but
in most places that's not the case.
Fix the documentation and the exceptions in code. The second one
(return from populate_virt) also fixes a memory leak.
Note that testpmd was using the function correctly.
Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public")
Fixes: 6780f72fb82f ("mempool: populate with anonymous memory")
Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_mempool/rte_mempool.c | 10 +++++++---
lib/librte_mempool/rte_mempool.h | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 78d8eb941e..f8d453d21f 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -645,8 +645,10 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
}
ret = mempool_ops_alloc_once(mp);
- if (ret != 0)
- return ret;
+ if (ret < 0) {
+ rte_errno = -ret;
+ return 0;
+ }
size = get_anon_size(mp);
if (size < 0) {
@@ -670,8 +672,10 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
ret = rte_mempool_populate_virt(mp, addr, size, getpagesize(),
rte_mempool_memchunk_anon_free, addr);
- if (ret == 0)
+ if (ret < 0) {
+ rte_errno = -ret;
goto fail;
+ }
return mp->populated_size;
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index f81152af96..0a1dc6059f 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -1167,8 +1167,8 @@ int rte_mempool_populate_default(struct rte_mempool *mp);
* A pointer to the mempool structure.
* @return
* The number of objects added on success.
- * On error, the chunk is not added in the memory list of the
- * mempool and a negative errno is returned.
+ * On error, 0 is returned, rte_errno is set, and the chunk is not added in
+ * the memory list of the mempool.
*/
int rte_mempool_populate_anon(struct rte_mempool *mp);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.688529665 +0000
+++ 0112-mempool-fix-anonymous-populate.patch 2020-02-11 11:17:38.576004638 +0000
@@ -1,8 +1,10 @@
-From f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 Mon Sep 17 00:00:00 2001
+From 2c3e77b93f9bcfa5004dfa7bfb5e7f54c4ec28a8 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 15:34:29 +0100
Subject: [PATCH] mempool: fix anonymous populate
+[ upstream commit f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 ]
+
The documentation says that a negative errno is returned on error, but
in most places that's not the case.
@@ -14,7 +16,6 @@
Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public")
Fixes: 6780f72fb82f ("mempool: populate with anonymous memory")
Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating")
-Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mempool: fix slow allocation of large pools' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (110 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " luca.boccassi
@ 2020-02-11 11:20 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'mempool: fix populate with small virtual chunks' " luca.boccassi
` (76 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:20 UTC (permalink / raw)
To: Olivier Matz; +Cc: Anatoly Burakov, Andrew Rybchenko, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b019099e527f0ca0f120b32cb24845594c029cdd Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 10:51:49 +0100
Subject: [PATCH] mempool: fix slow allocation of large pools
[ upstream commit 3a3d0c75b43e8d1670c5ea6bf85cb3e1e60dfa2b ]
When allocating a mempool which is larger than the largest
available area, it can take a lot of time:
a- the mempool calculate the required memory size, and tries
to allocate it, it fails
b- then it tries to allocate the largest available area (this
does not request new huge pages)
c- add this zone to the mempool, this triggers the allocation
of a mem hdr, which request a new huge page
d- back to a- until mempool is populated or until there is no
more memory
This can take a lot of time to finally fail (several minutes): in step
a- it takes all available hugepages on the system, then release them
after it fails.
The problem appeared with commit eba11e364614 ("mempool: reduce wasted
space on populate"), because smaller chunks are now allowed. Previously,
it had to be at least one page size, which is not the case in step b-.
To fix this, implement our own way to allocate the largest available
area instead of using the feature from memzone: if an allocation fails,
try to divide the size by 2 and retry. When the requested size falls
below min_chunk_size, stop and return an error.
Fixes: eba11e364614 ("mempool: reduce wasted space on populate")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
---
lib/librte_mempool/rte_mempool.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index f8d453d21f..aea597224a 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -463,6 +463,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
unsigned mz_id, n;
int ret;
bool need_iova_contig_obj;
+ size_t max_alloc_size = SIZE_MAX;
ret = mempool_ops_alloc_once(mp);
if (ret != 0)
@@ -542,30 +543,24 @@ rte_mempool_populate_default(struct rte_mempool *mp)
if (min_chunk_size == (size_t)mem_size)
mz_flags |= RTE_MEMZONE_IOVA_CONTIG;
- mz = rte_memzone_reserve_aligned(mz_name, mem_size,
+ /* Allocate a memzone, retrying with a smaller area on ENOMEM */
+ do {
+ mz = rte_memzone_reserve_aligned(mz_name,
+ RTE_MIN((size_t)mem_size, max_alloc_size),
mp->socket_id, mz_flags, align);
- /* don't try reserving with 0 size if we were asked to reserve
- * IOVA-contiguous memory.
- */
- if (min_chunk_size < (size_t)mem_size && mz == NULL) {
- /* not enough memory, retry with the biggest zone we
- * have
- */
- mz = rte_memzone_reserve_aligned(mz_name, 0,
- mp->socket_id, mz_flags, align);
- }
+ if (mz == NULL && rte_errno != ENOMEM)
+ break;
+
+ max_alloc_size = RTE_MIN(max_alloc_size,
+ (size_t)mem_size) / 2;
+ } while (mz == NULL && max_alloc_size >= min_chunk_size);
+
if (mz == NULL) {
ret = -rte_errno;
goto fail;
}
- if (mz->len < min_chunk_size) {
- rte_memzone_free(mz);
- ret = -ENOMEM;
- goto fail;
- }
-
if (need_iova_contig_obj)
iova = mz->iova;
else
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.718460591 +0000
+++ 0113-mempool-fix-slow-allocation-of-large-pools.patch 2020-02-11 11:17:38.580004713 +0000
@@ -1,8 +1,10 @@
-From 3a3d0c75b43e8d1670c5ea6bf85cb3e1e60dfa2b Mon Sep 17 00:00:00 2001
+From b019099e527f0ca0f120b32cb24845594c029cdd Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 10:51:49 +0100
Subject: [PATCH] mempool: fix slow allocation of large pools
+[ upstream commit 3a3d0c75b43e8d1670c5ea6bf85cb3e1e60dfa2b ]
+
When allocating a mempool which is larger than the largest
available area, it can take a lot of time:
@@ -29,7 +31,6 @@
below min_chunk_size, stop and return an error.
Fixes: eba11e364614 ("mempool: reduce wasted space on populate")
-Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mempool: fix populate with small virtual chunks' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (111 preceding siblings ...)
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix slow allocation of large pools' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/test: remove meson dependency on file in /sys' " luca.boccassi
` (75 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Olivier Matz; +Cc: Anatoly Burakov, Alvin Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 68481604c1baa5e23731bc381930e650bc60c7c5 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 15:57:52 +0100
Subject: [PATCH] mempool: fix populate with small virtual chunks
[ upstream commit 43503c59adee6cae7069da23e105c24e044bf72c ]
To populate a mempool with a virtual area, the mempool code calls
rte_mempool_populate_iova() for each iova-contiguous area. It happens
(rarely) that this area is too small to store one object. In this case,
rte_mempool_populate_iova() returns an error, which is forwarded by
rte_mempool_populate_virt().
This case should not throw an error in rte_mempool_populate_virt().
Instead, the area that is too small should just be ignored.
To fix this issue, change the return value of
rte_mempool_populate_iova() to 0 when no object can be populated,
so it can be ignored by the caller. As this would be an API/ABI change,
only do this modification internally for now.
Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Alvin Zhang <alvinx.zhang@intel.com>
---
lib/librte_mempool/rte_mempool.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index aea597224a..08906df9ee 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -297,8 +297,8 @@ mempool_ops_alloc_once(struct rte_mempool *mp)
* zone. Return the number of objects added, or a negative value
* on error.
*/
-int
-rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
+static int
+__rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
void *opaque)
{
@@ -332,7 +332,7 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
off = RTE_PTR_ALIGN_CEIL(vaddr, RTE_MEMPOOL_ALIGN) - vaddr;
if (off > len) {
- ret = -EINVAL;
+ ret = 0;
goto fail;
}
@@ -343,7 +343,7 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
/* not enough room to store one object */
if (i == 0) {
- ret = -EINVAL;
+ ret = 0;
goto fail;
}
@@ -356,6 +356,21 @@ fail:
return ret;
}
+int
+rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
+ rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
+ void *opaque)
+{
+ int ret;
+
+ ret = __rte_mempool_populate_iova(mp, vaddr, iova, len, free_cb,
+ opaque);
+ if (ret == 0)
+ ret = -EINVAL;
+
+ return ret;
+}
+
static rte_iova_t
get_iova(void *addr)
{
@@ -406,8 +421,10 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
break;
}
- ret = rte_mempool_populate_iova(mp, addr + off, iova,
+ ret = __rte_mempool_populate_iova(mp, addr + off, iova,
phys_len, free_cb, opaque);
+ if (ret == 0)
+ continue;
if (ret < 0)
goto fail;
/* no need to call the free callback for next chunks */
@@ -415,6 +432,9 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
cnt += ret;
}
+ if (cnt == 0)
+ return -EINVAL;
+
return cnt;
fail:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.746396933 +0000
+++ 0114-mempool-fix-populate-with-small-virtual-chunks.patch 2020-02-11 11:17:38.580004713 +0000
@@ -1,8 +1,10 @@
-From 43503c59adee6cae7069da23e105c24e044bf72c Mon Sep 17 00:00:00 2001
+From 68481604c1baa5e23731bc381930e650bc60c7c5 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 15:57:52 +0100
Subject: [PATCH] mempool: fix populate with small virtual chunks
+[ upstream commit 43503c59adee6cae7069da23e105c24e044bf72c ]
+
To populate a mempool with a virtual area, the mempool code calls
rte_mempool_populate_iova() for each iova-contiguous area. It happens
(rarely) that this area is too small to store one object. In this case,
@@ -18,7 +20,6 @@
only do this modification internally for now.
Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area")
-Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/test: remove meson dependency on file in /sys' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (112 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'mempool: fix populate with small virtual chunks' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: move Tx complete request routine' " luca.boccassi
` (74 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bafd98728cc6d39b951d84de46c10a9c69c1d7d6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 20 Jan 2020 12:22:18 +0000
Subject: [PATCH] app/test: remove meson dependency on file in /sys
[ upstream commit 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 ]
Meson versions 0.52 and 0.53 are being overly smart and detecting the path
"/sys/devices/system/cpu/present" in the call to cat in
app/test/meson.build and then adding it as a dependency to the build
configuration. This causes issues on systems where the timestamp of that
file always returns the current time, since it means that the build.ninja
file is always out of date, and therefore needs to be rebuilt.
We can fix this by just using a simple shell script to return the coremask
appropriately for BSD and Linux, and removing that code logic from meson -
thereby hiding the use of the /sys file.
Fixes: c70622ac6f72 ("test: detect number of cores with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
MAINTAINERS | 1 +
app/test/get-coremask.sh | 13 +++++++++++++
app/test/meson.build | 16 ++--------------
3 files changed, 16 insertions(+), 14 deletions(-)
create mode 100755 app/test/get-coremask.sh
diff --git a/MAINTAINERS b/MAINTAINERS
index 4395d8df14..607a7fa8b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1434,6 +1434,7 @@ Unit tests framework
F: app/test/Makefile
F: app/test/autotest*
F: app/test/commands.c
+F: app/test/get-coremask.sh
F: app/test/packet_burst_generator.c
F: app/test/packet_burst_generator.h
F: app/test/process.h
diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh
new file mode 100755
index 0000000000..bb8cf404d2
--- /dev/null
+++ b/app/test/get-coremask.sh
@@ -0,0 +1,13 @@
+#! /bin/sh -e
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+if [ "$(uname)" = "Linux" ] ; then
+ cat /sys/devices/system/cpu/present
+elif [ "$(uname)" = "FreeBSD" ] ; then
+ ncpus=$(/sbin/sysctl -n hw.ncpu)
+ echo 0-$(expr $ncpus - 1)
+else
+# fallback
+ echo 0-3
+fi
diff --git a/app/test/meson.build b/app/test/meson.build
index fb49d804ba..22b0cefaa3 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -398,20 +398,8 @@ dpdk_test = executable('dpdk-test',
timeout_seconds = 600
timeout_seconds_fast = 10
-# Retrieve the number of CPU cores, defaulting to 4.
-num_cores = '0-3'
-if host_machine.system() == 'linux'
- num_cores = run_command('cat',
- '/sys/devices/system/cpu/present'
- ).stdout().strip()
-elif host_machine.system() == 'freebsd'
- snum_cores = run_command('/sbin/sysctl', '-n',
- 'hw.ncpu').stdout().strip()
- inum_cores = snum_cores.to_int() - 1
- num_cores = '0-@0@'.format(inum_cores)
-endif
-
-num_cores_arg = '-l ' + num_cores
+get_coremask = find_program('get-coremask.sh')
+num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
test_args = [num_cores_arg]
foreach arg : fast_test_names
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.775052304 +0000
+++ 0115-app-test-remove-meson-dependency-on-file-in-sys.patch 2020-02-11 11:17:38.580004713 +0000
@@ -1,8 +1,10 @@
-From 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 Mon Sep 17 00:00:00 2001
+From bafd98728cc6d39b951d84de46c10a9c69c1d7d6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 20 Jan 2020 12:22:18 +0000
Subject: [PATCH] app/test: remove meson dependency on file in /sys
+[ upstream commit 599d67b6a4bf96096352cc5fbc8fc28e54a1ca62 ]
+
Meson versions 0.52 and 0.53 are being overly smart and detecting the path
"/sys/devices/system/cpu/present" in the call to cat in
app/test/meson.build and then adding it as a dependency to the build
@@ -15,7 +17,6 @@
thereby hiding the use of the /sys file.
Fixes: c70622ac6f72 ("test: detect number of cores with meson")
-Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
@@ -26,10 +27,10 @@
create mode 100755 app/test/get-coremask.sh
diff --git a/MAINTAINERS b/MAINTAINERS
-index 8916ef9626..48fbaa043a 100644
+index 4395d8df14..607a7fa8b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -1446,6 +1446,7 @@ Unit tests framework
+@@ -1434,6 +1434,7 @@ Unit tests framework
F: app/test/Makefile
F: app/test/autotest*
F: app/test/commands.c
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: move Tx complete request routine' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (113 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'app/test: remove meson dependency on file in /sys' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: update Tx error handling " luca.boccassi
` (73 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 58a7836b5015d81984ec7a597f8753a40589b6dd Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:04 +0000
Subject: [PATCH] net/mlx5: move Tx complete request routine
[ upstream commit 8b581c690a54be065ecb7b7fd9979c8e86898234 ]
The complete request flag is set once per Tx burst call,
the code of appropriate routine moved to the end of sending
loop. This is preparation step to remove WQE reserved field
usage to store index of elts to free.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index b4702ff9f6..3234ab241e 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2145,9 +2145,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
* Pointer to TX queue structure.
* @param loc
* Pointer to burst routine local context.
- * @param multi,
- * Routine is called from multi-segment sending loop,
- * do not correct the elts_head according to the pkts_copy.
* @param olx
* Configured Tx offloads mask. It is fully defined at
* compile time and may be used for optimization.
@@ -2155,13 +2152,12 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
static __rte_always_inline void
mlx5_tx_request_completion(struct mlx5_txq_data *restrict txq,
struct mlx5_txq_local *restrict loc,
- bool multi,
unsigned int olx)
{
uint16_t head = txq->elts_head;
unsigned int part;
- part = (MLX5_TXOFF_CONFIG(INLINE) || multi) ?
+ part = MLX5_TXOFF_CONFIG(INLINE) ?
0 : loc->pkts_sent - loc->pkts_copy;
head += part;
if ((uint16_t)(head - txq->elts_comp) >= MLX5_TX_COMP_THRESH ||
@@ -3120,8 +3116,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *restrict txq,
wqe->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds);
txq->wqe_ci += (ds + 3) / 4;
loc->wqe_free -= (ds + 3) / 4;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, true, olx);
return MLX5_TXCMP_CODE_MULTI;
}
@@ -3230,8 +3224,6 @@ mlx5_tx_packet_multi_send(struct mlx5_txq_data *restrict txq,
} while (true);
txq->wqe_ci += (ds + 3) / 4;
loc->wqe_free -= (ds + 3) / 4;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, true, olx);
return MLX5_TXCMP_CODE_MULTI;
}
@@ -3388,8 +3380,6 @@ do_align:
wqe->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds);
txq->wqe_ci += (ds + 3) / 4;
loc->wqe_free -= (ds + 3) / 4;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, true, olx);
return MLX5_TXCMP_CODE_MULTI;
}
@@ -3599,8 +3589,6 @@ mlx5_tx_burst_tso(struct mlx5_txq_data *restrict txq,
--loc->elts_free;
++loc->pkts_sent;
--pkts_n;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, false, olx);
if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free))
return MLX5_TXCMP_CODE_EXIT;
loc->mbuf = *pkts++;
@@ -3750,7 +3738,7 @@ mlx5_tx_sdone_empw(struct mlx5_txq_data *restrict txq,
struct mlx5_txq_local *restrict loc,
unsigned int ds,
unsigned int slen,
- unsigned int olx)
+ unsigned int olx __rte_unused)
{
assert(!MLX5_TXOFF_CONFIG(INLINE));
#ifdef MLX5_PMD_SOFT_COUNTERS
@@ -3765,8 +3753,6 @@ mlx5_tx_sdone_empw(struct mlx5_txq_data *restrict txq,
loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | ds);
txq->wqe_ci += (ds + 3) / 4;
loc->wqe_free -= (ds + 3) / 4;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, false, olx);
}
/*
@@ -3809,8 +3795,6 @@ mlx5_tx_idone_empw(struct mlx5_txq_data *restrict txq,
loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | len);
txq->wqe_ci += (len + 3) / 4;
loc->wqe_free -= (len + 3) / 4;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, false, olx);
}
/**
@@ -4011,8 +3995,6 @@ next_empw:
txq->wqe_ci += (2 + part + 3) / 4;
loc->wqe_free -= (2 + part + 3) / 4;
pkts_n -= part;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, false, olx);
if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free))
return MLX5_TXCMP_CODE_EXIT;
loc->mbuf = *pkts++;
@@ -4496,8 +4478,6 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *restrict txq,
}
++loc->pkts_sent;
--pkts_n;
- /* Request CQE generation if limits are reached. */
- mlx5_tx_request_completion(txq, loc, false, olx);
if (unlikely(!pkts_n || !loc->elts_free || !loc->wqe_free))
return MLX5_TXCMP_CODE_EXIT;
loc->mbuf = *pkts++;
@@ -4776,6 +4756,8 @@ enter_send_single:
/* Take a shortcut if nothing is sent. */
if (unlikely(loc.pkts_sent == loc.pkts_loop))
goto burst_exit;
+ /* Request CQE generation if limits are reached. */
+ mlx5_tx_request_completion(txq, &loc, olx);
/*
* Ring QP doorbell immediately after WQE building completion
* to improve latencies. The pure software related data treatment
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.804123071 +0000
+++ 0116-net-mlx5-move-Tx-complete-request-routine.patch 2020-02-11 11:17:38.584004787 +0000
@@ -1,8 +1,10 @@
-From 8b581c690a54be065ecb7b7fd9979c8e86898234 Mon Sep 17 00:00:00 2001
+From 58a7836b5015d81984ec7a597f8753a40589b6dd Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:04 +0000
Subject: [PATCH] net/mlx5: move Tx complete request routine
+[ upstream commit 8b581c690a54be065ecb7b7fd9979c8e86898234 ]
+
The complete request flag is set once per Tx burst call,
the code of appropriate routine moved to the end of sending
loop. This is preparation step to remove WQE reserved field
@@ -15,7 +17,7 @@
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index a06db01ba8..0b85634919 100644
+index b4702ff9f6..3234ab241e 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2145,9 +2145,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: update Tx error handling routine' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (114 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: move Tx complete request routine' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: add free on completion queue' " luca.boccassi
` (72 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a7ccf96061ad4619474625905a13900570555809 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:05 +0000
Subject: [PATCH] net/mlx5: update Tx error handling routine
[ upstream commit 1fd9af05e44e6283cdfcc28f3450cd80f7bbd2f3 ]
This is preparation step, we are going to store the index
of elts to free on completion in the dedicated free on
completion queue, this patch updates the elts freeing routine
and updates Tx error handling routine to be synced with
coming new queue.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 98 +++++++++++++++++++-----------------
drivers/net/mlx5/mlx5_rxtx.h | 4 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
3 files changed, 54 insertions(+), 50 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 3234ab241e..f8de2a035b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -654,10 +654,10 @@ check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe)
* Pointer to the error CQE.
*
* @return
- * Negative value if queue recovery failed,
- * the last Tx buffer element to free otherwise.
+ * Negative value if queue recovery failed, otherwise
+ * the error completion entry is handled successfully.
*/
-int
+static int
mlx5_tx_error_cqe_handle(struct mlx5_txq_data *restrict txq,
volatile struct mlx5_err_cqe *err_cqe)
{
@@ -701,18 +701,14 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *restrict txq,
*/
txq->stats.oerrors += ((txq->wqe_ci & wqe_m) -
new_wqe_pi) & wqe_m;
- if (tx_recover_qp(txq_ctrl) == 0) {
- txq->cq_ci++;
- /* Release all the remaining buffers. */
- return txq->elts_head;
+ if (tx_recover_qp(txq_ctrl)) {
+ /* Recovering failed - retry later on the same WQE. */
+ return -1;
}
- /* Recovering failed - try again later on the same WQE. */
- return -1;
- } else {
- txq->cq_ci++;
+ /* Release all the remaining buffers. */
+ txq_free_elts(txq_ctrl);
}
- /* Do not release buffers. */
- return txq->elts_tail;
+ return 0;
}
/**
@@ -2034,8 +2030,6 @@ mlx5_tx_copy_elts(struct mlx5_txq_data *restrict txq,
* Pointer to TX queue structure.
* @param valid CQE pointer
* if not NULL update txq->wqe_pi and flush the buffers
- * @param itail
- * if not negative - flush the buffers till this index.
* @param olx
* Configured Tx offloads mask. It is fully defined at
* compile time and may be used for optimization.
@@ -2043,25 +2037,18 @@ mlx5_tx_copy_elts(struct mlx5_txq_data *restrict txq,
static __rte_always_inline void
mlx5_tx_comp_flush(struct mlx5_txq_data *restrict txq,
volatile struct mlx5_cqe *last_cqe,
- int itail,
unsigned int olx __rte_unused)
{
- uint16_t tail;
-
if (likely(last_cqe != NULL)) {
+ uint16_t tail;
+
txq->wqe_pi = rte_be_to_cpu_16(last_cqe->wqe_counter);
tail = ((volatile struct mlx5_wqe_cseg *)
(txq->wqes + (txq->wqe_pi & txq->wqe_m)))->misc;
- } else if (itail >= 0) {
- tail = (uint16_t)itail;
- } else {
- return;
- }
- rte_compiler_barrier();
- *txq->cq_db = rte_cpu_to_be_32(txq->cq_ci);
- if (likely(tail != txq->elts_tail)) {
- mlx5_tx_free_elts(txq, tail, olx);
- assert(tail == txq->elts_tail);
+ if (likely(tail != txq->elts_tail)) {
+ mlx5_tx_free_elts(txq, tail, olx);
+ assert(tail == txq->elts_tail);
+ }
}
}
@@ -2085,6 +2072,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
{
unsigned int count = MLX5_TX_COMP_MAX_CQE;
volatile struct mlx5_cqe *last_cqe = NULL;
+ uint16_t ci = txq->cq_ci;
int ret;
static_assert(MLX5_CQE_STATUS_HW_OWN < 0, "Must be negative value");
@@ -2092,8 +2080,8 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
do {
volatile struct mlx5_cqe *cqe;
- cqe = &txq->cqes[txq->cq_ci & txq->cqe_m];
- ret = check_cqe(cqe, txq->cqe_s, txq->cq_ci);
+ cqe = &txq->cqes[ci & txq->cqe_m];
+ ret = check_cqe(cqe, txq->cqe_s, ci);
if (unlikely(ret != MLX5_CQE_STATUS_SW_OWN)) {
if (likely(ret != MLX5_CQE_STATUS_ERR)) {
/* No new CQEs in completion queue. */
@@ -2109,31 +2097,49 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
rte_wmb();
ret = mlx5_tx_error_cqe_handle
(txq, (volatile struct mlx5_err_cqe *)cqe);
+ if (unlikely(ret < 0)) {
+ /*
+ * Some error occurred on queue error
+ * handling, we do not advance the index
+ * here, allowing to retry on next call.
+ */
+ return;
+ }
/*
- * Flush buffers, update consuming index
- * if recovery succeeded. Otherwise
- * just try to recover later.
+ * We are going to fetch all entries with
+ * MLX5_CQE_SYNDROME_WR_FLUSH_ERR status.
*/
- last_cqe = NULL;
- break;
+ ++ci;
+ continue;
}
/* Normal transmit completion. */
- ++txq->cq_ci;
+ ++ci;
last_cqe = cqe;
#ifndef NDEBUG
if (txq->cq_pi)
--txq->cq_pi;
#endif
- /*
- * We have to restrict the amount of processed CQEs
- * in one tx_burst routine call. The CQ may be large
- * and many CQEs may be updated by the NIC in one
- * transaction. Buffers freeing is time consuming,
- * multiple iterations may introduce significant
- * latency.
- */
- } while (--count);
- mlx5_tx_comp_flush(txq, last_cqe, ret, olx);
+ /*
+ * We have to restrict the amount of processed CQEs
+ * in one tx_burst routine call. The CQ may be large
+ * and many CQEs may be updated by the NIC in one
+ * transaction. Buffers freeing is time consuming,
+ * multiple iterations may introduce significant
+ * latency.
+ */
+ if (--count == 0)
+ break;
+ } while (true);
+ if (likely(ci != txq->cq_ci)) {
+ /*
+ * Update completion queue consuming index
+ * and ring doorbell to notify hardware.
+ */
+ rte_compiler_barrier();
+ txq->cq_ci = ci;
+ *txq->cq_db = rte_cpu_to_be_32(ci);
+ mlx5_tx_comp_flush(txq, last_cqe, olx);
+ }
}
/**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index e927343f7d..8a2185a0ec 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -440,6 +440,7 @@ int mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx);
int mlx5_txq_releasable(struct rte_eth_dev *dev, uint16_t idx);
int mlx5_txq_verify(struct rte_eth_dev *dev);
void txq_alloc_elts(struct mlx5_txq_ctrl *txq_ctrl);
+void txq_free_elts(struct mlx5_txq_ctrl *txq_ctrl);
uint64_t mlx5_get_tx_port_offloads(struct rte_eth_dev *dev);
/* mlx5_rxtx.c */
@@ -451,9 +452,6 @@ extern uint8_t mlx5_swp_types_table[];
void mlx5_set_ptype_table(void);
void mlx5_set_cksum_table(void);
void mlx5_set_swp_types_table(void);
-__rte_noinline int mlx5_tx_error_cqe_handle
- (struct mlx5_txq_data *restrict txq,
- volatile struct mlx5_err_cqe *err_cqe);
uint16_t mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n);
void mlx5_rxq_initialize(struct mlx5_rxq_data *rxq);
__rte_noinline int mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec);
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 16856d796c..78ec36107c 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -62,7 +62,7 @@ txq_alloc_elts(struct mlx5_txq_ctrl *txq_ctrl)
* @param txq_ctrl
* Pointer to TX queue structure.
*/
-static void
+void
txq_free_elts(struct mlx5_txq_ctrl *txq_ctrl)
{
const uint16_t elts_n = 1 << txq_ctrl->txq.elts_n;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.836702396 +0000
+++ 0117-net-mlx5-update-Tx-error-handling-routine.patch 2020-02-11 11:17:38.588004862 +0000
@@ -1,8 +1,10 @@
-From 1fd9af05e44e6283cdfcc28f3450cd80f7bbd2f3 Mon Sep 17 00:00:00 2001
+From a7ccf96061ad4619474625905a13900570555809 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:05 +0000
Subject: [PATCH] net/mlx5: update Tx error handling routine
+[ upstream commit 1fd9af05e44e6283cdfcc28f3450cd80f7bbd2f3 ]
+
This is preparation step, we are going to store the index
of elts to free on completion in the dedicated free on
completion queue, this patch updates the elts freeing routine
@@ -18,7 +20,7 @@
3 files changed, 54 insertions(+), 50 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 0b85634919..e879e5f186 100644
+index 3234ab241e..f8de2a035b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -654,10 +654,10 @@ check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe)
@@ -187,7 +189,7 @@
/**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index f35cc873a5..30f0af3920 100644
+index e927343f7d..8a2185a0ec 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -440,6 +440,7 @@ int mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: add free on completion queue' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (115 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: update Tx error handling " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: engage " luca.boccassi
` (71 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2b2288cd0c2ff2876495eecbd4647658d57b778b Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:06 +0000
Subject: [PATCH] net/mlx5: add free on completion queue
[ upstream commit 644906881881ea1f5a0400ebc83e95f203790f6e ]
The new software manged entity is introduced in Tx datapath
- free on completion queue. This queue keeps the information
how many buffers stored in elts array must freed on send
completion. Each element of the queue contains transmitting
descriptor index to be in synch with completion entries (in
debug build only) and the index in elts array to free buffers.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.h | 5 +++++
drivers/net/mlx5/mlx5_txq.c | 15 +++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 8a2185a0ec..7d1b2fa10c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -297,6 +297,11 @@ struct mlx5_txq_data {
struct mlx5_mr_ctrl mr_ctrl; /* MR control descriptor. */
struct mlx5_wqe *wqes; /* Work queue. */
struct mlx5_wqe *wqes_end; /* Work queue array limit. */
+#ifdef NDEBUG
+ uint16_t *fcqs; /* Free completion queue. */
+#else
+ uint32_t *fcqs; /* Free completion queue (debug extended). */
+#endif
volatile struct mlx5_cqe *cqes; /* Completion queue. */
volatile uint32_t *qp_db; /* Work queue doorbell. */
volatile uint32_t *cq_db; /* Completion queue doorbell. */
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 78ec36107c..2db11200d3 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -724,6 +724,17 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
txq_data->wqe_pi = 0;
txq_data->wqe_comp = 0;
txq_data->wqe_thres = txq_data->wqe_s / MLX5_TX_COMP_THRESH_INLINE_DIV;
+ txq_data->fcqs = rte_calloc_socket(__func__,
+ txq_data->cqe_s,
+ sizeof(*txq_data->fcqs),
+ RTE_CACHE_LINE_SIZE,
+ txq_ctrl->socket);
+ if (!txq_data->fcqs) {
+ DRV_LOG(ERR, "port %u Tx queue %u cannot allocate memory (FCQ)",
+ dev->data->port_id, idx);
+ rte_errno = ENOMEM;
+ goto error;
+ }
#ifdef HAVE_IBV_FLOW_DV_SUPPORT
/*
* If using DevX need to query and store TIS transport domain value.
@@ -772,6 +783,8 @@ error:
claim_zero(mlx5_glue->destroy_cq(tmpl.cq));
if (tmpl.qp)
claim_zero(mlx5_glue->destroy_qp(tmpl.qp));
+ if (txq_data && txq_data->fcqs)
+ rte_free(txq_data->fcqs);
if (txq_obj)
rte_free(txq_obj);
priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
@@ -826,6 +839,8 @@ mlx5_txq_obj_release(struct mlx5_txq_obj *txq_obj)
} else {
claim_zero(mlx5_glue->destroy_qp(txq_obj->qp));
claim_zero(mlx5_glue->destroy_cq(txq_obj->cq));
+ if (txq_obj->txq_ctrl->txq.fcqs)
+ rte_free(txq_obj->txq_ctrl->txq.fcqs);
}
LIST_REMOVE(txq_obj, next);
rte_free(txq_obj);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.870023475 +0000
+++ 0118-net-mlx5-add-free-on-completion-queue.patch 2020-02-11 11:17:38.592004937 +0000
@@ -1,8 +1,10 @@
-From 644906881881ea1f5a0400ebc83e95f203790f6e Mon Sep 17 00:00:00 2001
+From 2b2288cd0c2ff2876495eecbd4647658d57b778b Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:06 +0000
Subject: [PATCH] net/mlx5: add free on completion queue
+[ upstream commit 644906881881ea1f5a0400ebc83e95f203790f6e ]
+
The new software manged entity is introduced in Tx datapath
- free on completion queue. This queue keeps the information
how many buffers stored in elts array must freed on send
@@ -18,7 +20,7 @@
2 files changed, 20 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index 30f0af3920..7d99282797 100644
+index 8a2185a0ec..7d1b2fa10c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -297,6 +297,11 @@ struct mlx5_txq_data {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: engage free on completion queue' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (116 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: add free on completion queue' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: optimize Rx hash fields conversion' " luca.boccassi
` (70 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b79505fd8360c91c2fc31a423c7c4b2f0e7b85ed Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:07 +0000
Subject: [PATCH] net/mlx5: engage free on completion queue
[ upstream commit 89ef76db3b7627d4a7e656c7e51807b5bf8bdedc ]
The free on completion queue keeps the indices of elts array,
all mbuf stored below this index should be freed on arrival
of normal send completion. In debug version it also contains
an index of completed transmitting descriptor (WQE) to check
queues synchronization.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 33 +++++++++++++++++----------------
drivers/net/mlx5/mlx5_rxtx.h | 4 +---
drivers/net/mlx5/mlx5_txq.c | 2 --
3 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index f8de2a035b..67cafd1e2c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2043,8 +2043,7 @@ mlx5_tx_comp_flush(struct mlx5_txq_data *restrict txq,
uint16_t tail;
txq->wqe_pi = rte_be_to_cpu_16(last_cqe->wqe_counter);
- tail = ((volatile struct mlx5_wqe_cseg *)
- (txq->wqes + (txq->wqe_pi & txq->wqe_m)))->misc;
+ tail = txq->fcqs[(txq->cq_ci - 1) & txq->cqe_m];
if (likely(tail != txq->elts_tail)) {
mlx5_tx_free_elts(txq, tail, olx);
assert(tail == txq->elts_tail);
@@ -2095,6 +2094,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
* here, before we might perform SQ reset.
*/
rte_wmb();
+ txq->cq_ci = ci;
ret = mlx5_tx_error_cqe_handle
(txq, (volatile struct mlx5_err_cqe *)cqe);
if (unlikely(ret < 0)) {
@@ -2108,17 +2108,18 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
/*
* We are going to fetch all entries with
* MLX5_CQE_SYNDROME_WR_FLUSH_ERR status.
+ * The send queue is supposed to be empty.
*/
++ci;
+ txq->cq_pi = ci;
+ last_cqe = NULL;
continue;
}
/* Normal transmit completion. */
+ assert(ci != txq->cq_pi);
+ assert((txq->fcqs[ci & txq->cqe_m] >> 16) == cqe->wqe_counter);
++ci;
last_cqe = cqe;
-#ifndef NDEBUG
- if (txq->cq_pi)
- --txq->cq_pi;
-#endif
/*
* We have to restrict the amount of processed CQEs
* in one tx_burst routine call. The CQ may be large
@@ -2127,7 +2128,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
* multiple iterations may introduce significant
* latency.
*/
- if (--count == 0)
+ if (likely(--count == 0))
break;
} while (true);
if (likely(ci != txq->cq_ci)) {
@@ -2177,15 +2178,15 @@ mlx5_tx_request_completion(struct mlx5_txq_data *restrict txq,
/* Request unconditional completion on last WQE. */
last->cseg.flags = RTE_BE32(MLX5_COMP_ALWAYS <<
MLX5_COMP_MODE_OFFSET);
- /* Save elts_head in unused "immediate" field of WQE. */
- last->cseg.misc = head;
- /*
- * A CQE slot must always be available. Count the
- * issued CEQ "always" request instead of production
- * index due to here can be CQE with errors and
- * difference with ci may become inconsistent.
- */
- assert(txq->cqe_s > ++txq->cq_pi);
+ /* Save elts_head in dedicated free on completion queue. */
+#ifdef NDEBUG
+ txq->fcqs[txq->cq_pi++ & txq->cqe_m] = head;
+#else
+ txq->fcqs[txq->cq_pi++ & txq->cqe_m] = head |
+ (last->cseg.opcode >> 8) << 16;
+#endif
+ /* A CQE slot must always be available. */
+ assert((txq->cq_pi - txq->cq_ci) <= txq->cqe_s);
}
}
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7d1b2fa10c..e362b4afe0 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -273,9 +273,7 @@ struct mlx5_txq_data {
uint16_t wqe_thres; /* WQE threshold to request completion in CQ. */
/* WQ related fields. */
uint16_t cq_ci; /* Consumer index for completion queue. */
-#ifndef NDEBUG
- uint16_t cq_pi; /* Counter of issued CQE "always" requests. */
-#endif
+ uint16_t cq_pi; /* Production index for completion queue. */
uint16_t cqe_s; /* Number of CQ elements. */
uint16_t cqe_m; /* Mask for CQ indices. */
/* CQ related fields. */
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 2db11200d3..1a76f6ea83 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -717,9 +717,7 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
txq_data->cq_db = cq_info.dbrec;
txq_data->cqes = (volatile struct mlx5_cqe *)cq_info.buf;
txq_data->cq_ci = 0;
-#ifndef NDEBUG
txq_data->cq_pi = 0;
-#endif
txq_data->wqe_ci = 0;
txq_data->wqe_pi = 0;
txq_data->wqe_comp = 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.899051638 +0000
+++ 0119-net-mlx5-engage-free-on-completion-queue.patch 2020-02-11 11:17:38.596005012 +0000
@@ -1,8 +1,10 @@
-From 89ef76db3b7627d4a7e656c7e51807b5bf8bdedc Mon Sep 17 00:00:00 2001
+From b79505fd8360c91c2fc31a423c7c4b2f0e7b85ed Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 9 Jan 2020 17:16:07 +0000
Subject: [PATCH] net/mlx5: engage free on completion queue
+[ upstream commit 89ef76db3b7627d4a7e656c7e51807b5bf8bdedc ]
+
The free on completion queue keeps the indices of elts array,
all mbuf stored below this index should be freed on arrival
of normal send completion. In debug version it also contains
@@ -18,7 +20,7 @@
3 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index e879e5f186..5e31f01eda 100644
+index f8de2a035b..67cafd1e2c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2043,8 +2043,7 @@ mlx5_tx_comp_flush(struct mlx5_txq_data *restrict txq,
@@ -97,7 +99,7 @@
}
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index 7d99282797..24fa038dc4 100644
+index 7d1b2fa10c..e362b4afe0 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -273,9 +273,7 @@ struct mlx5_txq_data {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: optimize Rx hash fields conversion' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (117 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: engage " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix meter suffix flow' " luca.boccassi
` (69 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 92290f523dc17fcd6188729d3d32f40007167fd6 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 15 Jan 2020 23:19:39 +0200
Subject: [PATCH] net/mlx5: optimize Rx hash fields conversion
[ upstream commit 70ccb6056847a87bba374d703f51705344982eec ]
Previous fix added translation of Rx hash fields to PRM format.
This patch optimizes the fix, to perform value translation only
if value is not zero.
In case value is zero, there is no need to translate it.
Fixes: c3e33304a7f6 ("net/mlx5: fix setting of Rx hash fields")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_rxq.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 906ff0e045..da020a0aa0 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2453,7 +2453,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
}
} else { /* ind_tbl->type == MLX5_IND_TBL_TYPE_DEVX */
struct mlx5_devx_tir_attr tir_attr;
- struct mlx5_rx_hash_field_select *rx_hash_field_select;
uint32_t i;
uint32_t lro = 1;
@@ -2467,23 +2466,27 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
memset(&tir_attr, 0, sizeof(tir_attr));
tir_attr.disp_type = MLX5_TIRC_DISP_TYPE_INDIRECT;
tir_attr.rx_hash_fn = MLX5_RX_HASH_FN_TOEPLITZ;
-#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
tir_attr.tunneled_offload_en = !!tunnel;
- /* Translate hash_fields bitmap to PRM format. */
- rx_hash_field_select = hash_fields & IBV_RX_HASH_INNER ?
- &tir_attr.rx_hash_field_selector_inner :
- &tir_attr.rx_hash_field_selector_outer;
+ /* If needed, translate hash_fields bitmap to PRM format. */
+ if (hash_fields) {
+#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
+ struct mlx5_rx_hash_field_select *rx_hash_field_select =
+ hash_fields & IBV_RX_HASH_INNER ?
+ &tir_attr.rx_hash_field_selector_inner :
+ &tir_attr.rx_hash_field_selector_outer;
#else
- rx_hash_field_select = &tir_attr.rx_hash_field_selector_outer;
+ struct mlx5_rx_hash_field_select *rx_hash_field_select =
+ &tir_attr.rx_hash_field_selector_outer;
#endif
- /* 1 bit: 0: IPv4, 1: IPv6. */
- rx_hash_field_select->l3_prot_type =
- !!(hash_fields & MLX5_IPV6_IBV_RX_HASH);
- /* 1 bit: 0: TCP, 1: UDP. */
- rx_hash_field_select->l4_prot_type =
- !!(hash_fields & MLX5_UDP_IBV_RX_HASH);
- /* Bitmask which sets which fields to use in RX Hash. */
- rx_hash_field_select->selected_fields =
+
+ /* 1 bit: 0: IPv4, 1: IPv6. */
+ rx_hash_field_select->l3_prot_type =
+ !!(hash_fields & MLX5_IPV6_IBV_RX_HASH);
+ /* 1 bit: 0: TCP, 1: UDP. */
+ rx_hash_field_select->l4_prot_type =
+ !!(hash_fields & MLX5_UDP_IBV_RX_HASH);
+ /* Bitmask which sets which fields to use in RX Hash. */
+ rx_hash_field_select->selected_fields =
((!!(hash_fields & MLX5_L3_SRC_IBV_RX_HASH)) <<
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_SRC_IP) |
(!!(hash_fields & MLX5_L3_DST_IBV_RX_HASH)) <<
@@ -2492,6 +2495,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_SPORT |
(!!(hash_fields & MLX5_L4_DST_IBV_RX_HASH)) <<
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_DPORT;
+ }
if (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN)
tir_attr.transport_domain = priv->sh->td->id;
else
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.933213192 +0000
+++ 0120-net-mlx5-optimize-Rx-hash-fields-conversion.patch 2020-02-11 11:17:38.600005087 +0000
@@ -1,8 +1,10 @@
-From 70ccb6056847a87bba374d703f51705344982eec Mon Sep 17 00:00:00 2001
+From 92290f523dc17fcd6188729d3d32f40007167fd6 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 15 Jan 2020 23:19:39 +0200
Subject: [PATCH] net/mlx5: optimize Rx hash fields conversion
+[ upstream commit 70ccb6056847a87bba374d703f51705344982eec ]
+
Previous fix added translation of Rx hash fields to PRM format.
This patch optimizes the fix, to perform value translation only
@@ -10,7 +12,6 @@
In case value is zero, there is no need to translate it.
Fixes: c3e33304a7f6 ("net/mlx5: fix setting of Rx hash fields")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -19,10 +20,10 @@
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index c87ce151d7..4092cb71ce 100644
+index 906ff0e045..da020a0aa0 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -2465,7 +2465,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
+@@ -2453,7 +2453,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
}
} else { /* ind_tbl->type == MLX5_IND_TBL_TYPE_DEVX */
struct mlx5_devx_tir_attr tir_attr;
@@ -30,7 +31,7 @@
uint32_t i;
uint32_t lro = 1;
-@@ -2479,23 +2478,27 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
+@@ -2467,23 +2466,27 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
memset(&tir_attr, 0, sizeof(tir_attr));
tir_attr.disp_type = MLX5_TIRC_DISP_TYPE_INDIRECT;
tir_attr.rx_hash_fn = MLX5_RX_HASH_FN_TOEPLITZ;
@@ -72,7 +73,7 @@
((!!(hash_fields & MLX5_L3_SRC_IBV_RX_HASH)) <<
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_SRC_IP) |
(!!(hash_fields & MLX5_L3_DST_IBV_RX_HASH)) <<
-@@ -2504,6 +2507,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
+@@ -2492,6 +2495,7 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_SPORT |
(!!(hash_fields & MLX5_L4_DST_IBV_RX_HASH)) <<
MLX5_RX_HASH_FIELD_SELECT_SELECTED_FIELDS_L4_DPORT;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix meter suffix flow' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (118 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: optimize Rx hash fields conversion' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' " luca.boccassi
` (68 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Suanming Mou; +Cc: Tonghao Zhang, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b2ea9821e4f81333fab8b75e82bc818e3316fc95 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 8 Jan 2020 12:41:09 +0200
Subject: [PATCH] net/mlx5: fix meter suffix flow
[ upstream commit 64927f72a72fad39898b084e0cf66cc97b40959f ]
The meter suffix flow item pointer restore is not correct to decrease
a fixed value. The incorrect operation will cause incorrect match to
the meter suffix flow, the flow create will fail once the magic number
in the wrong offset memory start with RTE_FLOW_ITEM_TYPE_END.
The pointer should decrease the real offset it increases.
Set the decrease value to the real offset the pointer increases to fix
the issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.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 008716367c..e4c661d7ca 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4025,7 +4025,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
sfx_items++;
}
sfx_items->type = RTE_FLOW_ITEM_TYPE_END;
- sfx_items -= METER_SUFFIX_ITEM;
+ sfx_items -= sfx_port_id_item ? 2 : 1;
/* Setting the sfx group atrr. */
sfx_attr.group = sfx_attr.transfer ?
(MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) :
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.963048673 +0000
+++ 0121-net-mlx5-fix-meter-suffix-flow.patch 2020-02-11 11:17:38.604005161 +0000
@@ -1,8 +1,10 @@
-From 64927f72a72fad39898b084e0cf66cc97b40959f Mon Sep 17 00:00:00 2001
+From b2ea9821e4f81333fab8b75e82bc818e3316fc95 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 8 Jan 2020 12:41:09 +0200
Subject: [PATCH] net/mlx5: fix meter suffix flow
+[ upstream commit 64927f72a72fad39898b084e0cf66cc97b40959f ]
+
The meter suffix flow item pointer restore is not correct to decrease
a fixed value. The incorrect operation will cause incorrect match to
the meter suffix flow, the flow create will fail once the magic number
@@ -13,7 +15,6 @@
the issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
-Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
@@ -23,10 +24,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index bb1f1f16a1..970123bf11 100644
+index 008716367c..e4c661d7ca 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -4042,7 +4042,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+@@ -4025,7 +4025,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
sfx_items++;
}
sfx_items->type = RTE_FLOW_ITEM_TYPE_END;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (119 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix meter suffix flow' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 13:48 ` Bing Zhao
2020-02-11 11:21 ` [dpdk-stable] patch 'eal/windows: fix cpuset macro name' " luca.boccassi
` (67 subsequent siblings)
188 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Bing Zhao; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Mon, 20 Jan 2020 11:43:07 +0200
Subject: [PATCH] net/mlx5: fix modify actions support limitation
[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
In the root table, there is some limitation of total number of header
modify actions, 16 or 8 for each. But in other tables, there is no
such strict limitation. In an IPv6 case, the IP fields modifying
will occupy more actions than that in IPv4, so the total support
number should be increased in order to support as many actions as
possible for an IPv6 + TCP packet.
And in the meanwhile, the memory consumption should also be taken
into consideration because sometimes only several actions are needed.
The root table checking could also be done in low layer driver and
the error code will be returned if the actions number is over the
maximal supported value.
Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions number")
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.h | 15 +++--
drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++---------------
2 files changed, 66 insertions(+), 53 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index db12715ecc..13bed08d75 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
/*
* Number of modification commands.
- * If extensive metadata registers are supported
- * the maximal actions amount is 16 and 8 otherwise.
+ * If extensive metadata registers are supported, the maximal actions amount is
+ * 16 and 8 otherwise on root table. The validation could also be done in the
+ * lower driver layer.
+ * On non-root table, there is no limitation, but 32 is enough right now.
*/
-#define MLX5_MODIFY_NUM 16
-#define MLX5_MODIFY_NUM_NO_MREG 8
+#define MLX5_MAX_MODIFY_NUM 32
+#define MLX5_ROOT_TBL_MODIFY_NUM 16
+#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
/* Modify resource structure */
struct mlx5_flow_dv_modify_hdr_resource {
@@ -406,9 +409,9 @@ struct mlx5_flow_dv_modify_hdr_resource {
/**< Verbs modify header action object. */
uint8_t ft_type; /**< Flow table type, Rx or Tx. */
uint32_t actions_num; /**< Number of modification actions. */
- struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM];
+ uint64_t flags; /**< Flags for RDMA API. */
+ struct mlx5_modification_cmd actions[];
/**< Modification actions. */
- uint64_t flags; /**< Flags for RDMA API. */
};
/* Jump action resource structure. */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8f77909419..74d1a68e4a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
uint32_t mask;
uint32_t data;
- if (i >= MLX5_MODIFY_NUM)
+ if (i >= MLX5_MAX_MODIFY_NUM)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
++i;
++field;
} while (field->size);
- resource->actions_num = i;
- if (!resource->actions_num)
+ if (resource->actions_num == i)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"invalid modification flow item");
+ resource->actions_num = i;
return 0;
}
@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
struct mlx5_modification_cmd *actions = &resource->actions[i];
struct field_modify_info *field = modify_vlan_out_first_vid;
- if (i >= MLX5_MODIFY_NUM)
+ if (i >= MLX5_MAX_MODIFY_NUM)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
struct mlx5_modification_cmd *actions = resource->actions;
uint32_t i = resource->actions_num;
- if (i >= MLX5_MODIFY_NUM)
+ if (i >= MLX5_MAX_MODIFY_NUM)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
actions[i].data1 = rte_cpu_to_be_32(conf->data);
++i;
resource->actions_num = i;
- if (!resource->actions_num)
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION, NULL,
- "invalid modification flow item");
return 0;
}
@@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
domain = sh->rx_domain;
else
domain = sh->tx_domain;
-
/* Lookup a matching resource from cache. */
LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
if (resource->reformat_type == cache_resource->reformat_type &&
@@ -3367,21 +3362,27 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
*
* @param dev
* Pointer to rte_eth_dev structure.
+ * @param flags
+ * Flags bits to check if root level.
*
* @return
* Max number of modify header actions device can support.
*/
static unsigned int
-flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
+flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev, uint64_t flags)
{
/*
* There's no way to directly query the max cap. Although it has to be
* acquried by iterative trial, it is a safe assumption that more
* actions are supported by FW if extensive metadata register is
- * supported.
+ * supported. (Only in the root table)
*/
- return mlx5_flow_ext_mreg_supported(dev) ? MLX5_MODIFY_NUM :
- MLX5_MODIFY_NUM_NO_MREG;
+ if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
+ return MLX5_MAX_MODIFY_NUM;
+ else
+ return mlx5_flow_ext_mreg_supported(dev) ?
+ MLX5_ROOT_TBL_MODIFY_NUM :
+ MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
}
/**
@@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
struct mlx5_ibv_shared *sh = priv->sh;
struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
struct mlx5dv_dr_domain *ns;
+ uint32_t actions_len;
- if (resource->actions_num > flow_dv_modify_hdr_action_max(dev))
+ resource->flags =
+ dev_flow->group ? 0 : MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
+ if (resource->actions_num > flow_dv_modify_hdr_action_max(dev,
+ resource->flags))
return rte_flow_error_set(error, EOVERFLOW,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many modify header items");
@@ -3483,17 +3488,15 @@ flow_dv_modify_hdr_resource_register
ns = sh->tx_domain;
else
ns = sh->rx_domain;
- resource->flags =
- dev_flow->group ? 0 : MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
/* Lookup a matching resource from cache. */
+ actions_len = resource->actions_num * sizeof(resource->actions[0]);
LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
if (resource->ft_type == cache_resource->ft_type &&
resource->actions_num == cache_resource->actions_num &&
resource->flags == cache_resource->flags &&
!memcmp((const void *)resource->actions,
(const void *)cache_resource->actions,
- (resource->actions_num *
- sizeof(resource->actions[0])))) {
+ actions_len)) {
DRV_LOG(DEBUG, "modify-header resource %p: refcnt %d++",
(void *)cache_resource,
rte_atomic32_read(&cache_resource->refcnt));
@@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
}
}
/* Register new modify-header resource. */
- cache_resource = rte_calloc(__func__, 1, sizeof(*cache_resource), 0);
+ cache_resource = rte_calloc(__func__, 1,
+ sizeof(*cache_resource) + actions_len, 0);
if (!cache_resource)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
"cannot allocate resource memory");
*cache_resource = *resource;
+ rte_memcpy(cache_resource->actions, resource->actions, actions_len);
cache_resource->verbs_action =
mlx5_glue->dv_create_flow_action_modify_header
- (sh->ctx, cache_resource->ft_type,
- ns, cache_resource->flags,
- cache_resource->actions_num *
- sizeof(cache_resource->actions[0]),
+ (sh->ctx, cache_resource->ft_type, ns,
+ cache_resource->flags, actions_len,
(uint64_t *)cache_resource->actions);
if (!cache_resource->verbs_action) {
rte_free(cache_resource);
@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev *dev,
};
int actions_n = 0;
bool actions_end = false;
- struct mlx5_flow_dv_modify_hdr_resource mhdr_res = {
- .ft_type = attr->egress ? MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
- MLX5DV_FLOW_TABLE_TYPE_NIC_RX
- };
+ union {
+ struct mlx5_flow_dv_modify_hdr_resource res;
+ uint8_t len[sizeof(struct mlx5_flow_dv_modify_hdr_resource) +
+ sizeof(struct mlx5_modification_cmd) *
+ (MLX5_MAX_MODIFY_NUM + 1)];
+ } mhdr_dummy;
+ struct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res;
union flow_dv_attr flow_attr = { .attr = 0 };
uint32_t tag_be;
union mlx5_flow_tbl_key tbl_key;
@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev *dev,
uint32_t table;
int ret = 0;
+ mhdr_res->ft_type = attr->egress ? MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
+ MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr->group,
&table, error);
if (ret)
return ret;
dev_flow->group = table;
if (attr->transfer)
- mhdr_res.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
+ mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
if (priority == MLX5_FLOW_PRIO_RSVD)
priority = dev_conf->flow_prio - 1;
+ /* number of actions must be set to 0 in case of dirty stack. */
+ mhdr_res->actions_num = 0;
for (; !actions_end ; actions++) {
const struct rte_flow_action_queue *queue;
const struct rte_flow_action_rss *rss;
@@ -6731,7 +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
};
if (flow_dv_convert_action_mark(dev, &mark,
- &mhdr_res,
+ mhdr_res,
error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_MARK_EXT;
@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
actions->conf;
if (flow_dv_convert_action_mark(dev, mark,
- &mhdr_res,
+ mhdr_res,
error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_MARK_EXT;
@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ACTION_TYPE_SET_META:
if (flow_dv_convert_action_set_meta
- (dev, &mhdr_res, attr,
+ (dev, mhdr_res, attr,
(const struct rte_flow_action_set_meta *)
actions->conf, error))
return -rte_errno;
@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ACTION_TYPE_SET_TAG:
if (flow_dv_convert_action_set_tag
- (dev, &mhdr_res,
+ (dev, mhdr_res,
(const struct rte_flow_action_set_tag *)
actions->conf, error))
return -rte_errno;
@@ -6882,7 +6892,7 @@ cnt_err:
mlx5_update_vlan_vid_pcp(actions, &vlan);
/* If no VLAN push - this is a modify header action */
if (flow_dv_convert_action_modify_vlan_vid
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
break;
@@ -6981,7 +6991,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
if (flow_dv_convert_action_modify_mac
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
@@ -6991,7 +7001,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
if (flow_dv_convert_action_modify_ipv4
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
@@ -7001,7 +7011,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
if (flow_dv_convert_action_modify_ipv6
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
@@ -7011,7 +7021,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
if (flow_dv_convert_action_modify_tp
- (&mhdr_res, actions, items,
+ (mhdr_res, actions, items,
&flow_attr, error))
return -rte_errno;
action_flags |= actions->type ==
@@ -7021,13 +7031,13 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_DEC_TTL:
if (flow_dv_convert_action_modify_dec_ttl
- (&mhdr_res, items, &flow_attr, error))
+ (mhdr_res, items, &flow_attr, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
break;
case RTE_FLOW_ACTION_TYPE_SET_TTL:
if (flow_dv_convert_action_modify_ttl
- (&mhdr_res, actions, items,
+ (mhdr_res, actions, items,
&flow_attr, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TTL;
@@ -7035,7 +7045,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
if (flow_dv_convert_action_modify_tcp_seq
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
@@ -7046,7 +7056,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
if (flow_dv_convert_action_modify_tcp_ack
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
@@ -7055,13 +7065,13 @@ cnt_err:
break;
case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
if (flow_dv_convert_action_set_reg
- (&mhdr_res, actions, error))
+ (mhdr_res, actions, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TAG;
break;
case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
if (flow_dv_convert_action_copy_mreg
- (dev, &mhdr_res, actions, error))
+ (dev, mhdr_res, actions, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TAG;
break;
@@ -7086,10 +7096,10 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_END:
actions_end = true;
- if (mhdr_res.actions_num) {
+ if (mhdr_res->actions_num) {
/* create modify action if needed. */
if (flow_dv_modify_hdr_resource_register
- (dev, &mhdr_res, dev_flow, error))
+ (dev, mhdr_res, dev_flow, error))
return -rte_errno;
dev_flow->dv.actions[modify_action_position] =
dev_flow->dv.modify_hdr->verbs_action;
@@ -7098,7 +7108,7 @@ cnt_err:
default:
break;
}
- if (mhdr_res.actions_num &&
+ if (mhdr_res->actions_num &&
modify_action_position == UINT32_MAX)
modify_action_position = actions_n++;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:42.994804790 +0000
+++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch 2020-02-11 11:17:38.612005311 +0000
@@ -1,8 +1,10 @@
-From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep 17 00:00:00 2001
+From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Mon, 20 Jan 2020 11:43:07 +0200
Subject: [PATCH] net/mlx5: fix modify actions support limitation
+[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
+
In the root table, there is some limitation of total number of header
modify actions, 16 or 8 for each. But in other tables, there is no
such strict limitation. In an IPv6 case, the IP fields modifying
@@ -16,21 +18,20 @@
maximal supported value.
Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions number")
-Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.h | 15 +++--
- drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++---------------
- 2 files changed, 68 insertions(+), 55 deletions(-)
+ drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++---------------
+ 2 files changed, 66 insertions(+), 53 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index a1c7b67488..9832542328 100644
+index db12715ecc..13bed08d75 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
+@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
/*
* Number of modification commands.
@@ -49,7 +50,7 @@
/* Modify resource structure */
struct mlx5_flow_dv_modify_hdr_resource {
-@@ -407,9 +410,9 @@ struct mlx5_flow_dv_modify_hdr_resource {
+@@ -406,9 +409,9 @@ struct mlx5_flow_dv_modify_hdr_resource {
/**< Verbs modify header action object. */
uint8_t ft_type; /**< Flow table type, Rx or Tx. */
uint32_t actions_num; /**< Number of modification actions. */
@@ -62,10 +63,10 @@
/* Jump action resource structure. */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 26dbaaf329..5a1b42698c 100644
+index 8f77909419..74d1a68e4a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -366,7 +366,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
+@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
uint32_t mask;
uint32_t data;
@@ -74,7 +75,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
-@@ -407,11 +407,11 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
+@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
++i;
++field;
} while (field->size);
@@ -88,7 +89,7 @@
return 0;
}
-@@ -572,7 +572,7 @@ flow_dv_convert_action_modify_vlan_vid
+@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
struct mlx5_modification_cmd *actions = &resource->actions[i];
struct field_modify_info *field = modify_vlan_out_first_vid;
@@ -97,7 +98,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
-@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
+@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
struct mlx5_modification_cmd *actions = resource->actions;
uint32_t i = resource->actions_num;
@@ -106,7 +107,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
-@@ -917,10 +917,6 @@ flow_dv_convert_action_set_reg
+@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
actions[i].data1 = rte_cpu_to_be_32(conf->data);
++i;
resource->actions_num = i;
@@ -117,7 +118,7 @@
return 0;
}
-@@ -2385,7 +2381,6 @@ flow_dv_encap_decap_resource_register
+@@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
domain = sh->rx_domain;
else
domain = sh->tx_domain;
@@ -125,7 +126,7 @@
/* Lookup a matching resource from cache. */
LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
if (resource->reformat_type == cache_resource->reformat_type &&
-@@ -3496,21 +3491,27 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
+@@ -3367,21 +3362,27 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
*
* @param dev
* Pointer to rte_eth_dev structure.
@@ -157,7 +158,7 @@
}
/**
-@@ -3669,8 +3670,12 @@ flow_dv_modify_hdr_resource_register
+@@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
struct mlx5_ibv_shared *sh = priv->sh;
struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
struct mlx5dv_dr_domain *ns;
@@ -171,7 +172,7 @@
return rte_flow_error_set(error, EOVERFLOW,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many modify header items");
-@@ -3680,17 +3685,15 @@ flow_dv_modify_hdr_resource_register
+@@ -3483,17 +3488,15 @@ flow_dv_modify_hdr_resource_register
ns = sh->tx_domain;
else
ns = sh->rx_domain;
@@ -191,7 +192,7 @@
DRV_LOG(DEBUG, "modify-header resource %p: refcnt %d++",
(void *)cache_resource,
rte_atomic32_read(&cache_resource->refcnt));
-@@ -3700,18 +3703,18 @@ flow_dv_modify_hdr_resource_register
+@@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
}
}
/* Register new modify-header resource. */
@@ -215,7 +216,7 @@
(uint64_t *)cache_resource->actions);
if (!cache_resource->verbs_action) {
rte_free(cache_resource);
-@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev *dev,
};
int actions_n = 0;
bool actions_end = false;
@@ -233,7 +234,7 @@
union flow_dv_attr flow_attr = { .attr = 0 };
uint32_t tag_be;
union mlx5_flow_tbl_key tbl_key;
-@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev *dev,
uint32_t table;
int ret = 0;
@@ -254,7 +255,7 @@
for (; !actions_end ; actions++) {
const struct rte_flow_action_queue *queue;
const struct rte_flow_action_rss *rss;
-@@ -7081,7 +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6731,7 +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
};
if (flow_dv_convert_action_mark(dev, &mark,
@@ -263,7 +264,7 @@
error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_MARK_EXT;
-@@ -7103,7 +7113,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
actions->conf;
if (flow_dv_convert_action_mark(dev, mark,
@@ -272,7 +273,7 @@
error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_MARK_EXT;
-@@ -7124,7 +7134,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ACTION_TYPE_SET_META:
if (flow_dv_convert_action_set_meta
@@ -281,7 +282,7 @@
(const struct rte_flow_action_set_meta *)
actions->conf, error))
return -rte_errno;
-@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ACTION_TYPE_SET_TAG:
if (flow_dv_convert_action_set_tag
@@ -290,7 +291,7 @@
(const struct rte_flow_action_set_tag *)
actions->conf, error))
return -rte_errno;
-@@ -7232,7 +7242,7 @@ cnt_err:
+@@ -6882,7 +6892,7 @@ cnt_err:
mlx5_update_vlan_vid_pcp(actions, &vlan);
/* If no VLAN push - this is a modify header action */
if (flow_dv_convert_action_modify_vlan_vid
@@ -299,7 +300,7 @@
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
break;
-@@ -7331,7 +7341,7 @@ cnt_err:
+@@ -6981,7 +6991,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
if (flow_dv_convert_action_modify_mac
@@ -308,7 +309,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
-@@ -7341,7 +7351,7 @@ cnt_err:
+@@ -6991,7 +7001,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
if (flow_dv_convert_action_modify_ipv4
@@ -317,7 +318,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
-@@ -7351,7 +7361,7 @@ cnt_err:
+@@ -7001,7 +7011,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
if (flow_dv_convert_action_modify_ipv6
@@ -326,7 +327,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
-@@ -7361,7 +7371,7 @@ cnt_err:
+@@ -7011,7 +7021,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
if (flow_dv_convert_action_modify_tp
@@ -335,7 +336,7 @@
&flow_attr, error))
return -rte_errno;
action_flags |= actions->type ==
-@@ -7371,13 +7381,13 @@ cnt_err:
+@@ -7021,13 +7031,13 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_DEC_TTL:
if (flow_dv_convert_action_modify_dec_ttl
@@ -351,7 +352,7 @@
&flow_attr, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TTL;
-@@ -7385,7 +7395,7 @@ cnt_err:
+@@ -7035,7 +7045,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
if (flow_dv_convert_action_modify_tcp_seq
@@ -360,7 +361,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
-@@ -7396,7 +7406,7 @@ cnt_err:
+@@ -7046,7 +7056,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
if (flow_dv_convert_action_modify_tcp_ack
@@ -369,7 +370,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
-@@ -7405,13 +7415,13 @@ cnt_err:
+@@ -7055,13 +7065,13 @@ cnt_err:
break;
case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
if (flow_dv_convert_action_set_reg
@@ -385,22 +386,7 @@
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TAG;
break;
-@@ -7435,23 +7445,23 @@ cnt_err:
- action_flags |= MLX5_FLOW_ACTION_METER;
- break;
- case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
-- if (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
-+ if (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
- actions, error))
- return -rte_errno;
- action_flags |= MLX5_FLOW_ACTION_SET_IPV4_DSCP;
- break;
- case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
-- if (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
-+ if (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
- actions, error))
- return -rte_errno;
- action_flags |= MLX5_FLOW_ACTION_SET_IPV6_DSCP;
+@@ -7086,10 +7096,10 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_END:
actions_end = true;
@@ -413,7 +399,7 @@
return -rte_errno;
dev_flow->dv.actions[modify_action_position] =
dev_flow->dv.modify_hdr->verbs_action;
-@@ -7460,7 +7470,7 @@ cnt_err:
+@@ -7098,7 +7108,7 @@ cnt_err:
default:
break;
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'eal/windows: fix cpuset macro name' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (120 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " luca.boccassi
` (66 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9bbd7fe398e4c3b2aa03599f1a88549781366c99 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 2 Dec 2019 16:41:46 +0100
Subject: [PATCH] eal/windows: fix cpuset macro name
[ upstream commit be67d057590ca01362e32cded3a28ff20e0bd14e ]
Fix the name of CPU_SETSIZE in hope we can reuse it in other parts of
the dpdk manipulating some rte_cpuset_t.
Fixes: 4dc2b4d2a4cd ("eal/windows: add headers for compatibility")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_eal/windows/eal/include/sched.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/windows/eal/include/sched.h b/lib/librte_eal/windows/eal/include/sched.h
index 257060594c..29868c93d1 100644
--- a/lib/librte_eal/windows/eal/include/sched.h
+++ b/lib/librte_eal/windows/eal/include/sched.h
@@ -14,8 +14,8 @@
extern "C" {
#endif
-#ifndef CPU_SET_SIZE
-#define CPU_SET_SIZE RTE_MAX_LCORE
+#ifndef CPU_SETSIZE
+#define CPU_SETSIZE RTE_MAX_LCORE
#endif
#define _BITS_PER_SET (sizeof(long long) * 8)
@@ -26,7 +26,7 @@ extern "C" {
#define _WHICH_BIT(b) ((b) & (_BITS_PER_SET - 1))
typedef struct _rte_cpuset_s {
- long long _bits[_NUM_SETS(CPU_SET_SIZE)];
+ long long _bits[_NUM_SETS(CPU_SETSIZE)];
} rte_cpuset_t;
#define CPU_SET(b, s) ((s)->_bits[_WHICH_SET(b)] |= (1LL << _WHICH_BIT(b)))
@@ -35,7 +35,7 @@ typedef struct _rte_cpuset_s {
do { \
unsigned int _i; \
\
- for (_i = 0; _i < _NUM_SETS(CPU_SET_SIZE); _i++) \
+ for (_i = 0; _i < _NUM_SETS(CPU_SETSIZE); _i++) \
(s)->_bits[_i] = 0LL; \
} while (0)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.030490909 +0000
+++ 0123-eal-windows-fix-cpuset-macro-name.patch 2020-02-11 11:17:38.612005311 +0000
@@ -1,13 +1,14 @@
-From be67d057590ca01362e32cded3a28ff20e0bd14e Mon Sep 17 00:00:00 2001
+From 9bbd7fe398e4c3b2aa03599f1a88549781366c99 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 2 Dec 2019 16:41:46 +0100
Subject: [PATCH] eal/windows: fix cpuset macro name
+[ upstream commit be67d057590ca01362e32cded3a28ff20e0bd14e ]
+
Fix the name of CPU_SETSIZE in hope we can reuse it in other parts of
the dpdk manipulating some rte_cpuset_t.
Fixes: 4dc2b4d2a4cd ("eal/windows: add headers for compatibility")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (121 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'eal/windows: fix cpuset macro name' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " luca.boccassi
` (65 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cc1b0cc22897973956186535ab9692d037a521c1 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 8 Jan 2020 15:13:32 +0100
Subject: [PATCH] maintainers: update for failsafe and PCI library
[ upstream commit a61b779e316bb9abe995702d837f5234a4457c21 ]
My email address has changed, gaetan.rivet@6wind.com is no longer valid.
Signed-off-by: Gaetan Rivet <grive@u256.net>
---
MAINTAINERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 607a7fa8b4..1a7459cc83 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -910,7 +910,7 @@ F: drivers/net/null/
F: doc/guides/nics/features/null.ini
Fail-safe PMD
-M: Gaetan Rivet <gaetan.rivet@6wind.com>
+M: Gaetan Rivet <grive@u256.net>
F: drivers/net/failsafe/
F: doc/guides/nics/fail_safe.rst
F: doc/guides/nics/features/failsafe.ini
@@ -1373,7 +1373,7 @@ F: app/test/test_rcu*
F: doc/guides/prog_guide/rcu_lib.rst
PCI
-M: Gaetan Rivet <gaetan.rivet@6wind.com>
+M: Gaetan Rivet <grive@u256.net>
F: lib/librte_pci/
Power management
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.056814143 +0000
+++ 0124-maintainers-update-for-failsafe-and-PCI-library.patch 2020-02-11 11:17:38.616005386 +0000
@@ -1,11 +1,11 @@
-From a61b779e316bb9abe995702d837f5234a4457c21 Mon Sep 17 00:00:00 2001
+From cc1b0cc22897973956186535ab9692d037a521c1 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 8 Jan 2020 15:13:32 +0100
Subject: [PATCH] maintainers: update for failsafe and PCI library
-My email address has changed, gaetan.rivet@6wind.com is no longer valid.
+[ upstream commit a61b779e316bb9abe995702d837f5234a4457c21 ]
-Cc: stable@dpdk.org
+My email address has changed, gaetan.rivet@6wind.com is no longer valid.
Signed-off-by: Gaetan Rivet <grive@u256.net>
---
@@ -13,10 +13,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
-index 8cd037cea9..d6db54bbeb 100644
+index 607a7fa8b4..1a7459cc83 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -912,7 +912,7 @@ F: drivers/net/null/
+@@ -910,7 +910,7 @@ F: drivers/net/null/
F: doc/guides/nics/features/null.ini
Fail-safe PMD
@@ -25,7 +25,7 @@
F: drivers/net/failsafe/
F: doc/guides/nics/fail_safe.rst
F: doc/guides/nics/features/failsafe.ini
-@@ -1391,7 +1391,7 @@ F: app/test/test_rcu*
+@@ -1373,7 +1373,7 @@ F: app/test/test_rcu*
F: doc/guides/prog_guide/rcu_lib.rst
PCI
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'maintainers: resign from flow API maintenance' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (122 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix meson headers packaging' " luca.boccassi
` (64 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1638d384450c8f60894dae7c98c00076f2643fd9 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 8 Jan 2020 11:10:00 +0100
Subject: [PATCH] maintainers: resign from flow API maintenance
[ upstream commit 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 ]
Unfortunately due to lack of time, I've been unable to even participate to
flow API discussions for several months. Better make it official since this
is not going to improve anytime soon.
This doesn't mean I won't contribute to rte_flow in the future!
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1a7459cc83..10c4e1a613 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,7 +370,7 @@ F: devtools/test-null.sh
F: doc/guides/prog_guide/switch_representation.rst
Flow API
-M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
+M: Ori Kam <orika@mellanox.com>
T: git://dpdk.org/next/dpdk-next-net
F: app/test-pmd/cmdline_flow.c
F: doc/guides/prog_guide/rte_flow.rst
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.085097423 +0000
+++ 0125-maintainers-resign-from-flow-API-maintenance.patch 2020-02-11 11:17:38.616005386 +0000
@@ -1,34 +1,35 @@
-From 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 Mon Sep 17 00:00:00 2001
+From 1638d384450c8f60894dae7c98c00076f2643fd9 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 8 Jan 2020 11:10:00 +0100
Subject: [PATCH] maintainers: resign from flow API maintenance
+[ upstream commit 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 ]
+
Unfortunately due to lack of time, I've been unable to even participate to
flow API discussions for several months. Better make it official since this
is not going to improve anytime soon.
This doesn't mean I won't contribute to rte_flow in the future!
-Cc: stable@dpdk.org
-
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
- MAINTAINERS | 1 -
- 1 file changed, 1 deletion(-)
+ MAINTAINERS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
-index d6db54bbeb..d114c8865f 100644
+index 1a7459cc83..10c4e1a613 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -371,7 +371,6 @@ F: devtools/test-null.sh
+@@ -370,7 +370,7 @@ F: devtools/test-null.sh
F: doc/guides/prog_guide/switch_representation.rst
Flow API
-M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
- M: Ori Kam <orika@mellanox.com>
++M: Ori Kam <orika@mellanox.com>
T: git://dpdk.org/next/dpdk-next-net
F: app/test-pmd/cmdline_flow.c
+ F: doc/guides/prog_guide/rte_flow.rst
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'hash: fix meson headers packaging' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (123 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix lock-free flag doxygen' " luca.boccassi
` (63 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: David Marchand; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5a5a580548e4a9253cbb95d979a8d98886cbe62a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sun, 2 Feb 2020 22:08:32 +0100
Subject: [PATCH] hash: fix meson headers packaging
[ upstream commit 251d69a26ec7b3f279bd635b2a04d2c15c654d7d ]
Those headers are internal and should not be distributed.
Fixes: 5b9656b157d3 ("lib: build with meson")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
lib/librte_hash/meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
index 5d02b3084f..bce11ad9e0 100644
--- a/lib/librte_hash/meson.build
+++ b/lib/librte_hash/meson.build
@@ -1,10 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-headers = files('rte_cmp_arm64.h',
- 'rte_cmp_x86.h',
- 'rte_crc_arm64.h',
- 'rte_cuckoo_hash.h',
+headers = files('rte_crc_arm64.h',
'rte_fbk_hash.h',
'rte_hash_crc.h',
'rte_hash.h',
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.112979642 +0000
+++ 0126-hash-fix-meson-headers-packaging.patch 2020-02-11 11:17:38.616005386 +0000
@@ -1,12 +1,13 @@
-From 251d69a26ec7b3f279bd635b2a04d2c15c654d7d Mon Sep 17 00:00:00 2001
+From 5a5a580548e4a9253cbb95d979a8d98886cbe62a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sun, 2 Feb 2020 22:08:32 +0100
Subject: [PATCH] hash: fix meson headers packaging
+[ upstream commit 251d69a26ec7b3f279bd635b2a04d2c15c654d7d ]
+
Those headers are internal and should not be distributed.
Fixes: 5b9656b157d3 ("lib: build with meson")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'hash: fix lock-free flag doxygen' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (124 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix meson headers packaging' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'build: remove unneeded function versioning' " luca.boccassi
` (62 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Honnappa Nagarahalli; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 19ee86229c9917720d86bd4395862d4e43668cfc Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 3 Feb 2020 13:49:12 -0600
Subject: [PATCH] hash: fix lock-free flag doxygen
[ upstream commit f3822eb6fb241bed1d92ad7749afa6b381810ec3 ]
Lock-free extendable table is supported. Correct the comments.
Fixes: f401363d984a ("hash: support lock-free extendable bucket")
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
lib/librte_hash/rte_hash.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 0d73370dc4..ab7be1d528 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -51,8 +51,6 @@ extern "C" {
/** Flag to support lock free reader writer concurrency. Both single writer
* and multi writer use cases are supported.
- * Currently, extendable bucket table feature is not supported with
- * this feature.
*/
#define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF 0x20
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.140262867 +0000
+++ 0127-hash-fix-lock-free-flag-doxygen.patch 2020-02-11 11:17:38.616005386 +0000
@@ -1,12 +1,13 @@
-From f3822eb6fb241bed1d92ad7749afa6b381810ec3 Mon Sep 17 00:00:00 2001
+From 19ee86229c9917720d86bd4395862d4e43668cfc Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 3 Feb 2020 13:49:12 -0600
Subject: [PATCH] hash: fix lock-free flag doxygen
+[ upstream commit f3822eb6fb241bed1d92ad7749afa6b381810ec3 ]
+
Lock-free extendable table is supported. Correct the comments.
Fixes: f401363d984a ("hash: support lock-free extendable bucket")
-Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
@@ -14,7 +15,7 @@
1 file changed, 2 deletions(-)
diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
-index 0637011731..ed0673b73b 100644
+index 0d73370dc4..ab7be1d528 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -51,8 +51,6 @@ extern "C" {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'build: remove unneeded function versioning' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (125 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix lock-free flag doxygen' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'vfio: fix mapping failures in ppc64le' " luca.boccassi
` (61 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Andrzej Ostruszka; +Cc: Bruce Richardson, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 131acf0ad071c6a05ad63fcc30c6bd6c10b7e4a0 Mon Sep 17 00:00:00 2001
From: Andrzej Ostruszka <aostruszka@marvell.com>
Date: Thu, 30 Jan 2020 10:25:30 +0100
Subject: [PATCH] build: remove unneeded function versioning
[ upstream commit f2318b73c29427b291719dfcd511768acd620415 ]
Timer, LPM and Distributor libraries no longer use function versioning
and therefore do not need separate build for static and shared version
of libraries.
This patch removes use_function_versioning from their meson build files
and corresponding include from the sources.
Fixes: f2fb215843a9 ("timer: remove deprecated code")
Fixes: 6e5b51676176 ("distributor: remove deprecated code")
Fixes: c381a8d554b7 ("lpm: remove deprecated code")
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_distributor/meson.build | 1 -
lib/librte_distributor/rte_distributor.c | 1 -
lib/librte_distributor/rte_distributor_single.c | 1 -
lib/librte_lpm/meson.build | 1 -
lib/librte_lpm/rte_lpm.c | 1 -
lib/librte_lpm/rte_lpm6.c | 1 -
lib/librte_timer/meson.build | 1 -
lib/librte_timer/rte_timer.c | 1 -
8 files changed, 8 deletions(-)
diff --git a/lib/librte_distributor/meson.build b/lib/librte_distributor/meson.build
index 50b91887b5..266af64348 100644
--- a/lib/librte_distributor/meson.build
+++ b/lib/librte_distributor/meson.build
@@ -9,7 +9,6 @@ else
endif
headers = files('rte_distributor.h')
deps += ['mbuf']
-use_function_versioning = true
# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 6c5b0c86e8..1c047f065a 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -8,7 +8,6 @@
#include <rte_mbuf.h>
#include <rte_memory.h>
#include <rte_cycles.h>
-#include <rte_function_versioning.h>
#include <rte_memzone.h>
#include <rte_errno.h>
#include <rte_string_fns.h>
diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c
index 91d8824c64..abaf7730c3 100644
--- a/lib/librte_distributor/rte_distributor_single.c
+++ b/lib/librte_distributor/rte_distributor_single.c
@@ -9,7 +9,6 @@
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_errno.h>
-#include <rte_function_versioning.h>
#include <rte_string_fns.h>
#include <rte_eal_memconfig.h>
#include <rte_pause.h>
diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build
index 27ce45b531..021ac6d8d4 100644
--- a/lib/librte_lpm/meson.build
+++ b/lib/librte_lpm/meson.build
@@ -7,4 +7,3 @@ headers = files('rte_lpm.h', 'rte_lpm6.h')
# without worrying about which architecture we actually need
headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h')
deps += ['hash']
-use_function_versioning = true
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index b78c487447..2687564194 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -22,7 +22,6 @@
#include <rte_rwlock.h>
#include <rte_spinlock.h>
#include <rte_tailq.h>
-#include <rte_function_versioning.h>
#include "rte_lpm.h"
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index c46e557e23..b981e40714 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -25,7 +25,6 @@
#include <assert.h>
#include <rte_jhash.h>
#include <rte_tailq.h>
-#include <rte_function_versioning.h>
#include "rte_lpm6.h"
diff --git a/lib/librte_timer/meson.build b/lib/librte_timer/meson.build
index b7edfe2e7d..d3b828ce9d 100644
--- a/lib/librte_timer/meson.build
+++ b/lib/librte_timer/meson.build
@@ -4,4 +4,3 @@
sources = files('rte_timer.c')
headers = files('rte_timer.h')
allow_experimental_apis = true
-use_function_versioning = true
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index ca88454ff6..4680a91b58 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -26,7 +26,6 @@
#include <rte_memzone.h>
#include <rte_malloc.h>
#include <rte_errno.h>
-#include <rte_function_versioning.h>
#include "rte_timer.h"
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.167682691 +0000
+++ 0128-build-remove-unneeded-function-versioning.patch 2020-02-11 11:17:38.620005460 +0000
@@ -1,8 +1,10 @@
-From f2318b73c29427b291719dfcd511768acd620415 Mon Sep 17 00:00:00 2001
+From 131acf0ad071c6a05ad63fcc30c6bd6c10b7e4a0 Mon Sep 17 00:00:00 2001
From: Andrzej Ostruszka <aostruszka@marvell.com>
Date: Thu, 30 Jan 2020 10:25:30 +0100
Subject: [PATCH] build: remove unneeded function versioning
+[ upstream commit f2318b73c29427b291719dfcd511768acd620415 ]
+
Timer, LPM and Distributor libraries no longer use function versioning
and therefore do not need separate build for static and shared version
of libraries.
@@ -13,7 +15,6 @@
Fixes: f2fb215843a9 ("timer: remove deprecated code")
Fixes: 6e5b51676176 ("distributor: remove deprecated code")
Fixes: c381a8d554b7 ("lpm: remove deprecated code")
-Cc: stable@dpdk.org
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -108,7 +109,7 @@
allow_experimental_apis = true
-use_function_versioning = true
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
-index a1ed186cf5..89f27074f8 100644
+index ca88454ff6..4680a91b58 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -26,7 +26,6 @@
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vfio: fix mapping failures in ppc64le' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (126 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'build: remove unneeded function versioning' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " luca.boccassi
` (60 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Takeshi Yoshimura; +Cc: David Christensen, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 80e2880c9097999377da2647bce6c195320db496 Mon Sep 17 00:00:00 2001
From: Takeshi Yoshimura <tyos@jp.ibm.com>
Date: Fri, 17 Jan 2020 13:25:55 +0900
Subject: [PATCH] vfio: fix mapping failures in ppc64le
[ upstream commit 986f2134c336a086054980903e819308dcfd43ce ]
ppc64le failed when using large physical memory. I found problems in my two
commits in the past.
In commit e072d16f8920 ("vfio: fix expanding DMA area in ppc64le"), I added
a sanity check using a mapped address to resolve an issue around expanding
IOMMU window, but this was not enough, since memory allocation can return
memory anywhere dependent on memory fragmentation. DPDK may still skip DMA
mapping and attempts to unmap non-mapped DMA during expanding IOMMU window.
As a result, SPDK apps using large physical memory frequently failed to
proceed the communication with NVMe and/or went into an infinite loop.
The root cause of the bug was in a gap between memory segments managed by
DPDK and firmware-level DMA mapping. DPDK's memory segments don't contain
the state of DMA mapping, and so, the memesg_walk cannot determine if an
iterated memory segment is mapped or not. This resulted in incorrect DMA
maps and unmaps.
At this time, I added the code to avoid iterating non-mapped memory
segments during DMA mapping. The memseg_walk iterates over memory segments
marked as "used", and so, the code sets memory segments that will be
mapped or unmapped as "free" transiently.
The commit db90b4969e2e ("vfio: retry creating sPAPR DMA window") allows
retring different page levels and sizes to create DMA window. However, this
allows page sizes different from hugepage sizes. This inconsistency caused
failures at the time of DMA mapping after the window creation. This patch
fixes to retry only different page levels.
Fixes: e072d16f8920 ("vfio: fix expanding DMA area in ppc64le")
Fixes: db90b4969e2e ("vfio: retry creating sPAPR DMA window")
Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
---
lib/librte_eal/linux/eal/eal_vfio.c | 76 +++++++++++++----------------
1 file changed, 33 insertions(+), 43 deletions(-)
diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 95f615c2e3..01b5ef3f42 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -532,6 +532,17 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
return;
}
+#ifdef RTE_ARCH_PPC_64
+ ms = rte_mem_virt2memseg(addr, msl);
+ while (cur_len < len) {
+ int idx = rte_fbarray_find_idx(&msl->memseg_arr, ms);
+
+ rte_fbarray_set_free(&msl->memseg_arr, idx);
+ cur_len += ms->len;
+ ++ms;
+ }
+ cur_len = 0;
+#endif
/* memsegs are contiguous in memory */
ms = rte_mem_virt2memseg(addr, msl);
while (cur_len < len) {
@@ -551,6 +562,17 @@ next:
cur_len += ms->len;
++ms;
}
+#ifdef RTE_ARCH_PPC_64
+ cur_len = 0;
+ ms = rte_mem_virt2memseg(addr, msl);
+ while (cur_len < len) {
+ int idx = rte_fbarray_find_idx(&msl->memseg_arr, ms);
+
+ rte_fbarray_set_used(&msl->memseg_arr, idx);
+ cur_len += ms->len;
+ ++ms;
+ }
+#endif
}
static int
@@ -1416,16 +1438,11 @@ vfio_spapr_dma_do_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
return 0;
}
-struct spapr_remap_walk_param {
- int vfio_container_fd;
- uint64_t addr_64;
-};
-
static int
vfio_spapr_map_walk(const struct rte_memseg_list *msl,
const struct rte_memseg *ms, void *arg)
{
- struct spapr_remap_walk_param *param = arg;
+ int *vfio_container_fd = arg;
/* skip external memory that isn't a heap */
if (msl->external && !msl->heap)
@@ -1435,10 +1452,7 @@ vfio_spapr_map_walk(const struct rte_memseg_list *msl,
if (ms->iova == RTE_BAD_IOVA)
return 0;
- if (ms->addr_64 == param->addr_64)
- return 0;
-
- return vfio_spapr_dma_do_map(param->vfio_container_fd, ms->addr_64, ms->iova,
+ return vfio_spapr_dma_do_map(*vfio_container_fd, ms->addr_64, ms->iova,
ms->len, 1);
}
@@ -1446,7 +1460,7 @@ static int
vfio_spapr_unmap_walk(const struct rte_memseg_list *msl,
const struct rte_memseg *ms, void *arg)
{
- struct spapr_remap_walk_param *param = arg;
+ int *vfio_container_fd = arg;
/* skip external memory that isn't a heap */
if (msl->external && !msl->heap)
@@ -1456,17 +1470,13 @@ vfio_spapr_unmap_walk(const struct rte_memseg_list *msl,
if (ms->iova == RTE_BAD_IOVA)
return 0;
- if (ms->addr_64 == param->addr_64)
- return 0;
-
- return vfio_spapr_dma_do_map(param->vfio_container_fd, ms->addr_64, ms->iova,
+ return vfio_spapr_dma_do_map(*vfio_container_fd, ms->addr_64, ms->iova,
ms->len, 0);
}
struct spapr_walk_param {
uint64_t window_size;
uint64_t hugepage_sz;
- uint64_t addr_64;
};
static int
@@ -1484,10 +1494,6 @@ vfio_spapr_window_size_walk(const struct rte_memseg_list *msl,
if (ms->iova == RTE_BAD_IOVA)
return 0;
- /* do not iterate ms we haven't mapped yet */
- if (param->addr_64 && ms->addr_64 == param->addr_64)
- return 0;
-
if (max > param->window_size) {
param->hugepage_sz = ms->hugepage_sz;
param->window_size = max;
@@ -1531,20 +1537,11 @@ vfio_spapr_create_new_dma_window(int vfio_container_fd,
/* try possible page_shift and levels for workaround */
uint32_t levels;
- for (levels = 1; levels <= info.ddw.levels; levels++) {
- uint32_t pgsizes = info.ddw.pgsizes;
-
- while (pgsizes != 0) {
- create->page_shift = 31 - __builtin_clz(pgsizes);
- create->levels = levels;
- ret = ioctl(vfio_container_fd,
- VFIO_IOMMU_SPAPR_TCE_CREATE, create);
- if (!ret)
- break;
- pgsizes &= ~(1 << create->page_shift);
- }
- if (!ret)
- break;
+ for (levels = create->levels + 1;
+ ret && levels <= info.ddw.levels; levels++) {
+ create->levels = levels;
+ ret = ioctl(vfio_container_fd,
+ VFIO_IOMMU_SPAPR_TCE_CREATE, create);
}
#endif
if (ret) {
@@ -1585,7 +1582,6 @@ vfio_spapr_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
/* check if window size needs to be adjusted */
memset(¶m, 0, sizeof(param));
- param.addr_64 = vaddr;
/* we're inside a callback so use thread-unsafe version */
if (rte_memseg_walk_thread_unsafe(vfio_spapr_window_size_walk,
@@ -1610,14 +1606,9 @@ vfio_spapr_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
if (do_map) {
/* re-create window and remap the entire memory */
if (iova + len > create.window_size) {
- struct spapr_remap_walk_param remap_param = {
- .vfio_container_fd = vfio_container_fd,
- .addr_64 = vaddr,
- };
-
/* release all maps before recreating the window */
if (rte_memseg_walk_thread_unsafe(vfio_spapr_unmap_walk,
- &remap_param) < 0) {
+ &vfio_container_fd) < 0) {
RTE_LOG(ERR, EAL, "Could not release DMA maps\n");
ret = -1;
goto out;
@@ -1644,7 +1635,7 @@ vfio_spapr_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
/* we're inside a callback, so use thread-unsafe version
*/
if (rte_memseg_walk_thread_unsafe(vfio_spapr_map_walk,
- &remap_param) < 0) {
+ &vfio_container_fd) < 0) {
RTE_LOG(ERR, EAL, "Could not recreate DMA maps\n");
ret = -1;
goto out;
@@ -1691,7 +1682,6 @@ vfio_spapr_dma_map(int vfio_container_fd)
struct spapr_walk_param param;
memset(¶m, 0, sizeof(param));
- param.addr_64 = 0UL;
/* create DMA window from 0 to max(phys_addr + len) */
rte_memseg_walk(vfio_spapr_window_size_walk, ¶m);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.198887974 +0000
+++ 0129-vfio-fix-mapping-failures-in-ppc64le.patch 2020-02-11 11:17:38.624005536 +0000
@@ -1,8 +1,10 @@
-From 986f2134c336a086054980903e819308dcfd43ce Mon Sep 17 00:00:00 2001
+From 80e2880c9097999377da2647bce6c195320db496 Mon Sep 17 00:00:00 2001
From: Takeshi Yoshimura <tyos@jp.ibm.com>
Date: Fri, 17 Jan 2020 13:25:55 +0900
Subject: [PATCH] vfio: fix mapping failures in ppc64le
+[ upstream commit 986f2134c336a086054980903e819308dcfd43ce ]
+
ppc64le failed when using large physical memory. I found problems in my two
commits in the past.
@@ -33,7 +35,6 @@
Fixes: e072d16f8920 ("vfio: fix expanding DMA area in ppc64le")
Fixes: db90b4969e2e ("vfio: retry creating sPAPR DMA window")
-Cc: stable@dpdk.org
Signed-off-by: Takeshi Yoshimura <tyos@jp.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix flow creation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (127 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'vfio: fix mapping failures in ppc64le' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' " luca.boccassi
` (59 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7303a6f5ab19523204d055ae34ce32c623189401 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:46 +0530
Subject: [PATCH] net/bnxt: fix flow creation
[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]
If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().
Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().
Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index c694367300..c11c0c969d 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
- PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n");
+ rte_flow_error_set(error, ENOSPC,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Not enough resources for a new flow");
goto free_flow;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.227512249 +0000
+++ 0130-net-bnxt-fix-flow-creation.patch 2020-02-11 11:17:38.624005536 +0000
@@ -1,8 +1,10 @@
-From 9356d01d5fca23ce0f6617b1aab5e74da862808b Mon Sep 17 00:00:00 2001
+From 7303a6f5ab19523204d055ae34ce32c623189401 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:46 +0530
Subject: [PATCH] net/bnxt: fix flow creation
+[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]
+
If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().
@@ -14,7 +16,6 @@
when flow create fails due to not enough filter resources.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -23,10 +24,10 @@
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index cde1fa41c4..5564c53637 100644
+index c694367300..c11c0c969d 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1702,7 +1702,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
+@@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (128 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix IOVA mapping' " luca.boccassi
` (58 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP
Cc: Somnath Kotur, Ajit Khaparde, Santoshkumar Karanappa Rastapur,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:47 +0530
Subject: [PATCH] net/bnxt: fix probe in FreeBSD
[ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ]
In FreeBSD environment, nic_uio driver does not support interrupts
and rte_intr_callback_register() will fail to register interrupts
which in turn causes bnxt driver probe failure.
Fixed driver to ignore interrupt callback failures in FreeBSD.
Also fixed to not use a dedicated completion ring for async events
from FW and process these events on RXQ0 in FreeBSD.
Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 8 ++++++++
drivers/net/bnxt/bnxt_ethdev.c | 3 +++
drivers/net/bnxt/bnxt_irq.c | 8 ++++++++
3 files changed, 19 insertions(+)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index d00186f79e..c818bede80 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -117,6 +117,14 @@
#define BNXT_NUM_ASYNC_CPR(bp) 1
#endif
+/* In FreeBSD OS, nic_uio driver does not support interrupts */
+#ifdef RTE_EXEC_ENV_FREEBSD
+#ifdef BNXT_NUM_ASYNC_CPR
+#undef BNXT_NUM_ASYNC_CPR
+#endif
+#define BNXT_NUM_ASYNC_CPR(bp) 0
+#endif
+
#define BNXT_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET
#define BNXT_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3e7bc61325..c3fec1561d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -439,8 +439,11 @@ skip_cosq_cfg:
/* enable uio/vfio intr/eventfd mapping */
rc = rte_intr_enable(intr_handle);
+#ifndef RTE_EXEC_ENV_FREEBSD
+ /* In FreeBSD OS, nic_uio driver does not support interrupts */
if (rc)
goto err_free;
+#endif
rc = bnxt_get_hwrm_link_config(bp, &new);
if (rc) {
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 846325ea96..40e1b0c980 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -181,5 +181,13 @@ int bnxt_request_int(struct bnxt *bp)
irq->requested = 1;
}
+#ifdef RTE_EXEC_ENV_FREEBSD
+ /**
+ * In FreeBSD OS, nic_uio does not support interrupts and
+ * interrupt register callback will fail.
+ */
+ rc = 0;
+#endif
+
return rc;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.255973266 +0000
+++ 0131-net-bnxt-fix-probe-in-FreeBSD.patch 2020-02-11 11:17:38.628005610 +0000
@@ -1,8 +1,10 @@
-From d9fc6a0d07559cfa718efe971a51620c23ba211e Mon Sep 17 00:00:00 2001
+From 877136a915e552265f3c657de7b0cf4df10d199d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:47 +0530
Subject: [PATCH] net/bnxt: fix probe in FreeBSD
+[ upstream commit d9fc6a0d07559cfa718efe971a51620c23ba211e ]
+
In FreeBSD environment, nic_uio driver does not support interrupts
and rte_intr_callback_register() will fail to register interrupts
which in turn causes bnxt driver probe failure.
@@ -13,7 +15,6 @@
Fixes: 6de4c538b393 ("net/bnxt: fix error handling in port start")
Fixes: 43f78b380f89 ("net/bnxt: retry IRQ callback deregistration")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -26,7 +27,7 @@
3 files changed, 19 insertions(+)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 21ca059b8a..3487b917ed 100644
+index d00186f79e..c818bede80 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -117,6 +117,14 @@
@@ -45,7 +46,7 @@
#define BNXT_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 7b5df9ac12..879ea580fe 100644
+index 3e7bc61325..c3fec1561d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -439,8 +439,11 @@ skip_cosq_cfg:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix IOVA mapping' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (129 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix enable/disable VLAN filtering' " luca.boccassi
` (57 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 737a87c64741d59cb8ff0d29bda7615ff6091495 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:48 +0530
Subject: [PATCH] net/bnxt: fix IOVA mapping
[ upstream commit 8f3224f2659e2785d3957e91000c0297fff19b9f ]
Use rte_malloc_virt2iova() to obtain the IO address of a
virtual address obtained through rte_malloc().
Fixed to use the iova address returned by rte_memzone_reserve_aligned()
as the call always returns with populating "mz->iova" with
rte_malloc_virt2iova(mz->addr).
Removed redundant rte_mem_lock_page() call to lock the pages.
Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 49 ----------------------------------
drivers/net/bnxt/bnxt_hwrm.c | 28 ++++++++-----------
drivers/net/bnxt/bnxt_ring.c | 17 ------------
drivers/net/bnxt/bnxt_vnic.c | 11 --------
4 files changed, 11 insertions(+), 94 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c3fec1561d..b2f30de5bf 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4149,18 +4149,6 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp,
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr) {
- PMD_DRV_LOG(DEBUG,
- "physical address same as virtual\n");
- PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n");
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map addr to phys memory\n");
- return -ENOMEM;
- }
- }
- rte_mem_lock_page(((char *)mz->addr));
rmem->pg_tbl = mz->addr;
rmem->pg_tbl_map = mz_phys_addr;
@@ -4184,22 +4172,8 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp,
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr) {
- PMD_DRV_LOG(DEBUG,
- "Memzone physical address same as virtual.\n");
- PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n");
- for (sz = 0; sz < mem_size; sz += BNXT_PAGE_SIZE)
- rte_mem_lock_page(((char *)mz->addr) + sz);
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map addr to phys memory\n");
- return -ENOMEM;
- }
- }
for (sz = 0, i = 0; sz < mem_size; sz += BNXT_PAGE_SIZE, i++) {
- rte_mem_lock_page(((char *)mz->addr) + sz);
rmem->pg_arr[i] = ((char *)mz->addr) + sz;
rmem->dma_arr[i] = mz_phys_addr + sz;
@@ -4376,18 +4350,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
}
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr) {
- PMD_DRV_LOG(DEBUG,
- "Memzone physical address same as virtual.\n");
- PMD_DRV_LOG(DEBUG,
- "Using rte_mem_virt2iova()\n");
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "Can't map address to physical memory\n");
- return -ENOMEM;
- }
- }
bp->rx_mem_zone = (const void *)mz;
bp->hw_rx_port_stats = mz->addr;
@@ -4414,17 +4376,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
}
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr) {
- PMD_DRV_LOG(DEBUG,
- "Memzone physical address same as virtual\n");
- PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n");
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "Can't map address to physical memory\n");
- return -ENOMEM;
- }
- }
bp->tx_mem_zone = (const void *)mz;
bp->hw_tx_port_stats = mz->addr;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 3319dee6a1..2becf0fbe6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -309,8 +309,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
if (vlan_table) {
if (!(mask & HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN))
mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY;
- req.vlan_tag_tbl_addr = rte_cpu_to_le_64(
- rte_mem_virt2iova(vlan_table));
+ req.vlan_tag_tbl_addr =
+ rte_cpu_to_le_64(rte_malloc_virt2iova(vlan_table));
req.num_vlan_tags = rte_cpu_to_le_32((uint32_t)vlan_count);
}
req.mask = rte_cpu_to_le_32(mask);
@@ -351,7 +351,7 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid,
req.fid = rte_cpu_to_le_16(fid);
req.vlan_tag_mask_tbl_addr =
- rte_cpu_to_le_64(rte_mem_virt2iova(vlan_table));
+ rte_cpu_to_le_64(rte_malloc_virt2iova(vlan_table));
req.num_vlan_entries = rte_cpu_to_le_32((uint32_t)vlan_count);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -1029,9 +1029,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
rc = -ENOMEM;
goto error;
}
- rte_mem_lock_page(bp->hwrm_cmd_resp_addr);
bp->hwrm_cmd_resp_dma_addr =
- rte_mem_virt2iova(bp->hwrm_cmd_resp_addr);
+ rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr);
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"Unable to map response buffer to physical memory.\n");
@@ -1066,9 +1065,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
rc = -ENOMEM;
goto error;
}
- rte_mem_lock_page(bp->hwrm_short_cmd_req_addr);
bp->hwrm_short_cmd_req_dma_addr =
- rte_mem_virt2iova(bp->hwrm_short_cmd_req_addr);
+ rte_malloc_virt2iova(bp->hwrm_short_cmd_req_addr);
if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) {
rte_free(bp->hwrm_short_cmd_req_addr);
PMD_DRV_LOG(ERR,
@@ -2476,11 +2474,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
bp->max_resp_len = HWRM_MAX_RESP_LEN;
bp->hwrm_cmd_resp_addr = rte_malloc(type, bp->max_resp_len, 0);
- rte_mem_lock_page(bp->hwrm_cmd_resp_addr);
if (bp->hwrm_cmd_resp_addr == NULL)
return -ENOMEM;
bp->hwrm_cmd_resp_dma_addr =
- rte_mem_virt2iova(bp->hwrm_cmd_resp_addr);
+ rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr);
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
@@ -3426,7 +3423,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
page_getenum(bp->pf.active_vfs * HWRM_MAX_REQ_LEN));
req.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN);
req.req_buf_page_addr0 =
- rte_cpu_to_le_64(rte_mem_virt2iova(bp->pf.vf_req_buf));
+ rte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf.vf_req_buf));
if (req.req_buf_page_addr0 == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map buffer address to physical memory\n");
@@ -3856,10 +3853,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
buflen = dir_entries * entry_length;
buf = rte_malloc("nvm_dir", buflen, 0);
- rte_mem_lock_page(buf);
if (buf == NULL)
return -ENOMEM;
- dma_handle = rte_mem_virt2iova(buf);
+ dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
@@ -3890,11 +3886,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
struct hwrm_nvm_read_output *resp = bp->hwrm_cmd_resp_addr;
buf = rte_malloc("nvm_item", length, 0);
- rte_mem_lock_page(buf);
if (!buf)
return -ENOMEM;
- dma_handle = rte_mem_virt2iova(buf);
+ dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
@@ -3944,11 +3939,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
uint8_t *buf;
buf = rte_malloc("nvm_write", data_len, 0);
- rte_mem_lock_page(buf);
if (!buf)
return -ENOMEM;
- dma_handle = rte_mem_virt2iova(buf);
+ dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
@@ -4011,7 +4005,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
req.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf);
req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);
- req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_mem_virt2iova(vnic_ids));
+ req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_malloc_virt2iova(vnic_ids));
if (req.vnic_id_tbl_addr == RTE_BAD_IOVA) {
HWRM_UNLOCK();
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index ea46fa9bc0..d6e4e8a281 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -110,9 +110,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
uint64_t rx_offloads = bp->eth_dev->data->dev_conf.rxmode.offloads;
const struct rte_memzone *mz = NULL;
char mz_name[RTE_MEMZONE_NAMESIZE];
- rte_iova_t mz_phys_addr_base;
rte_iova_t mz_phys_addr;
- int sz;
int stats_len = (tx_ring_info || rx_ring_info) ?
RTE_CACHE_LINE_ROUNDUP(sizeof(struct hwrm_stat_ctx_query_output) -
@@ -214,22 +212,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
return -ENOMEM;
}
memset(mz->addr, 0, mz->len);
- mz_phys_addr_base = mz->iova;
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr_base) {
- PMD_DRV_LOG(DEBUG,
- "Memzone physical address same as virtual.\n");
- PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n");
- for (sz = 0; sz < total_alloc_len; sz += getpagesize())
- rte_mem_lock_page(((char *)mz->addr) + sz);
- mz_phys_addr_base = rte_mem_virt2iova(mz->addr);
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map ring address to physical memory\n");
- return -ENOMEM;
- }
- }
if (tx_ring_info) {
txq->mz = mz;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 104342e13b..bc054a8e0e 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -150,17 +150,6 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
return -ENOMEM;
}
mz_phys_addr = mz->iova;
- if ((unsigned long)mz->addr == mz_phys_addr) {
- PMD_DRV_LOG(DEBUG,
- "Memzone physical address same as virtual.\n");
- PMD_DRV_LOG(DEBUG, "Using rte_mem_virt2iova()\n");
- mz_phys_addr = rte_mem_virt2iova(mz->addr);
- if (mz_phys_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map to physical memory\n");
- return -ENOMEM;
- }
- }
for (i = 0; i < max_vnics; i++) {
vnic = &bp->vnic_info[i];
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.287986637 +0000
+++ 0132-net-bnxt-fix-IOVA-mapping.patch 2020-02-11 11:17:38.636005760 +0000
@@ -1,8 +1,10 @@
-From 8f3224f2659e2785d3957e91000c0297fff19b9f Mon Sep 17 00:00:00 2001
+From 737a87c64741d59cb8ff0d29bda7615ff6091495 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:48 +0530
Subject: [PATCH] net/bnxt: fix IOVA mapping
+[ upstream commit 8f3224f2659e2785d3957e91000c0297fff19b9f ]
+
Use rte_malloc_virt2iova() to obtain the IO address of a
virtual address obtained through rte_malloc().
@@ -13,7 +15,6 @@
Removed redundant rte_mem_lock_page() call to lock the pages.
Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -26,10 +27,10 @@
4 files changed, 11 insertions(+), 94 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 879ea580fe..a948c78cba 100644
+index c3fec1561d..b2f30de5bf 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -4233,18 +4233,6 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4149,18 +4149,6 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp,
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
@@ -48,7 +49,7 @@
rmem->pg_tbl = mz->addr;
rmem->pg_tbl_map = mz_phys_addr;
-@@ -4268,22 +4256,8 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4184,22 +4172,8 @@ static int bnxt_alloc_ctx_mem_blk(__rte_unused struct bnxt *bp,
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
@@ -71,7 +72,7 @@
rmem->pg_arr[i] = ((char *)mz->addr) + sz;
rmem->dma_arr[i] = mz_phys_addr + sz;
-@@ -4460,18 +4434,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
+@@ -4376,18 +4350,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
}
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
@@ -90,7 +91,7 @@
bp->rx_mem_zone = (const void *)mz;
bp->hw_rx_port_stats = mz->addr;
-@@ -4498,17 +4460,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
+@@ -4414,17 +4376,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
}
memset(mz->addr, 0, mz->len);
mz_phys_addr = mz->iova;
@@ -109,7 +110,7 @@
bp->tx_mem_zone = (const void *)mz;
bp->hw_tx_port_stats = mz->addr;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 50272dcf7d..3b013396ba 100644
+index 3319dee6a1..2becf0fbe6 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -309,8 +309,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
@@ -132,7 +133,7 @@
req.num_vlan_entries = rte_cpu_to_le_32((uint32_t)vlan_count);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
-@@ -1024,9 +1024,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
+@@ -1029,9 +1029,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
rc = -ENOMEM;
goto error;
}
@@ -143,7 +144,7 @@
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"Unable to map response buffer to physical memory.\n");
-@@ -1061,9 +1060,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
+@@ -1066,9 +1065,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
rc = -ENOMEM;
goto error;
}
@@ -154,7 +155,7 @@
if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) {
rte_free(bp->hwrm_short_cmd_req_addr);
PMD_DRV_LOG(ERR,
-@@ -2471,11 +2469,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
+@@ -2476,11 +2474,10 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
bp->max_resp_len = HWRM_MAX_RESP_LEN;
bp->hwrm_cmd_resp_addr = rte_malloc(type, bp->max_resp_len, 0);
@@ -167,7 +168,7 @@
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
-@@ -3421,7 +3418,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
+@@ -3426,7 +3423,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
page_getenum(bp->pf.active_vfs * HWRM_MAX_REQ_LEN));
req.req_buf_len = rte_cpu_to_le_16(HWRM_MAX_REQ_LEN);
req.req_buf_page_addr0 =
@@ -176,7 +177,7 @@
if (req.req_buf_page_addr0 == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map buffer address to physical memory\n");
-@@ -3851,10 +3848,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
+@@ -3856,10 +3853,9 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
buflen = dir_entries * entry_length;
buf = rte_malloc("nvm_dir", buflen, 0);
@@ -188,7 +189,7 @@
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
-@@ -3885,11 +3881,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
+@@ -3890,11 +3886,10 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
struct hwrm_nvm_read_output *resp = bp->hwrm_cmd_resp_addr;
buf = rte_malloc("nvm_item", length, 0);
@@ -201,7 +202,7 @@
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
-@@ -3939,11 +3934,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
+@@ -3944,11 +3939,10 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
uint8_t *buf;
buf = rte_malloc("nvm_write", data_len, 0);
@@ -214,7 +215,7 @@
if (dma_handle == RTE_BAD_IOVA) {
PMD_DRV_LOG(ERR,
"unable to map response address to physical memory\n");
-@@ -4006,7 +4000,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
+@@ -4011,7 +4005,7 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
req.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf);
req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix enable/disable VLAN filtering' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (130 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix IOVA mapping' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " luca.boccassi
` (56 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5822975a3b0cb560851aa8723842c4d6608adb21 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:49 +0530
Subject: [PATCH] net/bnxt: fix enable/disable VLAN filtering
[ upstream commit 39b88344e36426bea97cb131fb8ff5b4348e4676 ]
There is no condition check for the user requested operation
for VLAN filtering. As a result, VLAN filtering is getting disabled
when the user enables/disables VLAN stripping on same port.
The function bnxt_hwrm_clear_l2_filter() didn't actually free
L2 filter in HW if the reference count of filter is zero.
Fixed it by incrementing the reference count of filter in
bnxt_alloc_filter() routine.
Because of the recent changes in bnxt_hwrm_clear_l2_filter(),
change was needed in the routine bnxt_set_default_mac_addr_op()
to destroy and re-create the default filter when the user
changes the default MAC of the port.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Fixes: 6118503d8071 ("net/bnxt: fix VLAN filtering")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 68 ++++++++++++++++++----------------
drivers/net/bnxt/bnxt_filter.c | 5 ++-
2 files changed, 40 insertions(+), 33 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b2f30de5bf..517ae3e861 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1852,18 +1852,12 @@ static int bnxt_del_dflt_mac_filter(struct bnxt *bp,
}
static int
-bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
+bnxt_config_vlan_hw_filter(struct bnxt *bp, uint64_t rx_offloads)
{
- struct bnxt *bp = dev->data->dev_private;
- uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
struct bnxt_vnic_info *vnic;
unsigned int i;
int rc;
- rc = is_bnxt_in_error(bp);
- if (rc)
- return rc;
-
vnic = BNXT_GET_DEFAULT_VNIC(bp);
if (!(rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)) {
/* Remove any VLAN filters programmed */
@@ -1887,6 +1881,28 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
PMD_DRV_LOG(DEBUG, "VLAN Filtering: %d\n",
!!(rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER));
+ return 0;
+}
+
+static int
+bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
+{
+ uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
+ struct bnxt *bp = dev->data->dev_private;
+ unsigned int i;
+ int rc;
+
+ rc = is_bnxt_in_error(bp);
+ if (rc)
+ return rc;
+
+ if (mask & ETH_VLAN_FILTER_MASK) {
+ /* Enable or disable VLAN filtering */
+ rc = bnxt_config_vlan_hw_filter(bp, rx_offloads);
+ if (rc)
+ return rc;
+ }
+
if (mask & ETH_VLAN_STRIP_MASK) {
/* Enable or disable VLAN stripping */
for (i = 0; i < bp->nr_vnics; i++) {
@@ -1976,7 +1992,6 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
struct bnxt *bp = dev->data->dev_private;
/* Default Filter is tied to VNIC 0 */
struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
- struct bnxt_filter_info *filter;
int rc;
rc = is_bnxt_in_error(bp);
@@ -1989,32 +2004,23 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
if (rte_is_zero_ether_addr(addr))
return -EINVAL;
- STAILQ_FOREACH(filter, &vnic->filter, next) {
- /* Default Filter is at Index 0 */
- if (filter->mac_index != 0)
- continue;
-
- memcpy(filter->l2_addr, addr, RTE_ETHER_ADDR_LEN);
- memset(filter->l2_addr_mask, 0xff, RTE_ETHER_ADDR_LEN);
- filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX |
- HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST;
- filter->enables |=
- HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR |
- HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK;
-
- rc = bnxt_hwrm_set_l2_filter(bp, vnic->fw_vnic_id, filter);
- if (rc) {
- memcpy(filter->l2_addr, bp->mac_addr,
- RTE_ETHER_ADDR_LEN);
- return rc;
- }
-
- memcpy(bp->mac_addr, addr, RTE_ETHER_ADDR_LEN);
- PMD_DRV_LOG(DEBUG, "Set MAC addr\n");
+ /* Check if the requested MAC is already added */
+ if (memcmp(addr, bp->mac_addr, RTE_ETHER_ADDR_LEN) == 0)
return 0;
+
+ /* Destroy filter and re-create it */
+ bnxt_del_dflt_mac_filter(bp, vnic);
+
+ memcpy(bp->mac_addr, addr, RTE_ETHER_ADDR_LEN);
+ if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_VLAN_FILTER) {
+ /* This filter will allow only untagged packets */
+ rc = bnxt_add_vlan_filter(bp, 0);
+ } else {
+ rc = bnxt_add_mac_filter(bp, vnic, addr, 0, 0);
}
- return 0;
+ PMD_DRV_LOG(DEBUG, "Set MAC addr\n");
+ return rc;
}
static int
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index da1a6c24a9..04231b069d 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -39,9 +39,10 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
filter->flags = HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX;
filter->enables = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR |
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK;
- memcpy(filter->l2_addr, bp->eth_dev->data->mac_addrs->addr_bytes,
- RTE_ETHER_ADDR_LEN);
+ memcpy(filter->l2_addr, bp->mac_addr, RTE_ETHER_ADDR_LEN);
memset(filter->l2_addr_mask, 0xff, RTE_ETHER_ADDR_LEN);
+ /* bump up the reference count of filter */
+ filter->l2_ref_cnt++;
return filter;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.324253636 +0000
+++ 0133-net-bnxt-fix-enable-disable-VLAN-filtering.patch 2020-02-11 11:17:38.640005834 +0000
@@ -1,8 +1,10 @@
-From 39b88344e36426bea97cb131fb8ff5b4348e4676 Mon Sep 17 00:00:00 2001
+From 5822975a3b0cb560851aa8723842c4d6608adb21 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:49 +0530
Subject: [PATCH] net/bnxt: fix enable/disable VLAN filtering
+[ upstream commit 39b88344e36426bea97cb131fb8ff5b4348e4676 ]
+
There is no condition check for the user requested operation
for VLAN filtering. As a result, VLAN filtering is getting disabled
when the user enables/disables VLAN stripping on same port.
@@ -20,7 +22,6 @@
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Fixes: 6118503d8071 ("net/bnxt: fix VLAN filtering")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -31,10 +32,10 @@
2 files changed, 40 insertions(+), 33 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index a948c78cba..83f475d497 100644
+index b2f30de5bf..517ae3e861 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1860,18 +1860,12 @@ static int bnxt_del_dflt_mac_filter(struct bnxt *bp,
+@@ -1852,18 +1852,12 @@ static int bnxt_del_dflt_mac_filter(struct bnxt *bp,
}
static int
@@ -54,7 +55,7 @@
vnic = BNXT_GET_DEFAULT_VNIC(bp);
if (!(rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)) {
/* Remove any VLAN filters programmed */
-@@ -1895,6 +1889,28 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
+@@ -1887,6 +1881,28 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
PMD_DRV_LOG(DEBUG, "VLAN Filtering: %d\n",
!!(rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER));
@@ -83,15 +84,15 @@
if (mask & ETH_VLAN_STRIP_MASK) {
/* Enable or disable VLAN stripping */
for (i = 0; i < bp->nr_vnics; i++) {
-@@ -1984,7 +2000,6 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
+@@ -1976,7 +1992,6 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
struct bnxt *bp = dev->data->dev_private;
/* Default Filter is tied to VNIC 0 */
- struct bnxt_vnic_info *vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ struct bnxt_vnic_info *vnic = &bp->vnic_info[0];
- struct bnxt_filter_info *filter;
int rc;
rc = is_bnxt_in_error(bp);
-@@ -1997,32 +2012,23 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
+@@ -1989,32 +2004,23 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
if (rte_is_zero_ether_addr(addr))
return -EINVAL;
@@ -139,7 +140,7 @@
static int
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
-index 0c410f8baf..b31f10479e 100644
+index da1a6c24a9..04231b069d 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -39,9 +39,10 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (131 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix enable/disable VLAN filtering' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix max rings calculation' " luca.boccassi
` (55 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b2dca262c8bbdbe69e8755fb56233ed32413de6d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:53 +0530
Subject: [PATCH] net/bnxt: use macro for PCI log format
[ upstream commit 537a053a79196db4999f7d956d00f822e95e9969 ]
Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 517ae3e861..59400f3139 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3517,9 +3517,9 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
if (rc)
return rc;
- PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x\n",
- bp->pdev->addr.domain, bp->pdev->addr.bus,
- bp->pdev->addr.devid, bp->pdev->addr.function);
+ PMD_DRV_LOG(INFO, PCI_PRI_FMT "\n",
+ bp->pdev->addr.domain, bp->pdev->addr.bus,
+ bp->pdev->addr.devid, bp->pdev->addr.function);
rc = bnxt_hwrm_nvm_get_dir_info(bp, &dir_entries, &entry_length);
if (rc != 0)
@@ -3541,10 +3541,10 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x in_eeprom->offset = %d "
- "len = %d\n", bp->pdev->addr.domain,
- bp->pdev->addr.bus, bp->pdev->addr.devid,
- bp->pdev->addr.function, in_eeprom->offset, in_eeprom->length);
+ PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ bp->pdev->addr.domain, bp->pdev->addr.bus,
+ bp->pdev->addr.devid, bp->pdev->addr.function,
+ in_eeprom->offset, in_eeprom->length);
if (in_eeprom->offset == 0) /* special offset value to get directory */
return bnxt_get_nvram_directory(bp, in_eeprom->length,
@@ -3617,10 +3617,10 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x in_eeprom->offset = %d "
- "len = %d\n", bp->pdev->addr.domain,
- bp->pdev->addr.bus, bp->pdev->addr.devid,
- bp->pdev->addr.function, in_eeprom->offset, in_eeprom->length);
+ PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ bp->pdev->addr.domain, bp->pdev->addr.bus,
+ bp->pdev->addr.devid, bp->pdev->addr.function,
+ in_eeprom->offset, in_eeprom->length);
if (!BNXT_PF(bp)) {
PMD_DRV_LOG(ERR, "NVM write not supported from a VF\n");
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.356623509 +0000
+++ 0134-net-bnxt-use-macro-for-PCI-log-format.patch 2020-02-11 11:17:38.644005910 +0000
@@ -1,10 +1,11 @@
-From 537a053a79196db4999f7d956d00f822e95e9969 Mon Sep 17 00:00:00 2001
+From b2dca262c8bbdbe69e8755fb56233ed32413de6d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:53 +0530
Subject: [PATCH] net/bnxt: use macro for PCI log format
+[ upstream commit 537a053a79196db4999f7d956d00f822e95e9969 ]
+
Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -13,10 +14,10 @@
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 26614186f5..ba3f0a7d96 100644
+index 517ae3e861..59400f3139 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -3593,9 +3593,9 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
+@@ -3517,9 +3517,9 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
if (rc)
return rc;
@@ -29,7 +30,7 @@
rc = bnxt_hwrm_nvm_get_dir_info(bp, &dir_entries, &entry_length);
if (rc != 0)
-@@ -3617,10 +3617,10 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
+@@ -3541,10 +3541,10 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
@@ -44,7 +45,7 @@
if (in_eeprom->offset == 0) /* special offset value to get directory */
return bnxt_get_nvram_directory(bp, in_eeprom->length,
-@@ -3693,10 +3693,10 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
+@@ -3617,10 +3617,10 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix max rings calculation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (132 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director flag' " luca.boccassi
` (54 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:55 +0530
Subject: [PATCH] net/bnxt: fix max rings calculation
[ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ]
Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.
Account for stat contexts available(one for each ring) along with
no: of completion rings(one for each ring) to cap the max no: of
Tx /Rx rings that can be possibly created.
Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index c818bede80..ca54c74155 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -619,12 +619,19 @@ struct bnxt {
uint16_t max_tx_rings;
uint16_t max_rx_rings;
#define MAX_STINGRAY_RINGS 128U
-#define BNXT_MAX_RINGS(bp) \
+/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
+#define BNXT_MAX_RX_RINGS(bp) \
(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \
MAX_STINGRAY_RINGS), \
- bp->max_stat_ctx) : \
- RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx))
+ bp->max_stat_ctx / 2U) : \
+ RTE_MIN(bp->max_rx_rings, \
+ bp->max_stat_ctx / 2U))
+#define BNXT_MAX_TX_RINGS(bp) \
+ (RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
+#define BNXT_MAX_RINGS(bp) \
+ (RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \
+ BNXT_MAX_TX_RINGS(bp)))
uint16_t max_nq_rings;
uint16_t max_l2_ctx;
uint16_t max_rx_em_flows;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.387360114 +0000
+++ 0135-net-bnxt-fix-max-rings-calculation.patch 2020-02-11 11:17:38.644005910 +0000
@@ -1,8 +1,10 @@
-From 93eb13bcb6baf5146798c23ef071ab2ae2489a4f Mon Sep 17 00:00:00 2001
+From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:55 +0530
Subject: [PATCH] net/bnxt: fix max rings calculation
+[ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ]
+
Max Tx rings count could be lesser than max Rx rings in some
cases, so take this into account as well.
@@ -11,7 +13,6 @@
Tx /Rx rings that can be possibly created.
Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
-Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -21,10 +22,10 @@
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 3487b917ed..ddb26814ce 100644
+index c818bede80..ca54c74155 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
-@@ -622,12 +622,19 @@ struct bnxt {
+@@ -619,12 +619,19 @@ struct bnxt {
uint16_t max_tx_rings;
uint16_t max_rx_rings;
#define MAX_STINGRAY_RINGS 128U
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix flow director flag' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (133 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix max rings calculation' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow FDIR/switch memory leak' " luca.boccassi
` (53 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Beilei Xing; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From aa021c9de9081352faa7a16988648afac92c1c35 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 21 Jan 2020 19:42:11 +0800
Subject: [PATCH] net/ice: fix flow director flag
[ upstream commit 1f0bc0592ae59d5d809ade9044d886c7c6f6186d ]
If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_fdir.c | 2 +-
drivers/net/ice/base/ice_fdir.h | 1 +
drivers/net/ice/ice_fdir_filter.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 37b3881696..41136d1f0c 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -447,7 +447,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
- fdir_fltr_ctx.fdid_prio = 3;
+ fdir_fltr_ctx.fdid_prio = input->fdid_prio;
fdir_fltr_ctx.desc_prof = 1;
fdir_fltr_ctx.desc_prof_prio = 3;
ice_set_fd_desc_val(&fdir_fltr_ctx, fdesc);
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index db1f8351f9..c811f7606d 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -202,6 +202,7 @@ struct ice_fdir_fltr {
u8 cnt_ena;
u8 fltr_status;
u16 cnt_index;
+ u8 fdid_prio;
u32 fltr_id;
};
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index fa87074556..42b9628630 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1504,6 +1504,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
mark_spec = actions->conf;
filter->input.fltr_id = mark_spec->id;
+ filter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ONE;
break;
case RTE_FLOW_ACTION_TYPE_COUNT:
counter_num++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.415105344 +0000
+++ 0136-net-ice-fix-flow-director-flag.patch 2020-02-11 11:17:38.648005984 +0000
@@ -1,14 +1,15 @@
-From 1f0bc0592ae59d5d809ade9044d886c7c6f6186d Mon Sep 17 00:00:00 2001
+From aa021c9de9081352faa7a16988648afac92c1c35 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 21 Jan 2020 19:42:11 +0800
Subject: [PATCH] net/ice: fix flow director flag
+[ upstream commit 1f0bc0592ae59d5d809ade9044d886c7c6f6186d ]
+
If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
-Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,10 +20,10 @@
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
-index 87fa0afbab..20d64f8612 100644
+index 37b3881696..41136d1f0c 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
-@@ -418,7 +418,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -447,7 +447,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix flow FDIR/switch memory leak' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (134 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director flag' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix VLAN strip flags in SSE Rx' " luca.boccassi
` (52 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Tao Zhu; +Cc: Simei Su, Yahui Cao, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a7c0db7df0db72d2f6acf064a41fdeabd7f7c957 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Thu, 16 Jan 2020 16:38:36 +0000
Subject: [PATCH] net/ice: fix flow FDIR/switch memory leak
[ upstream commit dc36bd5dfdeb0ec9cee7a6140d7ed14734776756 ]
1. Fix ice FDIR and hash flow memory leak.
2. Fix the ice definition of LIST_FOR_EACH_ENTRY_SAFE not
save tmp which cause list deletion incompletely.
Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
Reviewed-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/base/ice_osdep.h | 17 +++++++++++++++--
drivers/net/ice/ice_fdir_filter.c | 12 +++++++-----
drivers/net/ice/ice_hash.c | 12 ++++++------
3 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 27c1830c5e..629acef227 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -343,6 +343,21 @@ static inline void list_add_tail(struct ice_list_entry *entry,
member) : \
0)
+#define LIST_FOR_EACH_ENTRY_SAFE(pos, tmp, head, type, member) \
+ for ((pos) = (head)->lh_first ? \
+ container_of((head)->lh_first, struct type, member) : \
+ 0, \
+ (tmp) = (pos) == 0 ? 0 : ((pos)->member.next.le_next ? \
+ container_of((pos)->member.next.le_next, struct type, \
+ member) : \
+ 0); \
+ (pos); \
+ (pos) = (tmp), \
+ (tmp) = (pos) == 0 ? 0 : ((tmp)->member.next.le_next ? \
+ container_of((pos)->member.next.le_next, struct type, \
+ member) : \
+ 0))
+
#define LIST_REPLACE_INIT(list_head, head) do { \
(head)->lh_first = (list_head)->lh_first; \
INIT_LIST_HEAD(list_head); \
@@ -356,8 +371,6 @@ static inline void list_add_tail(struct ice_list_entry *entry,
#define HLIST_DEL(entry) LIST_DEL(entry)
#define HLIST_FOR_EACH_ENTRY(pos, head, type, member) \
LIST_FOR_EACH_ENTRY(pos, head, type, member)
-#define LIST_FOR_EACH_ENTRY_SAFE(pos, tmp, head, type, member) \
- LIST_FOR_EACH_ENTRY(pos, head, type, member)
#ifndef ICE_DBG_TRACE
#define ICE_DBG_TRACE BIT_ULL(0)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 42b9628630..68af2f2e25 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1939,23 +1939,25 @@ ice_fdir_parse(struct ice_adapter *ad,
ret = ice_fdir_parse_pattern(ad, pattern, error, filter);
if (ret)
- return ret;
+ goto error;
input_set = filter->input_set;
if (!input_set || input_set & ~item->input_set_mask) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
pattern,
"Invalid input set");
- return -rte_errno;
+ ret = -rte_errno;
+ goto error;
}
ret = ice_fdir_parse_action(ad, actions, error, filter);
if (ret)
- return ret;
+ goto error;
*meta = filter;
-
- return 0;
+error:
+ rte_free(item);
+ return ret;
}
static struct ice_flow_parser ice_fdir_parser_os = {
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index b145a3f0d5..d891538bd4 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -409,7 +409,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
void **meta,
struct rte_flow_error *error)
{
- int ret = 0;
+ int ret = -rte_errno;
struct ice_pattern_match_item *pattern_match_item;
struct rss_meta *rss_meta_ptr;
@@ -425,11 +425,11 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
pattern_match_item = ice_search_pattern_match_item(pattern,
array, array_len, error);
if (!pattern_match_item)
- return -rte_errno;
+ goto error;
ret = ice_hash_check_inset(pattern, error);
if (ret)
- return -rte_errno;
+ goto error;
/* Save protocol header to rss_meta. */
*meta = rss_meta_ptr;
@@ -438,12 +438,12 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
/* Check rss action. */
ret = ice_hash_parse_action(pattern_match_item, actions, meta, error);
+error:
if (ret)
- return -rte_errno;
-
+ rte_free(rss_meta_ptr);
rte_free(pattern_match_item);
- return 0;
+ return ret;
}
static int
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.444902256 +0000
+++ 0137-net-ice-fix-flow-FDIR-switch-memory-leak.patch 2020-02-11 11:17:38.648005984 +0000
@@ -1,8 +1,10 @@
-From dc36bd5dfdeb0ec9cee7a6140d7ed14734776756 Mon Sep 17 00:00:00 2001
+From a7c0db7df0db72d2f6acf064a41fdeabd7f7c957 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Thu, 16 Jan 2020 16:38:36 +0000
Subject: [PATCH] net/ice: fix flow FDIR/switch memory leak
+[ upstream commit dc36bd5dfdeb0ec9cee7a6140d7ed14734776756 ]
+
1. Fix ice FDIR and hash flow memory leak.
2. Fix the ice definition of LIST_FOR_EACH_ENTRY_SAFE not
save tmp which cause list deletion incompletely.
@@ -10,7 +12,6 @@
Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
-Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Simei Su <simei.su@intel.com>
@@ -23,10 +24,10 @@
3 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
-index 45b9f36177..a4a2994c76 100644
+index 27c1830c5e..629acef227 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
-@@ -345,6 +345,21 @@ static inline void list_add_tail(struct ice_list_entry *entry,
+@@ -343,6 +343,21 @@ static inline void list_add_tail(struct ice_list_entry *entry,
member) : \
0)
@@ -48,7 +49,7 @@
#define LIST_REPLACE_INIT(list_head, head) do { \
(head)->lh_first = (list_head)->lh_first; \
INIT_LIST_HEAD(list_head); \
-@@ -358,8 +373,6 @@ static inline void list_add_tail(struct ice_list_entry *entry,
+@@ -356,8 +371,6 @@ static inline void list_add_tail(struct ice_list_entry *entry,
#define HLIST_DEL(entry) LIST_DEL(entry)
#define HLIST_FOR_EACH_ENTRY(pos, head, type, member) \
LIST_FOR_EACH_ENTRY(pos, head, type, member)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix VLAN strip flags in SSE Rx' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (135 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow FDIR/switch memory leak' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " luca.boccassi
` (51 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ab9e33077bc7753b843a97080f32bbddeaf3316d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 21 Jan 2020 16:47:33 -0800
Subject: [PATCH] net/bnxt: fix VLAN strip flags in SSE Rx
[ upstream commit 88ba6cac4a646ff479d9dfcc830e0d650fd0d0af ]
When the VLAN is stripped from the packet on receive the
driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
This is done correctly for normal receive in the bnxt driver
but was not being handled correctly in the new SSE code.
Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 22d9f9e84a..31457300a7 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -289,7 +289,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
(RX_PKT_CMPL_METADATA_VID_MASK |
RX_PKT_CMPL_METADATA_DE |
RX_PKT_CMPL_METADATA_PRI_MASK);
- mbuf->ol_flags |= PKT_RX_VLAN;
+ mbuf->ol_flags |=
+ PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
}
bnxt_parse_csum(mbuf, rxcmp1);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.475336510 +0000
+++ 0138-net-bnxt-fix-VLAN-strip-flags-in-SSE-Rx.patch 2020-02-11 11:17:38.652006059 +0000
@@ -1,15 +1,16 @@
-From 88ba6cac4a646ff479d9dfcc830e0d650fd0d0af Mon Sep 17 00:00:00 2001
+From ab9e33077bc7753b843a97080f32bbddeaf3316d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 21 Jan 2020 16:47:33 -0800
Subject: [PATCH] net/bnxt: fix VLAN strip flags in SSE Rx
+[ upstream commit 88ba6cac4a646ff479d9dfcc830e0d650fd0d0af ]
+
When the VLAN is stripped from the packet on receive the
driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
This is done correctly for normal receive in the bnxt driver
but was not being handled correctly in the new SSE code.
Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (136 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix VLAN strip flags in SSE Rx' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " luca.boccassi
` (50 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c4ec740c188c07daa3a50039d3798f9d981fa3b8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:13 -0800
Subject: [PATCH] net/bnxt: do not log error if stats queried before start
[ upstream commit d21e0fcc07cdecaaa177f21941bce5be4d333f67 ]
When using pktgen lots of unnecessary errors are printed
because pktgen queries statistics before device is started.
Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 14d355fd08..20c181dc9b 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -390,10 +390,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
return rc;
memset(bnxt_stats, 0, sizeof(*bnxt_stats));
- if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
- PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+ if (!(bp->flags & BNXT_FLAG_INIT_DONE))
return -EIO;
- }
num_q_stats = RTE_MIN(bp->rx_cp_nr_rings,
(unsigned int)RTE_ETHDEV_QUEUE_STAT_CNTRS);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.503023672 +0000
+++ 0139-net-bnxt-do-not-log-error-if-stats-queried-before-st.patch 2020-02-11 11:17:38.652006059 +0000
@@ -1,13 +1,14 @@
-From d21e0fcc07cdecaaa177f21941bce5be4d333f67 Mon Sep 17 00:00:00 2001
+From c4ec740c188c07daa3a50039d3798f9d981fa3b8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:13 -0800
Subject: [PATCH] net/bnxt: do not log error if stats queried before start
+[ upstream commit d21e0fcc07cdecaaa177f21941bce5be4d333f67 ]
+
When using pktgen lots of unnecessary errors are printed
because pktgen queries statistics before device is started.
Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -16,7 +17,7 @@
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
-index 20a16a629f..65f90e0d85 100644
+index 14d355fd08..20c181dc9b 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -390,10 +390,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (137 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " luca.boccassi
` (49 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5ea9faffd4ff22c60c394b8458689c845e82119d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:14 -0800
Subject: [PATCH] net/bnxt: remove unnecessary memset
[ upstream commit 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f ]
The rte_ethdev layer already zeros statistics before calling
the device.
Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 20c181dc9b..743f2ce94e 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -389,7 +389,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
if (rc)
return rc;
- memset(bnxt_stats, 0, sizeof(*bnxt_stats));
if (!(bp->flags & BNXT_FLAG_INIT_DONE))
return -EIO;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.530329284 +0000
+++ 0140-net-bnxt-remove-unnecessary-memset.patch 2020-02-11 11:17:38.652006059 +0000
@@ -1,13 +1,14 @@
-From 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f Mon Sep 17 00:00:00 2001
+From 5ea9faffd4ff22c60c394b8458689c845e82119d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:14 -0800
Subject: [PATCH] net/bnxt: remove unnecessary memset
+[ upstream commit 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f ]
+
The rte_ethdev layer already zeros statistics before calling
the device.
Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -16,7 +17,7 @@
1 file changed, 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
-index 65f90e0d85..32f112b5ba 100644
+index 20c181dc9b..743f2ce94e 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -389,7 +389,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (138 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director GTP-U pattern' " luca.boccassi
` (48 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6ea30d320353c3d1e047f59847928296db15acce Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 21 Jan 2020 10:12:43 +0800
Subject: [PATCH] net/tap: fix memory leak when unregister intr handler
[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]
The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.
Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/tap/rte_eth_tap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index a13d8d50d7..05470a2115 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1591,8 +1591,11 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
int err;
err = tap_lsc_intr_handle_set(dev, set);
- if (err)
+ if (err < 0) {
+ if (!set)
+ tap_rx_intr_vec_set(dev, 0);
return err;
+ }
err = tap_rx_intr_vec_set(dev, set);
if (err && set)
tap_lsc_intr_handle_set(dev, 0);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.557789119 +0000
+++ 0141-net-tap-fix-memory-leak-when-unregister-intr-handler.patch 2020-02-11 11:17:38.652006059 +0000
@@ -1,14 +1,15 @@
-From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001
+From 6ea30d320353c3d1e047f59847928296db15acce Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 21 Jan 2020 10:12:43 +0800
Subject: [PATCH] net/tap: fix memory leak when unregister intr handler
+[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]
+
The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.
Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")
-Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix flow director GTP-U pattern' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (139 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: add outer IPv4 matching for GTP-U flow' " luca.boccassi
` (47 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 0b525bf3dc1a88d0ca1dcb83d3e56842aa484cb4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 21 Jan 2020 09:30:48 +0800
Subject: [PATCH] net/ice: fix flow director GTP-U pattern
[ upstream commit ab76e2b03d6aba12542e36488723b402e25a02f6 ]
Based on current FDIR implementation for GTP-U, inner specification is
not supported, issue a rule for eth/ipv4/gtpu/ipv4 will also match
eth/ipv4/gtpu/ipv6, the patch adds new pattern list to align with
existed implementation.
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 9 ++++-----
drivers/net/ice/ice_generic_flow.c | 15 +++++++++++++++
drivers/net/ice/ice_generic_flow.h | 2 ++
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 68af2f2e25..2d8cdadf59 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -67,10 +67,10 @@
ICE_FDIR_INSET_VXLAN_IPV4 | \
ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
-#define ICE_FDIR_INSET_GTPU_IPV4 (\
+#define ICE_FDIR_INSET_GTPU (\
ICE_INSET_GTPU_TEID)
-#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\
+#define ICE_FDIR_INSET_GTPU_EH (\
ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
@@ -125,9 +125,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
ICE_FDIR_INSET_VXLAN_IPV4_TCP, ICE_INSET_NONE},
{pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
ICE_FDIR_INSET_VXLAN_IPV4_SCTP, ICE_INSET_NONE},
- {pattern_eth_ipv4_gtpu_ipv4, ICE_FDIR_INSET_GTPU_IPV4, ICE_INSET_NONE},
- {pattern_eth_ipv4_gtpu_eh_ipv4,
- ICE_FDIR_INSET_GTPU_EH_IPV4, ICE_INSET_NONE},
+ {pattern_eth_ipv4_gtpu, ICE_FDIR_INSET_GTPU, ICE_INSET_NONE},
+ {pattern_eth_ipv4_gtpu_eh, ICE_FDIR_INSET_GTPU_EH, ICE_INSET_NONE},
};
static struct ice_flow_parser ice_fdir_parser_os;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index c9efa8356f..38ac799d85 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1034,6 +1034,13 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
};
/* GTPU */
+enum rte_flow_item_type pattern_eth_ipv4_gtpu[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_END,
+};
enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
@@ -1042,6 +1049,14 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
RTE_FLOW_ITEM_TYPE_IPV4,
RTE_FLOW_ITEM_TYPE_END,
};
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[] = {
+ RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_IPV4,
+ RTE_FLOW_ITEM_TYPE_UDP,
+ RTE_FLOW_ITEM_TYPE_GTPU,
+ RTE_FLOW_ITEM_TYPE_GTP_PSC,
+ RTE_FLOW_ITEM_TYPE_END,
+};
enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = {
RTE_FLOW_ITEM_TYPE_ETH,
RTE_FLOW_ITEM_TYPE_IPV4,
diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h
index ac085b47fa..adc30ee2aa 100644
--- a/drivers/net/ice/ice_generic_flow.h
+++ b/drivers/net/ice/ice_generic_flow.h
@@ -336,7 +336,9 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_sctp[];
extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[];
/* GTPU */
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu[];
extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh[];
extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[];
extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.587303681 +0000
+++ 0142-net-ice-fix-flow-director-GTP-U-pattern.patch 2020-02-11 11:17:38.656006134 +0000
@@ -1,15 +1,16 @@
-From ab76e2b03d6aba12542e36488723b402e25a02f6 Mon Sep 17 00:00:00 2001
+From 0b525bf3dc1a88d0ca1dcb83d3e56842aa484cb4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 21 Jan 2020 09:30:48 +0800
Subject: [PATCH] net/ice: fix flow director GTP-U pattern
+[ upstream commit ab76e2b03d6aba12542e36488723b402e25a02f6 ]
+
Based on current FDIR implementation for GTP-U, inner specification is
not supported, issue a rule for eth/ipv4/gtpu/ipv4 will also match
eth/ipv4/gtpu/ipv6, the patch adds new pattern list to align with
existed implementation.
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
-Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: add outer IPv4 matching for GTP-U flow' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (140 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director GTP-U pattern' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix masks of encap and decap actions' " luca.boccassi
` (46 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Chenmin Sun; +Cc: Qi Zhang, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 385898db6780b6b236319d660fcccaaeac9a122b Mon Sep 17 00:00:00 2001
From: Chenmin Sun <chenmin.sun@intel.com>
Date: Tue, 21 Jan 2020 19:56:53 +0800
Subject: [PATCH] net/ice: add outer IPv4 matching for GTP-U flow
[ upstream commit 1bfc89ec1e47e0f91a62ed8f9465e020c3732bba ]
This patch adds the capability of matching the outer IPv4
headers for GTPU flows.
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/base/ice_fdir.c | 4 ++++
drivers/net/ice/ice_fdir_filter.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 41136d1f0c..551c7a6bc6 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -786,6 +786,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
+ ice_pkt_insert_u32(loc, ICE_IPV4_SRC_ADDR_OFFSET,
+ input->ip.v4.src_ip);
+ ice_pkt_insert_u32(loc, ICE_IPV4_DST_ADDR_OFFSET,
+ input->ip.v4.dst_ip);
ice_pkt_insert_u32(loc, ICE_IPV4_GTPU_TEID_OFFSET,
input->gtpu_data.teid);
ice_pkt_insert_u6_qfi(loc, ICE_IPV4_GTPU_QFI_OFFSET,
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 2d8cdadf59..79e4d2edf8 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -68,9 +68,10 @@
ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
#define ICE_FDIR_INSET_GTPU (\
- ICE_INSET_GTPU_TEID)
+ ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID)
#define ICE_FDIR_INSET_GTPU_EH (\
+ ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \
ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.617111104 +0000
+++ 0143-net-ice-add-outer-IPv4-matching-for-GTP-U-flow.patch 2020-02-11 11:17:38.656006134 +0000
@@ -1,13 +1,14 @@
-From 1bfc89ec1e47e0f91a62ed8f9465e020c3732bba Mon Sep 17 00:00:00 2001
+From 385898db6780b6b236319d660fcccaaeac9a122b Mon Sep 17 00:00:00 2001
From: Chenmin Sun <chenmin.sun@intel.com>
Date: Tue, 21 Jan 2020 19:56:53 +0800
Subject: [PATCH] net/ice: add outer IPv4 matching for GTP-U flow
+[ upstream commit 1bfc89ec1e47e0f91a62ed8f9465e020c3732bba ]
+
This patch adds the capability of matching the outer IPv4
headers for GTPU flows.
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
-Cc: stable@dpdk.org
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -18,10 +19,10 @@
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
-index 20d64f8612..56c1c1c845 100644
+index 41136d1f0c..551c7a6bc6 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
-@@ -804,6 +804,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -786,6 +786,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix masks of encap and decap actions' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (141 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: add outer IPv4 matching for GTP-U flow' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix check for VLAN " luca.boccassi
` (45 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 99840fa1b3e0639a6036cfece0721b8b379c99bc Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:13 +0200
Subject: [PATCH] net/mlx5: fix masks of encap and decap actions
[ upstream commit 06742ada54dd961bd2d03f95a18c38d68a231355 ]
PUSH_VLAN and POP_VLAN actions flags were added to ENCAP_ACTIONS
and DECAP_ACTIONS bit masks, respectively.
This is incorrect, because VLAN actions are considered as 'modify
header' actions, not as 'packet reformat' actions.
This patch removes the PUSH_VLAN and POP_VLAN actions flags from
ENCAP_ACTIONS and DECAP_ACTIONS bit masks.
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 13bed08d75..1213b21426 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -213,13 +213,11 @@ enum mlx5_feature_name {
#define MLX5_FLOW_ENCAP_ACTIONS (MLX5_FLOW_ACTION_VXLAN_ENCAP | \
MLX5_FLOW_ACTION_NVGRE_ENCAP | \
- MLX5_FLOW_ACTION_RAW_ENCAP | \
- MLX5_FLOW_ACTION_OF_PUSH_VLAN)
+ MLX5_FLOW_ACTION_RAW_ENCAP)
#define MLX5_FLOW_DECAP_ACTIONS (MLX5_FLOW_ACTION_VXLAN_DECAP | \
MLX5_FLOW_ACTION_NVGRE_DECAP | \
- MLX5_FLOW_ACTION_RAW_DECAP | \
- MLX5_FLOW_ACTION_OF_POP_VLAN)
+ MLX5_FLOW_ACTION_RAW_DECAP)
#define MLX5_FLOW_MODIFY_HDR_ACTIONS (MLX5_FLOW_ACTION_SET_IPV4_SRC | \
MLX5_FLOW_ACTION_SET_IPV4_DST | \
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.647251202 +0000
+++ 0144-net-mlx5-fix-masks-of-encap-and-decap-actions.patch 2020-02-11 11:17:38.660006209 +0000
@@ -1,8 +1,10 @@
-From 06742ada54dd961bd2d03f95a18c38d68a231355 Mon Sep 17 00:00:00 2001
+From 99840fa1b3e0639a6036cfece0721b8b379c99bc Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:13 +0200
Subject: [PATCH] net/mlx5: fix masks of encap and decap actions
+[ upstream commit 06742ada54dd961bd2d03f95a18c38d68a231355 ]
+
PUSH_VLAN and POP_VLAN actions flags were added to ENCAP_ACTIONS
and DECAP_ACTIONS bit masks, respectively.
This is incorrect, because VLAN actions are considered as 'modify
@@ -13,7 +15,6 @@
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -23,10 +24,10 @@
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index 9832542328..f771cac42e 100644
+index 13bed08d75..1213b21426 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -212,13 +212,11 @@ enum mlx5_feature_name {
+@@ -213,13 +213,11 @@ enum mlx5_feature_name {
#define MLX5_FLOW_ENCAP_ACTIONS (MLX5_FLOW_ACTION_VXLAN_ENCAP | \
MLX5_FLOW_ACTION_NVGRE_ENCAP | \
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix check for VLAN actions' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (142 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix masks of encap and decap actions' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix bit mask to validate push VLAN' " luca.boccassi
` (44 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e6797a244f6c5796f8e1f6ddd2843cd8ea08449b Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:14 +0200
Subject: [PATCH] net/mlx5: fix check for VLAN actions
[ upstream commit a2268a4cfb08e70e3f0f0a082033ad5a24a2a07d ]
Flow validation function includes, after all items and actions are
validated discretely, a check for VLAN and VXLAN actions.
This check is incorrect and redundant.
This patch removes the invalid check from validation function.
Check is incorrect, action_flags bit map is checked against
items mask MLX5_FLOW_LAYER_TUNNEL.
Check is also redundant, because VLAN push/pop actions can be used
together with packet reformat actions.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 74d1a68e4a..8a5aea0603 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4830,13 +4830,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
"action not supported");
}
}
- if ((action_flags & MLX5_FLOW_LAYER_TUNNEL) &&
- (action_flags & MLX5_FLOW_VLAN_ACTIONS))
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ACTION,
- actions,
- "can't have vxlan and vlan"
- " actions in the same rule");
/* Eswitch has few restrictions on using items and actions */
if (attr->transfer) {
if (!mlx5_flow_ext_mreg_supported(dev) &&
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.675021628 +0000
+++ 0145-net-mlx5-fix-check-for-VLAN-actions.patch 2020-02-11 11:17:38.664006283 +0000
@@ -1,8 +1,10 @@
-From a2268a4cfb08e70e3f0f0a082033ad5a24a2a07d Mon Sep 17 00:00:00 2001
+From e6797a244f6c5796f8e1f6ddd2843cd8ea08449b Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:14 +0200
Subject: [PATCH] net/mlx5: fix check for VLAN actions
+[ upstream commit a2268a4cfb08e70e3f0f0a082033ad5a24a2a07d ]
+
Flow validation function includes, after all items and actions are
validated discretely, a check for VLAN and VXLAN actions.
This check is incorrect and redundant.
@@ -14,7 +16,6 @@
together with packet reformat actions.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -24,10 +25,10 @@
1 file changed, 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 5a1b42698c..afa3d0e1ce 100644
+index 74d1a68e4a..8a5aea0603 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5060,13 +5060,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4830,13 +4830,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
"action not supported");
}
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix bit mask to validate push VLAN' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (143 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix check for VLAN " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: allow push VLAN without VID' " luca.boccassi
` (43 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4808455f2a4652a52e32526e4c251c88843535d2 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:15 +0200
Subject: [PATCH] net/mlx5: fix bit mask to validate push VLAN
[ upstream commit 82e4aca2caa011c85911615dc38e17da86c5a184 ]
Validation function of 'push VLAN' action uses (POP_VLAN or PUSH_VLAN)
actions flags, instead of using a mask of both flags.
This patch replaces it to use existing VLAN_ACTIONS mask.
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8a5aea0603..155e12b534 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1617,8 +1617,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"invalid vlan ethertype");
- if (action_flags &
- (MLX5_FLOW_ACTION_OF_POP_VLAN | MLX5_FLOW_ACTION_OF_PUSH_VLAN))
+ if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"no support for multiple VLAN "
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.710337999 +0000
+++ 0146-net-mlx5-fix-bit-mask-to-validate-push-VLAN.patch 2020-02-11 11:17:38.672006433 +0000
@@ -1,15 +1,16 @@
-From 82e4aca2caa011c85911615dc38e17da86c5a184 Mon Sep 17 00:00:00 2001
+From 4808455f2a4652a52e32526e4c251c88843535d2 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:15 +0200
Subject: [PATCH] net/mlx5: fix bit mask to validate push VLAN
+[ upstream commit 82e4aca2caa011c85911615dc38e17da86c5a184 ]
+
Validation function of 'push VLAN' action uses (POP_VLAN or PUSH_VLAN)
actions flags, instead of using a mask of both flags.
This patch replaces it to use existing VLAN_ACTIONS mask.
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -19,10 +20,10 @@
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index afa3d0e1ce..d7176c80ef 100644
+index 8a5aea0603..155e12b534 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1746,8 +1746,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
+@@ -1617,8 +1617,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"invalid vlan ethertype");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: allow push VLAN without VID' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (144 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix bit mask to validate push VLAN' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block push VLAN action on Rx' " luca.boccassi
` (42 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c4a6f4dae99202dd1d7ada3646799c1d45985b8c Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:16 +0200
Subject: [PATCH] net/mlx5: allow push VLAN without VID
[ upstream commit 5507cb79279d03d196133bcc26feace49e8e1fab ]
Currently the push VLAN action requires a VID value, either from
existing VLAN item, or from following 'set VLAN vid' action.
This patch removes this limitation, allowing a push VLAN action with
vid value 0.
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 155e12b534..7aedfa903b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1605,7 +1605,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
*/
static int
flow_dv_validate_action_push_vlan(uint64_t action_flags,
- uint64_t item_flags,
+ uint64_t item_flags __rte_unused,
const struct rte_flow_action *action,
const struct rte_flow_attr *attr,
struct rte_flow_error *error)
@@ -1622,14 +1622,6 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"no support for multiple VLAN "
"actions");
- if (!mlx5_flow_find_action
- (action + 1, RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID) &&
- !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ACTION, action,
- "push VLAN needs to match on VLAN in order to "
- "get VLAN VID information because there is "
- "no followed set VLAN VID action");
if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.744873421 +0000
+++ 0147-net-mlx5-allow-push-VLAN-without-VID.patch 2020-02-11 11:17:38.680006583 +0000
@@ -1,8 +1,10 @@
-From 5507cb79279d03d196133bcc26feace49e8e1fab Mon Sep 17 00:00:00 2001
+From c4a6f4dae99202dd1d7ada3646799c1d45985b8c Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:16 +0200
Subject: [PATCH] net/mlx5: allow push VLAN without VID
+[ upstream commit 5507cb79279d03d196133bcc26feace49e8e1fab ]
+
Currently the push VLAN action requires a VID value, either from
existing VLAN item, or from following 'set VLAN vid' action.
@@ -10,7 +12,6 @@
vid value 0.
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -20,10 +21,10 @@
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index d7176c80ef..59ece01089 100644
+index 155e12b534..7aedfa903b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1734,7 +1734,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1605,7 +1605,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
*/
static int
flow_dv_validate_action_push_vlan(uint64_t action_flags,
@@ -32,7 +33,7 @@
const struct rte_flow_action *action,
const struct rte_flow_attr *attr,
struct rte_flow_error *error)
-@@ -1751,14 +1751,6 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
+@@ -1622,14 +1622,6 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"no support for multiple VLAN "
"actions");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: block push VLAN action on Rx' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (145 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: allow push VLAN without VID' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block pop VLAN action on Tx' " luca.boccassi
` (41 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 155b81d550e03c0fd785083d6e959887d2c882f0 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:18 +0200
Subject: [PATCH] net/mlx5: block push VLAN action on Rx
[ upstream commit 55060e62e4d2802b963fb00a45efc31ae1f8aca0 ]
Add missing check in validation function of 'push VLAN' action.
Action is not allowed for ingress flow rules.
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7aedfa903b..c189a4d919 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1612,6 +1612,12 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
{
const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
+ if (attr->ingress)
+ return rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
+ NULL,
+ "push VLAN action not supported for "
+ "ingress");
if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) &&
push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_QINQ))
return rte_flow_error_set(error, EINVAL,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.779025848 +0000
+++ 0148-net-mlx5-block-push-VLAN-action-on-Rx.patch 2020-02-11 11:17:38.684006657 +0000
@@ -1,13 +1,14 @@
-From 55060e62e4d2802b963fb00a45efc31ae1f8aca0 Mon Sep 17 00:00:00 2001
+From 155b81d550e03c0fd785083d6e959887d2c882f0 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:18 +0200
Subject: [PATCH] net/mlx5: block push VLAN action on Rx
+[ upstream commit 55060e62e4d2802b963fb00a45efc31ae1f8aca0 ]
+
Add missing check in validation function of 'push VLAN' action.
Action is not allowed for ingress flow rules.
Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -17,10 +18,10 @@
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index b0d5688b29..1ed677ff21 100644
+index 7aedfa903b..c189a4d919 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1741,6 +1741,12 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
+@@ -1612,6 +1612,12 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
{
const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: block pop VLAN action on Tx' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (146 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block push VLAN action on Rx' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix pop VLAN action validation' " luca.boccassi
` (40 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1e752a0e282a4fd5d20fe6f77dde0b27e7fea2ce Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:19 +0200
Subject: [PATCH] net/mlx5: block pop VLAN action on Tx
[ upstream commit 159e9217a5cfd2949aceab6a7fe0516d8fce5ba5 ]
Add missing check in validation function of 'pop VLAN' action.
Action is not allowed for egress flow rules.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index c189a4d919..a7f5e0b4ad 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1505,6 +1505,12 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
"pop vlan action is not supported");
+ if (attr->egress)
+ return rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
+ NULL,
+ "pop vlan action not supported for "
+ "egress");
/*
* Check for inconsistencies:
* fail strip_vlan in a flow that matches packets without VLAN tags.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.813465278 +0000
+++ 0149-net-mlx5-block-pop-VLAN-action-on-Tx.patch 2020-02-11 11:17:38.692006807 +0000
@@ -1,13 +1,14 @@
-From 159e9217a5cfd2949aceab6a7fe0516d8fce5ba5 Mon Sep 17 00:00:00 2001
+From 1e752a0e282a4fd5d20fe6f77dde0b27e7fea2ce Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:19 +0200
Subject: [PATCH] net/mlx5: block pop VLAN action on Tx
+[ upstream commit 159e9217a5cfd2949aceab6a7fe0516d8fce5ba5 ]
+
Add missing check in validation function of 'pop VLAN' action.
Action is not allowed for egress flow rules.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -17,10 +18,10 @@
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 1ed677ff21..9dc08cec97 100644
+index c189a4d919..a7f5e0b4ad 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1634,6 +1634,12 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1505,6 +1505,12 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
"pop vlan action is not supported");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix pop VLAN action validation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (147 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block pop VLAN action on Tx' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VLAN VID " luca.boccassi
` (39 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e359cab358b59c149adc4a2fb642e1e76c94014f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:20 +0200
Subject: [PATCH] net/mlx5: fix pop VLAN action validation
[ upstream commit 581476d6417f02d1713853a728e44777d36ae551 ]
Validation function of 'POP VLAN' action includes check for other
'POP VLAN' actions present in flow.
It doesn't check for 'PUSH VLAN' actions present in flow.
This patch adds check for 'PUSH VLAN' actions present in flow.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a7f5e0b4ad..db86623651 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1511,17 +1511,10 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
NULL,
"pop vlan action not supported for "
"egress");
- /*
- * Check for inconsistencies:
- * fail strip_vlan in a flow that matches packets without VLAN tags.
- * fail strip_vlan in a flow that matches packets without explicitly a
- * matching on VLAN tag ?
- */
- if (action_flags & MLX5_FLOW_ACTION_OF_POP_VLAN)
+ if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
- NULL,
- "no support for multiple vlan pop "
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "no support for multiple VLAN "
"actions");
if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
return rte_flow_error_set(error, ENOTSUP,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.847965409 +0000
+++ 0150-net-mlx5-fix-pop-VLAN-action-validation.patch 2020-02-11 11:17:38.700006956 +0000
@@ -1,8 +1,10 @@
-From 581476d6417f02d1713853a728e44777d36ae551 Mon Sep 17 00:00:00 2001
+From e359cab358b59c149adc4a2fb642e1e76c94014f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:20 +0200
Subject: [PATCH] net/mlx5: fix pop VLAN action validation
+[ upstream commit 581476d6417f02d1713853a728e44777d36ae551 ]
+
Validation function of 'POP VLAN' action includes check for other
'POP VLAN' actions present in flow.
It doesn't check for 'PUSH VLAN' actions present in flow.
@@ -10,7 +12,6 @@
This patch adds check for 'PUSH VLAN' actions present in flow.
Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -20,10 +21,10 @@
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 9dc08cec97..de4b765a0e 100644
+index a7f5e0b4ad..db86623651 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1640,17 +1640,10 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1511,17 +1511,10 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
NULL,
"pop vlan action not supported for "
"egress");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VLAN VID action validation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (148 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix pop VLAN action validation' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix build with clang 3.4.2' " luca.boccassi
` (38 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 31cb74256a053f75499408ab5b9f2a3f34c10955 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:21 +0200
Subject: [PATCH] net/mlx5: fix VLAN VID action validation
[ upstream commit 5a2ab34d81c2bd07539ae7cb5167498617909d42 ]
Validation function of 'set VLAN VID' action checks twice for existing
same action in flow rule.
This patch updates the validation function logic, to check the same
restrictions more efficiently.
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index db86623651..8a9a872ac6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1686,10 +1686,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
*
* @param[in] item_flags
* Holds the items detected in this rule.
+ * @param[in] action_flags
+ * Holds the actions detected until now.
* @param[in] actions
* Pointer to the list of actions remaining in the flow rule.
- * @param[in] attr
- * Pointer to flow attributes
* @param[out] error
* Pointer to error structure.
*
@@ -1709,33 +1709,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"VLAN VID value is too big");
- /* there is an of_push_vlan action before us */
- if (action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN) {
- if (mlx5_flow_find_action(actions + 1,
- RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID))
- return rte_flow_error_set(error, ENOTSUP,
- RTE_FLOW_ERROR_TYPE_ACTION, action,
- "Multiple VLAN VID modifications are "
- "not supported");
- else
- return 0;
- }
-
- /*
- * Action is on an existing VLAN header:
- * Need to verify this is a single modify CID action.
- * Rule mast include a match on outer VLAN.
- */
+ if (!(action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN) &&
+ !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
+ return rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ACTION, action,
+ "set VLAN VID action must follow push"
+ " VLAN action or match on VLAN item");
if (action_flags & MLX5_FLOW_ACTION_OF_SET_VLAN_VID)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"Multiple VLAN VID modifications are "
"not supported");
- if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION, action,
- "match on VLAN is required in order "
- "to set VLAN VID");
if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.882599399 +0000
+++ 0151-net-mlx5-fix-VLAN-VID-action-validation.patch 2020-02-11 11:17:38.708007106 +0000
@@ -1,8 +1,10 @@
-From 5a2ab34d81c2bd07539ae7cb5167498617909d42 Mon Sep 17 00:00:00 2001
+From 31cb74256a053f75499408ab5b9f2a3f34c10955 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 16:27:21 +0200
Subject: [PATCH] net/mlx5: fix VLAN VID action validation
+[ upstream commit 5a2ab34d81c2bd07539ae7cb5167498617909d42 ]
+
Validation function of 'set VLAN VID' action checks twice for existing
same action in flow rule.
@@ -11,7 +13,6 @@
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -21,10 +22,10 @@
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index de4b765a0e..4b6a92c83c 100644
+index db86623651..8a9a872ac6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1815,10 +1815,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
+@@ -1686,10 +1686,10 @@ flow_dv_validate_action_set_vlan_pcp(uint64_t action_flags,
*
* @param[in] item_flags
* Holds the items detected in this rule.
@@ -37,7 +38,7 @@
* @param[out] error
* Pointer to error structure.
*
-@@ -1838,33 +1838,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
+@@ -1709,33 +1709,17 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, action,
"VLAN VID value is too big");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix build with clang 3.4.2' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (149 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VLAN VID " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix zero out UDP checksum in encap data' " luca.boccassi
` (37 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Matan Azrad; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3fb7f5d152739852a8e1d0919df0c9576f61e059 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 22 Jan 2020 14:36:10 +0000
Subject: [PATCH] net/mlx5: fix build with clang 3.4.2
[ upstream commit 99d49f47b38e9caee4886797f6c6db5e4023b213 ]
Compilation massage example:
"dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of
unsigned enum expression < 0 is always false
[-Werror,-Wtautological-compare]
if (reg < 0)
~~~ ^ ~
"
enum modify_reg holds only non-negative integers and in some places in
the code it was used to be compared with negative value, hence
compilation was failed.
Change all thus places to use integer instead of enum modify_reg.
Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
drivers/net/mlx5/mlx5_flow.h | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e4c661d7ca..a18cdb918a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -336,7 +336,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = {
* The request register on success, a negative errno
* value otherwise and rte_errno is set.
*/
-enum modify_reg
+int
mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
enum mlx5_feature_name feature,
uint32_t id,
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 1213b21426..6eccd441d5 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -759,7 +759,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel,
uint64_t hash_fields);
uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
uint32_t subpriority);
-enum modify_reg mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
+int mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
enum mlx5_feature_name feature,
uint32_t id,
struct rte_flow_error *error);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8a9a872ac6..3fa34f5e8c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1074,7 +1074,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
{4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */
{0, 0, 0},
};
- enum modify_reg reg;
+ int reg;
if (!mask)
return rte_flow_error_set(error, EINVAL,
@@ -1116,7 +1116,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev,
const struct rte_flow_attr *attr,
struct rte_flow_error *error)
{
- enum modify_reg reg =
+ int reg =
mlx5_flow_get_reg_id(dev, attr->transfer ?
MLX5_METADATA_FDB :
attr->egress ?
@@ -1164,7 +1164,7 @@ flow_dv_convert_action_set_meta
struct field_modify_info reg_c_x[] = {
[1] = {0, 0, 0},
};
- enum modify_reg reg = flow_dv_get_metadata_reg(dev, attr, error);
+ int reg = flow_dv_get_metadata_reg(dev, attr, error);
if (reg < 0)
return reg;
@@ -1291,7 +1291,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
struct rte_flow_item_meta nic_mask = {
.data = UINT32_MAX
};
- enum modify_reg reg;
+ int reg;
int ret;
if (!spec)
@@ -1887,7 +1887,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
{
const struct rte_flow_action_set_meta *conf;
uint32_t nic_mask = UINT32_MAX;
- enum modify_reg reg;
+ int reg;
if (!mlx5_flow_ext_mreg_supported(dev))
return rte_flow_error_set(error, ENOTSUP,
@@ -5867,7 +5867,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
meta_m = &rte_flow_item_meta_mask;
meta_v = (const void *)item->spec;
if (meta_v) {
- enum modify_reg reg;
+ int reg;
uint32_t value = meta_v->data;
uint32_t mask = meta_m->data;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.916498403 +0000
+++ 0152-net-mlx5-fix-build-with-clang-3.4.2.patch 2020-02-11 11:17:38.720007330 +0000
@@ -1,8 +1,10 @@
-From 99d49f47b38e9caee4886797f6c6db5e4023b213 Mon Sep 17 00:00:00 2001
+From 3fb7f5d152739852a8e1d0919df0c9576f61e059 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 22 Jan 2020 14:36:10 +0000
Subject: [PATCH] net/mlx5: fix build with clang 3.4.2
+[ upstream commit 99d49f47b38e9caee4886797f6c6db5e4023b213 ]
+
Compilation massage example:
"dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of
unsigned enum expression < 0 is always false
@@ -19,7 +21,6 @@
Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
@@ -29,10 +30,10 @@
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 7738cb2499..36bbb49dcb 100644
+index e4c661d7ca..a18cdb918a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -341,7 +341,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = {
+@@ -336,7 +336,7 @@ static struct mlx5_flow_tunnel_info tunnels_info[] = {
* The request register on success, a negative errno
* value otherwise and rte_errno is set.
*/
@@ -42,10 +43,10 @@
enum mlx5_feature_name feature,
uint32_t id,
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index f771cac42e..aaacf5c255 100644
+index 1213b21426..6eccd441d5 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -760,7 +760,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel,
+@@ -759,7 +759,7 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel,
uint64_t hash_fields);
uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
uint32_t subpriority);
@@ -55,10 +56,10 @@
uint32_t id,
struct rte_flow_error *error);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 059d03f6f6..fc156a348f 100644
+index 8a9a872ac6..3fa34f5e8c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1077,7 +1077,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
+@@ -1074,7 +1074,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
{4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */
{0, 0, 0},
};
@@ -67,7 +68,7 @@
if (!mask)
return rte_flow_error_set(error, EINVAL,
-@@ -1119,7 +1119,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev,
+@@ -1116,7 +1116,7 @@ flow_dv_get_metadata_reg(struct rte_eth_dev *dev,
const struct rte_flow_attr *attr,
struct rte_flow_error *error)
{
@@ -76,7 +77,7 @@
mlx5_flow_get_reg_id(dev, attr->transfer ?
MLX5_METADATA_FDB :
attr->egress ?
-@@ -1167,7 +1167,7 @@ flow_dv_convert_action_set_meta
+@@ -1164,7 +1164,7 @@ flow_dv_convert_action_set_meta
struct field_modify_info reg_c_x[] = {
[1] = {0, 0, 0},
};
@@ -85,7 +86,7 @@
if (reg < 0)
return reg;
-@@ -1370,7 +1370,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1291,7 +1291,7 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
struct rte_flow_item_meta nic_mask = {
.data = UINT32_MAX
};
@@ -94,7 +95,7 @@
int ret;
if (!spec)
-@@ -2004,7 +2004,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
+@@ -1887,7 +1887,7 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
{
const struct rte_flow_action_set_meta *conf;
uint32_t nic_mask = UINT32_MAX;
@@ -103,7 +104,7 @@
if (!mlx5_flow_ext_mreg_supported(dev))
return rte_flow_error_set(error, ENOTSUP,
-@@ -6081,7 +6081,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
+@@ -5867,7 +5867,7 @@ flow_dv_translate_item_meta(struct rte_eth_dev *dev,
meta_m = &rte_flow_item_meta_mask;
meta_v = (const void *)item->spec;
if (meta_v) {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix zero out UDP checksum in encap data' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (150 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix build with clang 3.4.2' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix setting of port ID for egress rules' " luca.boccassi
` (36 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Eli Britstein; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bca9bb5550c52b1e3f69c92bd2561b44e0225d49 Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@mellanox.com>
Date: Wed, 22 Jan 2020 15:03:58 +0000
Subject: [PATCH] net/mlx5: fix zero out UDP checksum in encap data
[ upstream commit 27767e217f8a7a9333967ddf5f98abe7943393aa ]
The cited commit zeroed the UDP checksum for raw-encap case.
Add the same handling for vxlan-encap case.
Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3fa34f5e8c..0079d4a8c7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2782,8 +2782,6 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
(const struct rte_flow_action_raw_encap *)action->conf;
res.size = raw_encap_data->size;
memcpy(res.buf, raw_encap_data->data, res.size);
- if (flow_dv_zero_encap_udp_csum(res.buf, error))
- return -rte_errno;
} else {
if (action->type == RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP)
encap_data =
@@ -2797,6 +2795,8 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
&res.size, error))
return -rte_errno;
}
+ if (flow_dv_zero_encap_udp_csum(res.buf, error))
+ return -rte_errno;
if (flow_dv_encap_decap_resource_register(dev, &res, dev_flow, error))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.957294736 +0000
+++ 0153-net-mlx5-fix-zero-out-UDP-checksum-in-encap-data.patch 2020-02-11 11:17:38.728007480 +0000
@@ -1,13 +1,14 @@
-From 27767e217f8a7a9333967ddf5f98abe7943393aa Mon Sep 17 00:00:00 2001
+From bca9bb5550c52b1e3f69c92bd2561b44e0225d49 Mon Sep 17 00:00:00 2001
From: Eli Britstein <elibr@mellanox.com>
Date: Wed, 22 Jan 2020 15:03:58 +0000
Subject: [PATCH] net/mlx5: fix zero out UDP checksum in encap data
+[ upstream commit 27767e217f8a7a9333967ddf5f98abe7943393aa ]
+
The cited commit zeroed the UDP checksum for raw-encap case.
Add the same handling for vxlan-encap case.
Fixes: bf1d7d9a033a ("net/mlx5: zero out UDP checksum in encapsulation")
-Cc: stable@dpdk.org
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -16,10 +17,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index fc156a348f..a32f0be803 100644
+index 3fa34f5e8c..0079d4a8c7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -2883,8 +2883,6 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
+@@ -2782,8 +2782,6 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
(const struct rte_flow_action_raw_encap *)action->conf;
res.size = raw_encap_data->size;
memcpy(res.buf, raw_encap_data->data, res.size);
@@ -28,7 +29,7 @@
} else {
if (action->type == RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP)
encap_data =
-@@ -2898,6 +2896,8 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
+@@ -2797,6 +2795,8 @@ flow_dv_create_action_l2_encap(struct rte_eth_dev *dev,
&res.size, error))
return -rte_errno;
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix setting of port ID for egress rules' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (151 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix zero out UDP checksum in encap data' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite actions' " luca.boccassi
` (35 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Dekel Peled; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 767de68c9021ecdda8df11b5c787d8fdc74c377c Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 14:33:06 +0200
Subject: [PATCH] net/mlx5: fix setting of port ID for egress rules
[ upstream commit 813f9bfa12c93737472f0eefe0e1a7d30502e532 ]
Previous patch fixed the setting of port-id for eswitch rules, which
are ingress only.
This patch expands the fix, to support NIC rules as well, which can
be ingress or egress.
Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0079d4a8c7..6aedb3c0bc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7271,13 +7271,13 @@ cnt_err:
item_flags |= last_item;
}
/*
- * In case of ingress traffic when E-Switch mode is enabled,
- * we have two cases where we need to set the source port manually.
+ * When E-Switch mode is enabled, we have two cases where we need to
+ * set the source port manually.
* The first one, is in case of Nic steering rule, and the second is
* E-Switch rule where no port_id item was found. In both cases
* the source port is set according the current port in use.
*/
- if ((attr->ingress && !(item_flags & MLX5_FLOW_ITEM_PORT_ID)) &&
+ if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) &&
(priv->representor || priv->master)) {
if (flow_dv_translate_item_port_id(dev, match_mask,
match_value, NULL))
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:43.991461464 +0000
+++ 0154-net-mlx5-fix-setting-of-port-ID-for-egress-rules.patch 2020-02-11 11:17:38.736007630 +0000
@@ -1,15 +1,16 @@
-From 813f9bfa12c93737472f0eefe0e1a7d30502e532 Mon Sep 17 00:00:00 2001
+From 767de68c9021ecdda8df11b5c787d8fdc74c377c Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 22 Jan 2020 14:33:06 +0200
Subject: [PATCH] net/mlx5: fix setting of port ID for egress rules
+[ upstream commit 813f9bfa12c93737472f0eefe0e1a7d30502e532 ]
+
Previous patch fixed the setting of port-id for eswitch rules, which
are ingress only.
This patch expands the fix, to support NIC rules as well, which can
be ingress or egress.
Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -18,10 +19,10 @@
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index a32f0be803..c2900c5d0d 100644
+index 0079d4a8c7..6aedb3c0bc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -7602,13 +7602,13 @@ cnt_err:
+@@ -7271,13 +7271,13 @@ cnt_err:
item_flags |= last_item;
}
/*
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite actions' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (152 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix setting of port ID for egress rules' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix RFC addresses for Tx only' " luca.boccassi
` (34 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Shiri Kuzin; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f312d00e87545dad43a07beeec6ab4327f61a7c0 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Wed, 22 Jan 2020 14:37:54 +0000
Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite actions
[ upstream commit 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 ]
The ConnectX-5 HW cannot calculate the checksum for ICMPv6,
therefore flows with pattern 'ipv6 proto is 58' with actions that change
the header should be rejected. the actions that change the header
in this type of flow are 'set_ipv6_src' and 'set_ipv6_dst'.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6aedb3c0bc..295627fab3 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4233,6 +4233,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
uint8_t next_protocol = 0xff;
uint16_t ether_type = 0;
int actions_n = 0;
+ uint8_t item_ipv6_proto = 0;
const struct rte_flow_item *gre_item = NULL;
struct rte_flow_item_tcp nic_tcp_mask = {
.hdr = {
@@ -4340,6 +4341,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
if (items->mask != NULL &&
((const struct rte_flow_item_ipv6 *)
items->mask)->hdr.proto) {
+ item_ipv6_proto =
+ ((const struct rte_flow_item_ipv6 *)
+ items->spec)->hdr.proto;
next_protocol =
((const struct rte_flow_item_ipv6 *)
items->spec)->hdr.proto;
@@ -4705,6 +4709,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
+ if (item_ipv6_proto == IPPROTO_ICMPV6)
+ return rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ actions,
+ "Can't change header "
+ "with ICMPv6 proto");
/* Count all modify-header actions as one action. */
if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
++actions_n;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.024900802 +0000
+++ 0155-net-mlx5-fix-ICMPv6-header-rewrite-actions.patch 2020-02-11 11:17:38.740007704 +0000
@@ -1,15 +1,16 @@
-From 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 Mon Sep 17 00:00:00 2001
+From f312d00e87545dad43a07beeec6ab4327f61a7c0 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Wed, 22 Jan 2020 14:37:54 +0000
Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite actions
+[ upstream commit 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 ]
+
The ConnectX-5 HW cannot calculate the checksum for ICMPv6,
therefore flows with pattern 'ipv6 proto is 58' with actions that change
the header should be rejected. the actions that change the header
in this type of flow are 'set_ipv6_src' and 'set_ipv6_dst'.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
-Cc: stable@dpdk.org
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -18,10 +19,10 @@
1 file changed, 10 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index c2900c5d0d..6987592e60 100644
+index 6aedb3c0bc..295627fab3 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -4402,6 +4402,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4233,6 +4233,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
uint8_t next_protocol = 0xff;
uint16_t ether_type = 0;
int actions_n = 0;
@@ -29,7 +30,7 @@
const struct rte_flow_item *gre_item = NULL;
struct rte_flow_item_tcp nic_tcp_mask = {
.hdr = {
-@@ -4509,6 +4510,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4340,6 +4341,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
if (items->mask != NULL &&
((const struct rte_flow_item_ipv6 *)
items->mask)->hdr.proto) {
@@ -39,7 +40,7 @@
next_protocol =
((const struct rte_flow_item_ipv6 *)
items->spec)->hdr.proto;
-@@ -4881,6 +4885,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4705,6 +4709,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix RFC addresses for Tx only' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (153 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite actions' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " luca.boccassi
` (33 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8716a3106ee44c348e986dcbd25f06708f8c7aba Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 26 Jan 2020 19:34:58 -0800
Subject: [PATCH] app/testpmd: fix RFC addresses for Tx only
[ upstream commit 8d7c19d9e46957b045690d1530ba0a7be5c5dc03 ]
The previous patch to change default IP addresses for tx only
mode got the wrong values (typo).
Fixes: bf5b2126bf44 ("app/testpmd: add ability to set Tx IP and UDP parameters")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/txonly.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 3caf281cb8..d42a157f8f 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -45,8 +45,8 @@ uint16_t tx_udp_src_port = 9;
uint16_t tx_udp_dst_port = 9;
/* use RFC5735 / RFC2544 reserved network test addresses */
-uint32_t tx_ip_src_addr = (192U << 24) | (18 << 16) | (0 << 8) | 1;
-uint32_t tx_ip_dst_addr = (192U << 24) | (18 << 16) | (0 << 8) | 2;
+uint32_t tx_ip_src_addr = (198U << 24) | (18 << 16) | (0 << 8) | 1;
+uint32_t tx_ip_dst_addr = (198U << 24) | (18 << 16) | (0 << 8) | 2;
#define IP_DEFTTL 64 /* from RFC 1340. */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.058490813 +0000
+++ 0156-app-testpmd-fix-RFC-addresses-for-Tx-only.patch 2020-02-11 11:17:38.740007704 +0000
@@ -1,13 +1,14 @@
-From 8d7c19d9e46957b045690d1530ba0a7be5c5dc03 Mon Sep 17 00:00:00 2001
+From 8716a3106ee44c348e986dcbd25f06708f8c7aba Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 26 Jan 2020 19:34:58 -0800
Subject: [PATCH] app/testpmd: fix RFC addresses for Tx only
+[ upstream commit 8d7c19d9e46957b045690d1530ba0a7be5c5dc03 ]
+
The previous patch to change default IP addresses for tx only
mode got the wrong values (typo).
Fixes: bf5b2126bf44 ("app/testpmd: add ability to set Tx IP and UDP parameters")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,7 +17,7 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
-index 871cf6c154..4b5bec443b 100644
+index 3caf281cb8..d42a157f8f 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -45,8 +45,8 @@ uint16_t tx_udp_src_port = 9;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (154 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix RFC addresses for Tx only' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " luca.boccassi
` (32 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 41a8f39240c35b8919fc69ff7ce245f0a3757ebe Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:18 -0800
Subject: [PATCH] net/bnx2x: fix reset of scan FP flag
[ upstream commit d836d5efb93505ad86f72c0fcfb0f650858b96ac ]
The fastpath task queue handler resets the fastpath scan flag
unconditionally, this patch changes that to reset the flag
only if it was set.
Fixes: 08a6e472c3d7 ("net/bnx2x: fix packet drop")
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/bnx2x/bnx2x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index ed31335ac5..50e289b286 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -4577,10 +4577,10 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
bnx2x_handle_fp_tq(fp);
return;
}
+ /* We have completed slow path completion, clear the flag */
+ rte_atomic32_set(&sc->scan_fp, 0);
}
- /* Assuming we have completed slow path completion, clear the flag */
- rte_atomic32_set(&sc->scan_fp, 0);
bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.085598229 +0000
+++ 0157-net-bnx2x-fix-reset-of-scan-FP-flag.patch 2020-02-11 11:17:38.752007929 +0000
@@ -1,14 +1,15 @@
-From d836d5efb93505ad86f72c0fcfb0f650858b96ac Mon Sep 17 00:00:00 2001
+From 41a8f39240c35b8919fc69ff7ce245f0a3757ebe Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:18 -0800
Subject: [PATCH] net/bnx2x: fix reset of scan FP flag
+[ upstream commit d836d5efb93505ad86f72c0fcfb0f650858b96ac ]
+
The fastpath task queue handler resets the fastpath scan flag
unconditionally, this patch changes that to reset the flag
only if it was set.
Fixes: 08a6e472c3d7 ("net/bnx2x: fix packet drop")
-Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (155 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " luca.boccassi
` (31 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5fb6087d0e72af502978ae25ee537550fe250af5 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:19 -0800
Subject: [PATCH] net/bnx2x: fix to sync fastpath Rx queue access
[ upstream commit 141c86f55f734c4f8b9ad3129b6e58807b5c4577 ]
PMD handles fast path completions in the Rx handler and control path
completions in the interrupt handler. They both are processing
completions from the same fastpath completion queue. There is a
potential for race condition when these two paths are processing
the completions from the same queue and trying to updating Rx Producer.
Add a fastpath Rx lock between these two paths to close this race.
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/bnx2x/bnx2x.c | 12 ++++++++++++
drivers/net/bnx2x/bnx2x.h | 3 +++
drivers/net/bnx2x/bnx2x_rxtx.c | 8 +++++++-
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 50e289b286..0b4030e2b9 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -1167,6 +1167,10 @@ static int bnx2x_has_rx_work(struct bnx2x_fastpath *fp)
if (unlikely((rx_cq_cons_sb & MAX_RCQ_ENTRIES(rxq)) ==
MAX_RCQ_ENTRIES(rxq)))
rx_cq_cons_sb++;
+
+ PMD_RX_LOG(DEBUG, "hw CQ cons = %d, sw CQ cons = %d",
+ rx_cq_cons_sb, rxq->rx_cq_head);
+
return rxq->rx_cq_head != rx_cq_cons_sb;
}
@@ -1249,9 +1253,12 @@ static uint8_t bnx2x_rxeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp)
uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
+ rte_spinlock_lock(&(fp)->rx_mtx);
+
rxq = sc->rx_queues[fp->index];
if (!rxq) {
PMD_RX_LOG(ERR, "RX queue %d is NULL", fp->index);
+ rte_spinlock_unlock(&(fp)->rx_mtx);
return 0;
}
@@ -1321,9 +1328,14 @@ next_cqe:
rxq->rx_cq_head = sw_cq_cons;
rxq->rx_cq_tail = sw_cq_prod;
+ PMD_RX_LOG(DEBUG, "BD prod = %d, sw CQ prod = %d",
+ bd_prod_fw, sw_cq_prod);
+
/* Update producers */
bnx2x_update_rx_prod(sc, fp, bd_prod_fw, sw_cq_prod);
+ rte_spinlock_unlock(&(fp)->rx_mtx);
+
return sw_cq_cons != hw_cq_cons;
}
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 3383c76759..1dbc98197d 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -360,6 +360,9 @@ struct bnx2x_fastpath {
/* pointer back to parent structure */
struct bnx2x_softc *sc;
+ /* Used to synchronize fastpath Rx access */
+ rte_spinlock_t rx_mtx;
+
/* status block */
struct bnx2x_dma sb_dma;
union bnx2x_host_hc_status_block status_block;
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index ae97dfee36..0d77035844 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -346,6 +346,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
uint16_t len, pad;
struct rte_mbuf *rx_mb = NULL;
+ rte_spinlock_lock(&(fp)->rx_mtx);
+
hw_cq_cons = le16toh(*fp->rx_cq_cons_sb);
if ((hw_cq_cons & USABLE_RCQ_ENTRIES_PER_PAGE) ==
USABLE_RCQ_ENTRIES_PER_PAGE) {
@@ -357,8 +359,10 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
sw_cq_cons = rxq->rx_cq_head;
sw_cq_prod = rxq->rx_cq_tail;
- if (sw_cq_cons == hw_cq_cons)
+ if (sw_cq_cons == hw_cq_cons) {
+ rte_spinlock_unlock(&(fp)->rx_mtx);
return 0;
+ }
while (nb_rx < nb_pkts && sw_cq_cons != hw_cq_cons) {
@@ -439,6 +443,8 @@ next_rx:
bnx2x_upd_rx_prod_fast(sc, fp, bd_prod, sw_cq_prod);
+ rte_spinlock_unlock(&(fp)->rx_mtx);
+
return nb_rx;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.121928415 +0000
+++ 0158-net-bnx2x-fix-to-sync-fastpath-Rx-queue-access.patch 2020-02-11 11:17:38.760008079 +0000
@@ -1,8 +1,10 @@
-From 141c86f55f734c4f8b9ad3129b6e58807b5c4577 Mon Sep 17 00:00:00 2001
+From 5fb6087d0e72af502978ae25ee537550fe250af5 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:19 -0800
Subject: [PATCH] net/bnx2x: fix to sync fastpath Rx queue access
+[ upstream commit 141c86f55f734c4f8b9ad3129b6e58807b5c4577 ]
+
PMD handles fast path completions in the Rx handler and control path
completions in the interrupt handler. They both are processing
completions from the same fastpath completion queue. There is a
@@ -12,7 +14,6 @@
Add a fastpath Rx lock between these two paths to close this race.
Fixes: 540a211084a7 ("bnx2x: driver core")
-Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (156 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix bumping of L2 filter reference count' " luca.boccassi
` (30 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 84087cb7305924f960ff179c7fa4ebc429e56edf Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:15 +0530
Subject: [PATCH] net/bnxt: fix alloc filter to use a common routine
[ upstream commit 2b3879f8e39d10a7c57ad718195af3b686e94a9c ]
Invoke bnxt_get_unused_filter() inside bnxt_alloc_filter() so that
all filters are allocated from one common routine.
Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_filter.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 04231b069d..2f890779d2 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -26,13 +26,11 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
{
struct bnxt_filter_info *filter;
- /* Find the 1st unused filter from the free_filter_list pool*/
- filter = STAILQ_FIRST(&bp->free_filter_list);
+ filter = bnxt_get_unused_filter(bp);
if (!filter) {
PMD_DRV_LOG(ERR, "No more free filter resources\n");
return NULL;
}
- STAILQ_REMOVE_HEAD(&bp->free_filter_list, next);
filter->mac_index = INVALID_MAC_INDEX;
/* Default to L2 MAC Addr filter */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.160207651 +0000
+++ 0159-net-bnxt-fix-alloc-filter-to-use-a-common-routine.patch 2020-02-11 11:17:38.760008079 +0000
@@ -1,13 +1,14 @@
-From 2b3879f8e39d10a7c57ad718195af3b686e94a9c Mon Sep 17 00:00:00 2001
+From 84087cb7305924f960ff179c7fa4ebc429e56edf Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:15 +0530
Subject: [PATCH] net/bnxt: fix alloc filter to use a common routine
+[ upstream commit 2b3879f8e39d10a7c57ad718195af3b686e94a9c ]
+
Invoke bnxt_get_unused_filter() inside bnxt_alloc_filter() so that
all filters are allocated from one common routine.
Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
-Cc: stable@dpdk.org
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -17,7 +18,7 @@
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
-index b31f10479e..e2184334f7 100644
+index 04231b069d..2f890779d2 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -26,13 +26,11 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix bumping of L2 filter reference count' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (157 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: allow group ID 0 for RSS action' " luca.boccassi
` (29 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c07f50f9824531ddc8912a43cdd286d31bb3e084 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:16 +0530
Subject: [PATCH] net/bnxt: fix bumping of L2 filter reference count
[ upstream commit 9073198e42d23d00d807798e02227f7bc50a0046 ]
Now that the L2 filter reference count is bumped up in all cases
including bnxt_alloc_filter() which is issued in init, just move this
ref count bump inside the routine issuing the HWRM cmd so that it is
bumped up only if the cmd is successful.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_filter.c | 3 +--
drivers/net/bnxt/bnxt_flow.c | 1 -
drivers/net/bnxt/bnxt_hwrm.c | 2 ++
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 2f890779d2..622a9bb417 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -39,8 +39,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK;
memcpy(filter->l2_addr, bp->mac_addr, RTE_ETHER_ADDR_LEN);
memset(filter->l2_addr_mask, 0xff, RTE_ETHER_ADDR_LEN);
- /* bump up the reference count of filter */
- filter->l2_ref_cnt++;
+
return filter;
}
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index c11c0c969d..60c390448a 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -867,7 +867,6 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
bnxt_free_filter(bp, filter1);
return NULL;
}
- filter1->l2_ref_cnt++;
return filter1;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2becf0fbe6..6309a61c06 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -487,6 +487,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
filter->fw_l2_filter_id = rte_le_to_cpu_64(resp->l2_filter_id);
HWRM_UNLOCK();
+ filter->l2_ref_cnt++;
+
return rc;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.186682980 +0000
+++ 0160-net-bnxt-fix-bumping-of-L2-filter-reference-count.patch 2020-02-11 11:17:38.764008153 +0000
@@ -1,15 +1,16 @@
-From 9073198e42d23d00d807798e02227f7bc50a0046 Mon Sep 17 00:00:00 2001
+From c07f50f9824531ddc8912a43cdd286d31bb3e084 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:16 +0530
Subject: [PATCH] net/bnxt: fix bumping of L2 filter reference count
+[ upstream commit 9073198e42d23d00d807798e02227f7bc50a0046 ]
+
Now that the L2 filter reference count is bumped up in all cases
including bnxt_alloc_filter() which is issued in init, just move this
ref count bump inside the routine issuing the HWRM cmd so that it is
bumped up only if the cmd is successful.
Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
-Cc: stable@dpdk.org
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -21,7 +22,7 @@
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
-index e2184334f7..a1463a0e2f 100644
+index 2f890779d2..622a9bb417 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -39,8 +39,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
@@ -35,7 +36,7 @@
}
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 5564c53637..4b3b597956 100644
+index c11c0c969d..60c390448a 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -867,7 +867,6 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
@@ -47,11 +48,11 @@
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 3b013396ba..460cc48942 100644
+index 2becf0fbe6..6309a61c06 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -488,6 +488,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
- filter->flow_id = rte_le_to_cpu_32(resp->flow_id);
+@@ -487,6 +487,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
+ filter->fw_l2_filter_id = rte_le_to_cpu_64(resp->l2_filter_id);
HWRM_UNLOCK();
+ filter->l2_ref_cnt++;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: allow group ID 0 for RSS action' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (158 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix bumping of L2 filter reference count' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " luca.boccassi
` (28 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 445d0526a863db8d8d035ab964754fd3fb942430 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:17 +0530
Subject: [PATCH] net/bnxt: allow group ID 0 for RSS action
[ upstream commit db8241fea26073971ace2a76d53bcf73385b774b ]
Allow RSS action with group ID 0. The RSS match check will ensure if
requested RSS action configuration parameters should be allowed as per
the VNIC's RSS configuration or not and if it does match as it is
by design in OVS-DPDK use case, the default vnic can be used to create
the filter. As part of this ensure that rx_queue_cnt for the default
vnic is setup during init as this field was being set only for non-zero
vnics while handling RSS action for flow create.
Check for out of bounds error while accessing the vnic array.
Fixes: adc0f81c6552 ("net/bnxt: support RSS action")
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 14 +++++++++++++-
drivers/net/bnxt/bnxt_flow.c | 33 ++++-----------------------------
2 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index ca54c74155..46600e163a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -689,11 +689,23 @@ extern const struct rte_flow_ops bnxt_flow_ops;
#define bnxt_release_flow_lock(bp) \
pthread_mutex_unlock(&(bp)->flow_lock)
+#define BNXT_VALID_VNIC_OR_RET(bp, vnic_id) do { \
+ if ((vnic_id) >= (bp)->max_vnics) { \
+ rte_flow_error_set(error, \
+ EINVAL, \
+ RTE_FLOW_ERROR_TYPE_ATTR_GROUP, \
+ NULL, \
+ "Group id is invalid!"); \
+ rc = -rte_errno; \
+ goto ret; \
+ } \
+} while (0)
+
extern int bnxt_logtype_driver;
#define PMD_DRV_LOG_RAW(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, bnxt_logtype_driver, "%s(): " fmt, \
__func__, ## args)
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt, ## args)
+ PMD_DRV_LOG_RAW(level, fmt, ## args)
#endif
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 60c390448a..d901479ee1 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1056,16 +1056,9 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic_id = act_q->index;
}
+ BNXT_VALID_VNIC_OR_RET(bp, vnic_id);
+
vnic = &bp->vnic_info[vnic_id];
- if (vnic == NULL) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "No matching VNIC found.");
- rc = -rte_errno;
- goto ret;
- }
if (vnic->rx_queue_cnt) {
if (vnic->start_grp_id != act_q->index) {
PMD_DRV_LOG(ERR,
@@ -1263,28 +1256,10 @@ use_vnic:
rss = (const struct rte_flow_action_rss *)act->conf;
vnic_id = attr->group;
- if (!vnic_id) {
- PMD_DRV_LOG(ERR, "Group id cannot be 0\n");
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ATTR,
- NULL,
- "Group id cannot be 0");
- rc = -rte_errno;
- goto ret;
- }
+
+ BNXT_VALID_VNIC_OR_RET(bp, vnic_id);
vnic = &bp->vnic_info[vnic_id];
- if (vnic == NULL) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "No matching VNIC for RSS group.");
- rc = -rte_errno;
- goto ret;
- }
- PMD_DRV_LOG(DEBUG, "VNIC found\n");
/* Check if requested RSS config matches RSS config of VNIC
* only if it is not a fresh VNIC configuration.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.217985718 +0000
+++ 0161-net-bnxt-allow-group-ID-0-for-RSS-action.patch 2020-02-11 11:17:38.768008228 +0000
@@ -1,8 +1,10 @@
-From db8241fea26073971ace2a76d53bcf73385b774b Mon Sep 17 00:00:00 2001
+From 445d0526a863db8d8d035ab964754fd3fb942430 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:17 +0530
Subject: [PATCH] net/bnxt: allow group ID 0 for RSS action
+[ upstream commit db8241fea26073971ace2a76d53bcf73385b774b ]
+
Allow RSS action with group ID 0. The RSS match check will ensure if
requested RSS action configuration parameters should be allowed as per
the VNIC's RSS configuration or not and if it does match as it is
@@ -13,21 +15,19 @@
Check for out of bounds error while accessing the vnic array.
Fixes: adc0f81c6552 ("net/bnxt: support RSS action")
-Cc: stable@dpdk.org
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
- drivers/net/bnxt/bnxt.h | 14 +++++++++++++-
- drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
- drivers/net/bnxt/bnxt_flow.c | 33 ++++-----------------------------
- 3 files changed, 21 insertions(+), 30 deletions(-)
+ drivers/net/bnxt/bnxt.h | 14 +++++++++++++-
+ drivers/net/bnxt/bnxt_flow.c | 33 ++++-----------------------------
+ 2 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index ddb26814ce..bca9ad418b 100644
+index ca54c74155..46600e163a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
-@@ -696,11 +696,23 @@ extern const struct rte_flow_ops bnxt_flow_ops;
+@@ -689,11 +689,23 @@ extern const struct rte_flow_ops bnxt_flow_ops;
#define bnxt_release_flow_lock(bp) \
pthread_mutex_unlock(&(bp)->flow_lock)
@@ -52,28 +52,11 @@
- PMD_DRV_LOG_RAW(level, fmt, ## args)
+ PMD_DRV_LOG_RAW(level, fmt, ## args)
#endif
-diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 2ef1169b88..fc3f1a8db8 100644
---- a/drivers/net/bnxt/bnxt_ethdev.c
-+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -295,8 +295,12 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
-
- if (BNXT_HAS_RING_GRPS(bp) && rxq->rx_deferred_start)
- rxq->vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
-+ else
-+ vnic->rx_queue_cnt++;
- }
-
-+ PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);
-+
- rc = bnxt_vnic_rss_configure(bp, vnic);
- if (rc)
- goto err_out;
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 4b3b597956..bd6c726232 100644
+index 60c390448a..d901479ee1 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1059,16 +1059,9 @@ start:
+@@ -1056,16 +1056,9 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic_id = act_q->index;
}
@@ -92,7 +75,7 @@
if (vnic->rx_queue_cnt) {
if (vnic->start_grp_id != act_q->index) {
PMD_DRV_LOG(ERR,
-@@ -1268,28 +1261,10 @@ use_vnic:
+@@ -1263,28 +1256,10 @@ use_vnic:
rss = (const struct rte_flow_action_rss *)act->conf;
vnic_id = attr->group;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove redundant if statement' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (159 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: allow group ID 0 for RSS action' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant macro' " luca.boccassi
` (27 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 79dd225dbacfe8c5e888c845c17ebc2120c5df8a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:18 +0530
Subject: [PATCH] net/bnxt: remove redundant if statement
[ upstream commit cc73dfd0418ed6ca14256677e639c35d82c1e051 ]
Since "eth_dev->data->dev_started" has been assigned to 0 at the
beginning of bnxt_dev_stop_op() routine, the code inside the if()
condition is redundant. Remove it.
Anyways "eth_dev->data->dev_link.link_status" will be set to 0 in
bnxt_dev_set_link_down_op() later in the routine.
Fixes: 316e412299fd ("net/bnxt: fix crash when closing")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 59400f3139..543ab2c7d4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -933,10 +933,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_cancel_fw_health_check(bp);
bp->flags &= ~BNXT_FLAG_INIT_DONE;
- if (bp->eth_dev->data->dev_started) {
- /* TBD: STOP HW queues DMA */
- eth_dev->data->dev_link.link_status = 0;
- }
bnxt_dev_set_link_down_op(eth_dev);
/* Wait for link to be reset and the async notification to process.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.250724533 +0000
+++ 0162-net-bnxt-remove-redundant-if-statement.patch 2020-02-11 11:17:38.768008228 +0000
@@ -1,8 +1,10 @@
-From cc73dfd0418ed6ca14256677e639c35d82c1e051 Mon Sep 17 00:00:00 2001
+From 79dd225dbacfe8c5e888c845c17ebc2120c5df8a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:18 +0530
Subject: [PATCH] net/bnxt: remove redundant if statement
+[ upstream commit cc73dfd0418ed6ca14256677e639c35d82c1e051 ]
+
Since "eth_dev->data->dev_started" has been assigned to 0 at the
beginning of bnxt_dev_stop_op() routine, the code inside the if()
condition is redundant. Remove it.
@@ -11,7 +13,6 @@
bnxt_dev_set_link_down_op() later in the routine.
Fixes: 316e412299fd ("net/bnxt: fix crash when closing")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -21,10 +22,10 @@
1 file changed, 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index fc3f1a8db8..267a36148c 100644
+index 59400f3139..543ab2c7d4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -948,10 +948,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -933,10 +933,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_cancel_fw_health_check(bp);
bp->flags &= ~BNXT_FLAG_INIT_DONE;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove redundant macro' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (160 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary structure variable' " luca.boccassi
` (26 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP
Cc: Santoshkumar Karanappa Rastapur, Ajit Khaparde, Somnath Kotur,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ecfe7d061464cacff50951437dc09704ccfb52ea Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:19 +0530
Subject: [PATCH] net/bnxt: remove redundant macro
[ upstream commit 925e3cbda68bf05274bbb428d871ce5ac1fb4957 ]
Use "dev->data->dev_started" state, instead of local BNXT_FLAG_INIT_DONE
to check whether device has been initialised or not.
Fixes: ed2ced6fe927 ("net/bnxt: check initialization before accessing stats")
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 1 -
drivers/net/bnxt/bnxt_ethdev.c | 2 --
drivers/net/bnxt/bnxt_stats.c | 4 ++--
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 46600e163a..265c63a3e7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -523,7 +523,6 @@ struct bnxt {
#define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21)
#define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22)
#define BNXT_FLAG_NEW_RM BIT(23)
-#define BNXT_FLAG_INIT_DONE BIT(24)
#define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25)
#define BNXT_FLAG_ADV_FLOW_MGMT BIT(26)
#define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 543ab2c7d4..c5fc43b918 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -872,7 +872,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
- bp->flags |= BNXT_FLAG_INIT_DONE;
eth_dev->data->dev_started = 1;
bp->dev_stopped = 0;
pthread_mutex_lock(&bp->def_cp_lock);
@@ -932,7 +931,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_cancel_fw_health_check(bp);
- bp->flags &= ~BNXT_FLAG_INIT_DONE;
bnxt_dev_set_link_down_op(eth_dev);
/* Wait for link to be reset and the async notification to process.
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 743f2ce94e..be5b514f49 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -389,7 +389,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
if (rc)
return rc;
- if (!(bp->flags & BNXT_FLAG_INIT_DONE))
+ if (!eth_dev->data->dev_started)
return -EIO;
num_q_stats = RTE_MIN(bp->rx_cp_nr_rings,
@@ -434,7 +434,7 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
if (ret)
return ret;
- if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
+ if (!eth_dev->data->dev_started) {
PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
return -EINVAL;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.281099237 +0000
+++ 0163-net-bnxt-remove-redundant-macro.patch 2020-02-11 11:17:38.776008378 +0000
@@ -1,13 +1,14 @@
-From 925e3cbda68bf05274bbb428d871ce5ac1fb4957 Mon Sep 17 00:00:00 2001
+From ecfe7d061464cacff50951437dc09704ccfb52ea Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:19 +0530
Subject: [PATCH] net/bnxt: remove redundant macro
+[ upstream commit 925e3cbda68bf05274bbb428d871ce5ac1fb4957 ]
+
Use "dev->data->dev_started" state, instead of local BNXT_FLAG_INIT_DONE
to check whether device has been initialised or not.
Fixes: ed2ced6fe927 ("net/bnxt: check initialization before accessing stats")
-Cc: stable@dpdk.org
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -20,30 +21,30 @@
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index bca9ad418b..95f1f1a20e 100644
+index 46600e163a..265c63a3e7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
-@@ -520,7 +520,6 @@ struct bnxt {
- #define BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED BIT(18)
- #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(19)
- #define BNXT_FLAG_NEW_RM BIT(20)
--#define BNXT_FLAG_INIT_DONE BIT(21)
- #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(22)
- #define BNXT_FLAG_ADV_FLOW_MGMT BIT(23)
- #define BNXT_FLAG_RX_VECTOR_PKT_MODE BIT(24)
+@@ -523,7 +523,6 @@ struct bnxt {
+ #define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21)
+ #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22)
+ #define BNXT_FLAG_NEW_RM BIT(23)
+-#define BNXT_FLAG_INIT_DONE BIT(24)
+ #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25)
+ #define BNXT_FLAG_ADV_FLOW_MGMT BIT(26)
+ #define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 267a36148c..b04685cea6 100644
+index 543ab2c7d4..c5fc43b918 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -887,7 +887,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -872,7 +872,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
- bp->flags |= BNXT_FLAG_INIT_DONE;
eth_dev->data->dev_started = 1;
+ bp->dev_stopped = 0;
pthread_mutex_lock(&bp->def_cp_lock);
- bnxt_schedule_fw_health_check(bp);
-@@ -947,7 +946,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -932,7 +931,6 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_cancel_fw_health_check(bp);
@@ -52,7 +53,7 @@
/* Wait for link to be reset and the async notification to process.
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
-index 32f112b5ba..466862995b 100644
+index 743f2ce94e..be5b514f49 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -389,7 +389,7 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove unnecessary structure variable' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (161 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant macro' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " luca.boccassi
` (25 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kalesh AP
Cc: Santoshkumar Karanappa Rastapur, Ajit Khaparde, Somnath Kotur,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d7a5c9f001b1c4272063db5bb6a0a36b9bd9c735 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:20 +0530
Subject: [PATCH] net/bnxt: remove unnecessary structure variable
[ upstream commit 6dc26050e42821e7604b4160768197d7668d2439 ]
This change could help in reducing the size of bnxt PMD private
data structure by converting a uint8_t variable to use bit map flag.
Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning")
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 4 ++--
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 265c63a3e7..397d1cd843 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -523,12 +523,13 @@ struct bnxt {
#define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21)
#define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22)
#define BNXT_FLAG_NEW_RM BIT(23)
+#define BNXT_FLAG_NPAR_PF BIT(24)
#define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25)
#define BNXT_FLAG_ADV_FLOW_MGMT BIT(26)
#define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
-#define BNXT_NPAR(bp) ((bp)->port_partition_type)
+#define BNXT_NPAR(bp) ((bp)->flags & BNXT_FLAG_NPAR_PF)
#define BNXT_MH(bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST)
#define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp))
#define BNXT_USE_CHIMP_MB 0 //For non-CFA commands, everything uses Chimp.
@@ -644,7 +645,6 @@ struct bnxt {
#define BNXT_OUTER_TPID_BD_SHFT 16
uint32_t outer_tpid_bd;
struct bnxt_pf_info pf;
- uint8_t port_partition_type;
uint8_t dev_stopped;
uint8_t vxlan_port_cnt;
uint8_t geneve_port_cnt;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6309a61c06..45d56316fc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2957,10 +2957,10 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
/* FALLTHROUGH */
- bp->port_partition_type = resp->port_partition_type;
+ bp->flags |= BNXT_FLAG_NPAR_PF;
break;
default:
- bp->port_partition_type = 0;
+ bp->flags &= ~BNXT_FLAG_NPAR_PF;
break;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.312165125 +0000
+++ 0164-net-bnxt-remove-unnecessary-structure-variable.patch 2020-02-11 11:17:38.780008452 +0000
@@ -1,13 +1,14 @@
-From 6dc26050e42821e7604b4160768197d7668d2439 Mon Sep 17 00:00:00 2001
+From d7a5c9f001b1c4272063db5bb6a0a36b9bd9c735 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:20 +0530
Subject: [PATCH] net/bnxt: remove unnecessary structure variable
+[ upstream commit 6dc26050e42821e7604b4160768197d7668d2439 ]
+
This change could help in reducing the size of bnxt PMD private
data structure by converting a uint8_t variable to use bit map flag.
Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning")
-Cc: stable@dpdk.org
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -19,17 +20,17 @@
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 95f1f1a20e..434ce2829e 100644
+index 265c63a3e7..397d1cd843 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
-@@ -520,12 +520,13 @@ struct bnxt {
- #define BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED BIT(18)
- #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(19)
- #define BNXT_FLAG_NEW_RM BIT(20)
-+#define BNXT_FLAG_NPAR_PF BIT(21)
- #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(22)
- #define BNXT_FLAG_ADV_FLOW_MGMT BIT(23)
- #define BNXT_FLAG_RX_VECTOR_PKT_MODE BIT(24)
+@@ -523,12 +523,13 @@ struct bnxt {
+ #define BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD BIT(21)
+ #define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(22)
+ #define BNXT_FLAG_NEW_RM BIT(23)
++#define BNXT_FLAG_NPAR_PF BIT(24)
+ #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25)
+ #define BNXT_FLAG_ADV_FLOW_MGMT BIT(26)
+ #define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
-#define BNXT_NPAR(bp) ((bp)->port_partition_type)
@@ -37,7 +38,7 @@
#define BNXT_MH(bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST)
#define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp))
#define BNXT_USE_CHIMP_MB 0 //For non-CFA commands, everything uses Chimp.
-@@ -647,7 +648,6 @@ struct bnxt {
+@@ -644,7 +645,6 @@ struct bnxt {
#define BNXT_OUTER_TPID_BD_SHFT 16
uint32_t outer_tpid_bd;
struct bnxt_pf_info pf;
@@ -46,10 +47,10 @@
uint8_t vxlan_port_cnt;
uint8_t geneve_port_cnt;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 460cc48942..f325aff828 100644
+index 6309a61c06..45d56316fc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -2952,10 +2952,10 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
+@@ -2957,10 +2957,10 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
/* FALLTHROUGH */
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (162 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary structure variable' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: make FDB default rule optional' " luca.boccassi
` (24 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c9e70309daa3535976b90c930eb99bcdd22e743c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Tue, 28 Jan 2020 17:43:13 -0800
Subject: [PATCH] net/bnx2x: fix VLAN stripped flag
[ upstream commit 4b4650296ab4f970946c4c7502938f99ec7ea952 ]
For VLAN packet the tci is saved in rx_mb->vlan_tci, however the
STRIPPED offload flag is not set along with PKT_RX_VLAN flag.
Set the PKT_RX_VLAN_STRIPPED flag as well.
Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/bnx2x/bnx2x_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 0d77035844..e201b68db8 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -418,7 +418,7 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
rx_mb->vlan_tci = cqe_fp->vlan_tag;
- rx_mb->ol_flags |= PKT_RX_VLAN;
+ rx_mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
}
rx_pkts[nb_rx] = rx_mb;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.342661133 +0000
+++ 0165-net-bnx2x-fix-VLAN-stripped-flag.patch 2020-02-11 11:17:38.780008452 +0000
@@ -1,15 +1,16 @@
-From 4b4650296ab4f970946c4c7502938f99ec7ea952 Mon Sep 17 00:00:00 2001
+From c9e70309daa3535976b90c930eb99bcdd22e743c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Tue, 28 Jan 2020 17:43:13 -0800
Subject: [PATCH] net/bnx2x: fix VLAN stripped flag
+[ upstream commit 4b4650296ab4f970946c4c7502938f99ec7ea952 ]
+
For VLAN packet the tci is saved in rx_mb->vlan_tci, however the
STRIPPED offload flag is not set along with PKT_RX_VLAN flag.
Set the PKT_RX_VLAN_STRIPPED flag as well.
Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
-Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: make FDB default rule optional' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (163 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " luca.boccassi
` (23 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Matan Azrad; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f84b4c2ec3a210d8c6de6d7684923abe9e94f554 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Tue, 28 Jan 2020 17:06:43 +0000
Subject: [PATCH] net/mlx5: make FDB default rule optional
[ upstream commit fbde43310fbec8da96e8c66d7a16d891f60ed630 ]
There are RDMA-CORE versions which are not supported multi-table for
some Mellanox mlx5 devices.
Hence, the optimization added in commit [1] which forwards all the FDB
traffic to table 1 cannot be configured.
Make the above optimization optional:
Do not fail when either table 1 cannot be created or the jump rule
(all =>jump to table 1) is not configured successfully.
In this case, all the flows will be configured to table 0.
[1] commit b67b4ecbde22 ("net/mlx5: skip table zero to improve
insertion rate")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_flow.c | 6 ++++--
drivers/net/mlx5/mlx5_flow.h | 4 ++--
drivers/net/mlx5/mlx5_flow_dv.c | 11 ++++++-----
drivers/net/mlx5/mlx5_trigger.c | 11 ++++++++---
5 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 0c3a90e1bf..7a7c1d1268 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -784,6 +784,7 @@ struct mlx5_priv {
/* UAR same-page access control required in 32bit implementations. */
#endif
uint8_t skip_default_rss_reta; /* Skip configuration of default reta. */
+ uint8_t fdb_def_rule; /* Whether fdb jump to table 1 is configured. */
};
#define PORT_ID(priv) ((priv)->dev_data->port_id)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a18cdb918a..45df610a91 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5570,6 +5570,8 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
* Value is part of flow rule created by request external to PMD.
* @param[in] group
* rte_flow group index value.
+ * @param[out] fdb_def_rule
+ * Whether fdb jump to table 1 is configured.
* @param[out] table
* HW table value.
* @param[out] error
@@ -5580,10 +5582,10 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
*/
int
mlx5_flow_group_to_table(const struct rte_flow_attr *attributes, bool external,
- uint32_t group, uint32_t *table,
+ uint32_t group, bool fdb_def_rule, uint32_t *table,
struct rte_flow_error *error)
{
- if (attributes->transfer && external) {
+ if (attributes->transfer && external && fdb_def_rule) {
if (group == UINT32_MAX)
return rte_flow_error_set
(error, EINVAL,
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 6eccd441d5..0da1b5e318 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -752,8 +752,8 @@ uint32_t mlx5_flow_id_get(struct mlx5_flow_id_pool *pool, uint32_t *id);
uint32_t mlx5_flow_id_release(struct mlx5_flow_id_pool *pool,
uint32_t id);
int mlx5_flow_group_to_table(const struct rte_flow_attr *attributes,
- bool external, uint32_t group, uint32_t *table,
- struct rte_flow_error *error);
+ bool external, uint32_t group, bool fdb_def_rule,
+ uint32_t *table, struct rte_flow_error *error);
uint64_t mlx5_flow_hashfields_adjust(struct mlx5_flow *dev_flow, int tunnel,
uint64_t layer_types,
uint64_t hash_fields);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 295627fab3..eb46d00060 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3256,7 +3256,7 @@ flow_dv_validate_action_jump(const struct rte_flow_action *action,
target_group =
((const struct rte_flow_action_jump *)action->conf)->group;
ret = mlx5_flow_group_to_table(attributes, external, target_group,
- &table, error);
+ true, &table, error);
if (ret)
return ret;
if (attributes->group == target_group)
@@ -4165,7 +4165,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
int ret;
ret = mlx5_flow_group_to_table(attributes, external,
- attributes->group,
+ attributes->group, !!priv->fdb_def_rule,
&table, error);
if (ret)
return ret;
@@ -6677,7 +6677,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
mhdr_res->ft_type = attr->egress ? MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr->group,
- &table, error);
+ !!priv->fdb_def_rule, &table, error);
if (ret)
return ret;
dev_flow->group = table;
@@ -6945,8 +6945,9 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_JUMP:
jump_data = action->conf;
ret = mlx5_flow_group_to_table(attr, dev_flow->external,
- jump_data->group, &table,
- error);
+ jump_data->group,
+ !!priv->fdb_def_rule,
+ &table, error);
if (ret)
return ret;
tbl = flow_dv_tbl_resource_get(dev, table,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index ab6937ab10..7e12cd5e8b 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -423,9 +423,14 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
}
mlx5_txq_release(dev, i);
}
- if (priv->config.dv_esw_en && !priv->config.vf)
- if (!mlx5_flow_create_esw_table_zero_flow(dev))
- goto error;
+ if (priv->config.dv_esw_en && !priv->config.vf) {
+ if (mlx5_flow_create_esw_table_zero_flow(dev))
+ priv->fdb_def_rule = 1;
+ else
+ DRV_LOG(INFO, "port %u FDB default rule cannot be"
+ " configured - only Eswitch group 0 flows are"
+ " supported.", dev->data->port_id);
+ }
if (priv->isolated)
return 0;
if (dev->data->promiscuous) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.369096102 +0000
+++ 0166-net-mlx5-make-FDB-default-rule-optional.patch 2020-02-11 11:17:38.792008677 +0000
@@ -1,8 +1,10 @@
-From fbde43310fbec8da96e8c66d7a16d891f60ed630 Mon Sep 17 00:00:00 2001
+From f84b4c2ec3a210d8c6de6d7684923abe9e94f554 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Tue, 28 Jan 2020 17:06:43 +0000
Subject: [PATCH] net/mlx5: make FDB default rule optional
+[ upstream commit fbde43310fbec8da96e8c66d7a16d891f60ed630 ]
+
There are RDMA-CORE versions which are not supported multi-table for
some Mellanox mlx5 devices.
@@ -17,8 +19,6 @@
[1] commit b67b4ecbde22 ("net/mlx5: skip table zero to improve
insertion rate")
-Cc: stable@dpdk.org
-
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
@@ -30,10 +30,10 @@
5 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index a7e70895e1..d7c519bae0 100644
+index 0c3a90e1bf..7a7c1d1268 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
-@@ -554,6 +554,7 @@ struct mlx5_priv {
+@@ -784,6 +784,7 @@ struct mlx5_priv {
/* UAR same-page access control required in 32bit implementations. */
#endif
uint8_t skip_default_rss_reta; /* Skip configuration of default reta. */
@@ -42,10 +42,10 @@
#define PORT_ID(priv) ((priv)->dev_data->port_id)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 47ba521a77..adba168d54 100644
+index a18cdb918a..45df610a91 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -5577,6 +5577,8 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
+@@ -5570,6 +5570,8 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
* Value is part of flow rule created by request external to PMD.
* @param[in] group
* rte_flow group index value.
@@ -54,7 +54,7 @@
* @param[out] table
* HW table value.
* @param[out] error
-@@ -5587,10 +5589,10 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
+@@ -5580,10 +5582,10 @@ mlx5_flow_async_pool_query_handle(struct mlx5_ibv_shared *sh,
*/
int
mlx5_flow_group_to_table(const struct rte_flow_attr *attributes, bool external,
@@ -68,10 +68,10 @@
return rte_flow_error_set
(error, EINVAL,
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index 4255472e54..7c31bfe8f8 100644
+index 6eccd441d5..0da1b5e318 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -754,8 +754,8 @@ uint32_t mlx5_flow_id_get(struct mlx5_flow_id_pool *pool, uint32_t *id);
+@@ -752,8 +752,8 @@ uint32_t mlx5_flow_id_get(struct mlx5_flow_id_pool *pool, uint32_t *id);
uint32_t mlx5_flow_id_release(struct mlx5_flow_id_pool *pool,
uint32_t id);
int mlx5_flow_group_to_table(const struct rte_flow_attr *attributes,
@@ -83,10 +83,10 @@
uint64_t layer_types,
uint64_t hash_fields);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 5610d94386..f82c90ec00 100644
+index 295627fab3..eb46d00060 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -3359,7 +3359,7 @@ flow_dv_validate_action_jump(const struct rte_flow_action *action,
+@@ -3256,7 +3256,7 @@ flow_dv_validate_action_jump(const struct rte_flow_action *action,
target_group =
((const struct rte_flow_action_jump *)action->conf)->group;
ret = mlx5_flow_group_to_table(attributes, external, target_group,
@@ -95,7 +95,7 @@
if (ret)
return ret;
if (attributes->group == target_group)
-@@ -4340,7 +4340,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -4165,7 +4165,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
int ret;
ret = mlx5_flow_group_to_table(attributes, external,
@@ -104,7 +104,7 @@
&table, error);
if (ret)
return ret;
-@@ -7017,7 +7017,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
+@@ -6677,7 +6677,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
mhdr_res->ft_type = attr->egress ? MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr->group,
@@ -113,7 +113,7 @@
if (ret)
return ret;
dev_flow->group = table;
-@@ -7285,8 +7285,9 @@ cnt_err:
+@@ -6945,8 +6945,9 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_JUMP:
jump_data = action->conf;
ret = mlx5_flow_group_to_table(attr, dev_flow->external,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (164 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: make FDB default rule optional' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix GTP-U rule conflict' " luca.boccassi
` (22 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Raslan Darawsheh; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3f9bb13e513cd926a86a09b8cea7a12bdcf88caa Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Mon, 27 Jan 2020 17:34:12 +0200
Subject: [PATCH] net/mlx5: fix VXLAN-GPE item translation
[ upstream commit 90456726eb801df50b98803678427ec8881ff0af ]
Currently, when using VXLAN-GPE or VXLAN item in the flow
both are being treated the same with flags 0x8 in VXLAN
header. Which mean the matching of the item VXLAN-GPE
will match any VXLAN packet.
This fixes the translation of VXLAN GPE item into PMD flow
item. Which will by default set the flags to VXLAN-GPE
to be 0xc.
Fixes: 3d69434113d1 ("net/mlx5: add Direct Verbs validation function")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 75 ++++++++++++++++++++++++++++++++-
1 file changed, 73 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index eb46d00060..7bf1aa518d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5558,6 +5558,76 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
vni_v[i] = vni_m[i] & vxlan_v->vni[i];
}
+/**
+ * Add VXLAN-GPE item to matcher and to the value.
+ *
+ * @param[in, out] matcher
+ * Flow matcher.
+ * @param[in, out] key
+ * Flow matcher value.
+ * @param[in] item
+ * Flow pattern to translate.
+ * @param[in] inner
+ * Item is inner pattern.
+ */
+
+static void
+flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+ const struct rte_flow_item *item, int inner)
+{
+ const struct rte_flow_item_vxlan_gpe *vxlan_m = item->mask;
+ const struct rte_flow_item_vxlan_gpe *vxlan_v = item->spec;
+ void *headers_m;
+ void *headers_v;
+ void *misc_m =
+ MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_3);
+ void *misc_v =
+ MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
+ char *vni_m;
+ char *vni_v;
+ uint16_t dport;
+ int size;
+ int i;
+ uint8_t flags_m = 0xff;
+ uint8_t flags_v = 0xc;
+
+ if (inner) {
+ headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+ inner_headers);
+ headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
+ } else {
+ headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+ outer_headers);
+ headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
+ }
+ dport = item->type == RTE_FLOW_ITEM_TYPE_VXLAN ?
+ MLX5_UDP_PORT_VXLAN : MLX5_UDP_PORT_VXLAN_GPE;
+ if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xFFFF);
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, dport);
+ }
+ if (!vxlan_v)
+ return;
+ if (!vxlan_m)
+ vxlan_m = &rte_flow_item_vxlan_gpe_mask;
+ size = sizeof(vxlan_m->vni);
+ vni_m = MLX5_ADDR_OF(fte_match_set_misc3, misc_m, outer_vxlan_gpe_vni);
+ vni_v = MLX5_ADDR_OF(fte_match_set_misc3, misc_v, outer_vxlan_gpe_vni);
+ memcpy(vni_m, vxlan_m->vni, size);
+ for (i = 0; i < size; ++i)
+ vni_v[i] = vni_m[i] & vxlan_v->vni[i];
+ if (vxlan_m->flags) {
+ flags_m = vxlan_m->flags;
+ flags_v = vxlan_v->flags;
+ }
+ MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_flags, flags_m);
+ MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags, flags_v);
+ MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_next_protocol,
+ vxlan_m->protocol);
+ MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_next_protocol,
+ vxlan_v->protocol);
+}
+
/**
* Add Geneve item to matcher and to the value.
*
@@ -7226,8 +7296,9 @@ cnt_err:
last_item = MLX5_FLOW_LAYER_VXLAN;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
- flow_dv_translate_item_vxlan(match_mask, match_value,
- items, tunnel);
+ flow_dv_translate_item_vxlan_gpe(match_mask,
+ match_value, items,
+ tunnel);
last_item = MLX5_FLOW_LAYER_VXLAN_GPE;
break;
case RTE_FLOW_ITEM_TYPE_GENEVE:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.409469034 +0000
+++ 0167-net-mlx5-fix-VXLAN-GPE-item-translation.patch 2020-02-11 11:17:38.800008826 +0000
@@ -1,8 +1,10 @@
-From 90456726eb801df50b98803678427ec8881ff0af Mon Sep 17 00:00:00 2001
+From 3f9bb13e513cd926a86a09b8cea7a12bdcf88caa Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Mon, 27 Jan 2020 17:34:12 +0200
Subject: [PATCH] net/mlx5: fix VXLAN-GPE item translation
+[ upstream commit 90456726eb801df50b98803678427ec8881ff0af ]
+
Currently, when using VXLAN-GPE or VXLAN item in the flow
both are being treated the same with flags 0x8 in VXLAN
header. Which mean the matching of the item VXLAN-GPE
@@ -13,7 +15,6 @@
to be 0xc.
Fixes: 3d69434113d1 ("net/mlx5: add Direct Verbs validation function")
-Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -22,10 +23,10 @@
1 file changed, 73 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index d51d17d877..2878393b17 100644
+index eb46d00060..7bf1aa518d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5778,6 +5778,76 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
+@@ -5558,6 +5558,76 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
vni_v[i] = vni_m[i] & vxlan_v->vni[i];
}
@@ -102,7 +103,7 @@
/**
* Add Geneve item to matcher and to the value.
*
-@@ -7559,8 +7629,9 @@ cnt_err:
+@@ -7226,8 +7296,9 @@ cnt_err:
last_item = MLX5_FLOW_LAYER_VXLAN;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix GTP-U rule conflict' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (165 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx2: fix Tx flow control for HIGIG' " luca.boccassi
` (21 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f65e9ca82d1efcfd9dc2cb1b7873285930907bc8 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 22 Jan 2020 13:28:24 +0800
Subject: [PATCH] net/ice: fix GTP-U rule conflict
[ upstream commit 89a532ba87ccf64bd53be6f2c384d5747d616612 ]
The patch distinguishes fdir rules for GTPU with or without
extend header, so flow to match below patterns can be created
correctly.
1. eth / ipv4 / udp / gtpu teid is 10 / ...
2. eth / ipv4 / udp / gtpu teid is 10 / gtp_psc / ...
3. eth / ipv4 / udp / gtpu / gtp_psc qfi is 10 / ...
4. eth / ipv4 / udp / gtpu teid is 10 / gtp_psc is 10 / ...
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/base/ice_flow.c | 8 ++++----
drivers/net/ice/ice_ethdev.h | 1 +
drivers/net/ice/ice_fdir_filter.c | 27 ++++++++++++++++++++-------
3 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 391df1b540..f1a46e67f5 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -586,10 +586,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
src = (const ice_bitmap_t *)ice_ptypes_gtpc_tid;
ice_and_bitmap(params->ptypes, params->ptypes,
src, ICE_FLOW_PTYPE_MAX);
- } else if (hdrs & ICE_FLOW_SEG_HDR_GTPU) {
- src = (const ice_bitmap_t *)ice_ptypes_gtpu;
- ice_and_bitmap(params->ptypes, params->ptypes,
- src, ICE_FLOW_PTYPE_MAX);
} else if (hdrs & ICE_FLOW_SEG_HDR_GTPU_EH) {
src = (const ice_bitmap_t *)ice_ptypes_gtpu;
ice_and_bitmap(params->ptypes, params->ptypes,
@@ -598,6 +594,10 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
/* Attributes for GTP packet with Extension Header */
params->attr = ice_attr_gtpu_eh;
params->attr_cnt = ARRAY_SIZE(ice_attr_gtpu_eh);
+ } else if (hdrs & ICE_FLOW_SEG_HDR_GTPU_IP) {
+ src = (const ice_bitmap_t *)ice_ptypes_gtpu;
+ ice_and_bitmap(params->ptypes, params->ptypes,
+ src, ICE_FLOW_PTYPE_MAX);
}
}
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index f2186e1ff9..da557a2540 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -254,6 +254,7 @@ enum ice_fdir_tunnel_type {
ICE_FDIR_TUNNEL_TYPE_NONE = 0,
ICE_FDIR_TUNNEL_TYPE_VXLAN,
ICE_FDIR_TUNNEL_TYPE_GTPU,
+ ICE_FDIR_TUNNEL_TYPE_GTPU_EH,
};
struct rte_flow;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 79e4d2edf8..442295e59d 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -133,6 +133,9 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
static struct ice_flow_parser ice_fdir_parser_os;
static struct ice_flow_parser ice_fdir_parser_comms;
+static int
+ice_fdir_is_tunnel_profile(enum ice_fdir_tunnel_type tunnel_type);
+
static const struct rte_memzone *
ice_memzone_reserve(const char *name, uint32_t len, int socket_id)
{
@@ -915,7 +918,7 @@ ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)
{ICE_INSET_TUN_UDP_DST_PORT, ICE_FLOW_FIELD_IDX_UDP_DST_PORT},
{ICE_INSET_TUN_SCTP_SRC_PORT, ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT},
{ICE_INSET_TUN_SCTP_DST_PORT, ICE_FLOW_FIELD_IDX_SCTP_DST_PORT},
- {ICE_INSET_GTPU_TEID, ICE_FLOW_FIELD_IDX_GTPU_EH_TEID},
+ {ICE_INSET_GTPU_TEID, ICE_FLOW_FIELD_IDX_GTPU_IP_TEID},
{ICE_INSET_GTPU_QFI, ICE_FLOW_FIELD_IDX_GTPU_EH_QFI},
};
@@ -928,11 +931,12 @@ ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)
static int
ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
- uint64_t input_set, bool is_tunnel)
+ uint64_t input_set, enum ice_fdir_tunnel_type ttype)
{
struct ice_flow_seg_info *seg;
struct ice_flow_seg_info *seg_tun = NULL;
enum ice_flow_field field[ICE_FLOW_FIELD_IDX_MAX];
+ bool is_tunnel;
int i, ret;
if (!input_set)
@@ -984,9 +988,15 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
- ICE_FLOW_SEG_HDR_GTPU_IP |
- ICE_FLOW_SEG_HDR_IPV4);
+ if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU)
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV4);
+ else if (ttype == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+ ICE_FLOW_SEG_HDR_GTPU_IP |
+ ICE_FLOW_SEG_HDR_IPV4);
+ else
+ PMD_DRV_LOG(ERR, "not supported tunnel type.");
break;
default:
PMD_DRV_LOG(ERR, "not supported filter type.");
@@ -1000,6 +1010,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
ICE_FLOW_FLD_OFF_INVAL, false);
}
+ is_tunnel = ice_fdir_is_tunnel_profile(ttype);
if (!is_tunnel) {
ret = ice_fdir_hw_tbl_conf(pf, pf->main_vsi, pf->fdir.fdir_vsi,
seg, flow, false);
@@ -1224,7 +1235,7 @@ ice_fdir_create_filter(struct ice_adapter *ad,
is_tun = ice_fdir_is_tunnel_profile(filter->tunnel_type);
ret = ice_fdir_input_set_conf(pf, filter->input.flow_type,
- filter->input_set, is_tun);
+ filter->input_set, filter->tunnel_type);
if (ret) {
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1897,6 +1908,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
filter->input.gtpu_data.qfi =
gtp_psc_spec->qfi;
}
+ tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU_EH;
break;
default:
rte_flow_error_set(error, EINVAL,
@@ -1907,7 +1919,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
}
- if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU)
+ if (tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU ||
+ tunnel_type == ICE_FDIR_TUNNEL_TYPE_GTPU_EH)
flow_type = ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER;
filter->tunnel_type = tunnel_type;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.441964349 +0000
+++ 0168-net-ice-fix-GTP-U-rule-conflict.patch 2020-02-11 11:17:38.804008901 +0000
@@ -1,8 +1,10 @@
-From 89a532ba87ccf64bd53be6f2c384d5747d616612 Mon Sep 17 00:00:00 2001
+From f65e9ca82d1efcfd9dc2cb1b7873285930907bc8 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 22 Jan 2020 13:28:24 +0800
Subject: [PATCH] net/ice: fix GTP-U rule conflict
+[ upstream commit 89a532ba87ccf64bd53be6f2c384d5747d616612 ]
+
The patch distinguishes fdir rules for GTPU with or without
extend header, so flow to match below patterns can be created
correctly.
@@ -13,7 +15,6 @@
4. eth / ipv4 / udp / gtpu teid is 10 / gtp_psc is 10 / ...
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
-Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -24,7 +25,7 @@
3 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index eaa7a3b964..02f169808a 100644
+index 391df1b540..f1a46e67f5 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -586,10 +586,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix Tx flow control for HIGIG' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (166 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix GTP-U rule conflict' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " luca.boccassi
` (20 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Kiran Kumar K; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b72c6c1c1860a61a42c7ff45bb9bc3d8b408dfc0 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Thu, 30 Jan 2020 21:53:24 +0530
Subject: [PATCH] net/octeontx2: fix Tx flow control for HIGIG
[ upstream commit 184a3235735a2fae78bcc019c6cd9973426da3f1 ]
Tx flow controlled is disabled in the Ax silicon version due to an errata.
This errata is not applicable for HIGIG Tx flow control, therefore
not enabling in HIGIG case.
Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2")
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_flow_ctrl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/octeontx2/otx2_flow_ctrl.c b/drivers/net/octeontx2/otx2_flow_ctrl.c
index c6d7b1971a..1c6929e764 100644
--- a/drivers/net/octeontx2/otx2_flow_ctrl.c
+++ b/drivers/net/octeontx2/otx2_flow_ctrl.c
@@ -213,6 +213,7 @@ otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
/* To avoid Link credit deadlock on Ax, disable Tx FC if it's enabled */
if (otx2_dev_is_Ax(dev) &&
+ (dev->npc_flow.switch_header_type != OTX2_PRIV_FLAGS_HIGIG) &&
(fc_conf.mode == RTE_FC_FULL || fc_conf.mode == RTE_FC_RX_PAUSE)) {
fc_conf.mode =
(fc_conf.mode == RTE_FC_FULL ||
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.472191938 +0000
+++ 0169-net-octeontx2-fix-Tx-flow-control-for-HIGIG.patch 2020-02-11 11:17:38.804008901 +0000
@@ -1,14 +1,15 @@
-From 184a3235735a2fae78bcc019c6cd9973426da3f1 Mon Sep 17 00:00:00 2001
+From b72c6c1c1860a61a42c7ff45bb9bc3d8b408dfc0 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Thu, 30 Jan 2020 21:53:24 +0530
Subject: [PATCH] net/octeontx2: fix Tx flow control for HIGIG
+[ upstream commit 184a3235735a2fae78bcc019c6cd9973426da3f1 ]
+
Tx flow controlled is disabled in the Ax silicon version due to an errata.
This errata is not applicable for HIGIG Tx flow control, therefore
not enabling in HIGIG case.
Fixes: 602009ee2dfb ("net/octeontx2: support HIGIG2")
-Cc: stable@dpdk.org
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (167 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx2: fix Tx flow control for HIGIG' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " luca.boccassi
` (19 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Sunil Kumar Kori; +Cc: Harman Kalra, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 67b605bdbf61cfccdd4710b5ca2f34100af59e0e Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Wed, 29 Jan 2020 14:47:04 +0530
Subject: [PATCH] net/octeontx: fix memory leak of MAC address table
[ upstream commit 9e399b88ce2f103165512d4005611a1f709deb1d ]
MAC address table is allocated during octeontx device create and
same is used to maintain list of MAC address associated to port.
This table is not getting freed niether in case of error nor during
graceful shutdown of port.
Patch fixes memory required memory for both the cases as mentioned.
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
drivers/net/octeontx/octeontx_ethdev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 679803dd4c..1d022e79a0 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -351,6 +351,10 @@ octeontx_dev_close(struct rte_eth_dev *dev)
rte_free(txq);
}
+ /* Free MAC address table */
+ rte_free(dev->data->mac_addrs);
+ dev->data->mac_addrs = NULL;
+
dev->tx_pkt_burst = NULL;
dev->rx_pkt_burst = NULL;
}
@@ -1099,7 +1103,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
octeontx_log_err("eth_dev->port_id (%d) is diff to orig (%d)",
data->port_id, nic->port_id);
res = -EINVAL;
- goto err;
+ goto free_mac_addrs;
}
/* Update port_id mac to eth_dev */
@@ -1118,6 +1122,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
rte_eth_dev_probing_finish(eth_dev);
return data->port_id;
+free_mac_addrs:
+ rte_free(data->mac_addrs);
err:
if (nic)
octeontx_port_close(nic);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.500458007 +0000
+++ 0170-net-octeontx-fix-memory-leak-of-MAC-address-table.patch 2020-02-11 11:17:38.804008901 +0000
@@ -1,8 +1,10 @@
-From 9e399b88ce2f103165512d4005611a1f709deb1d Mon Sep 17 00:00:00 2001
+From 67b605bdbf61cfccdd4710b5ca2f34100af59e0e Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Wed, 29 Jan 2020 14:47:04 +0530
Subject: [PATCH] net/octeontx: fix memory leak of MAC address table
+[ upstream commit 9e399b88ce2f103165512d4005611a1f709deb1d ]
+
MAC address table is allocated during octeontx device create and
same is used to maintain list of MAC address associated to port.
This table is not getting freed niether in case of error nor during
@@ -11,7 +13,6 @@
Patch fixes memory required memory for both the cases as mentioned.
Fixes: f18b146c498d ("net/octeontx: create ethdev ports")
-Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
@@ -20,7 +21,7 @@
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
-index e23162d8a6..40d9d67dab 100644
+index 679803dd4c..1d022e79a0 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -351,6 +351,10 @@ octeontx_dev_close(struct rte_eth_dev *dev)
@@ -34,7 +35,7 @@
dev->tx_pkt_burst = NULL;
dev->rx_pkt_burst = NULL;
}
-@@ -1143,7 +1147,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1099,7 +1103,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
octeontx_log_err("eth_dev->port_id (%d) is diff to orig (%d)",
data->port_id, nic->port_id);
res = -EINVAL;
@@ -43,7 +44,7 @@
}
/* Update port_id mac to eth_dev */
-@@ -1162,6 +1166,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1118,6 +1122,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
rte_eth_dev_probing_finish(eth_dev);
return data->port_id;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (168 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " luca.boccassi
` (18 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Ori Kam; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6a5a82c6448f2c3009a632042fdcc5d4ed03d6fb Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Thu, 30 Jan 2020 16:59:35 +0000
Subject: [PATCH] app/testpmd: fix uninitialized members of MPLS
[ upstream commit 56d5c1eedf22a1d384120466e6004faf9933d113 ]
Some of the members of the MPLS struct are not initialized.
This commit init the uninitialized members.
Coverity issue: 325735
Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/cmdline_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 3cf05b5072..f059978730 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -4534,7 +4534,9 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
struct rte_flow_item_gre gre = {
.protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST),
};
- struct rte_flow_item_mpls mpls;
+ struct rte_flow_item_mpls mpls = {
+ .ttl = 0,
+ };
uint8_t *header;
int ret;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.527794713 +0000
+++ 0171-app-testpmd-fix-uninitialized-members-of-MPLS.patch 2020-02-11 11:17:38.808008976 +0000
@@ -1,14 +1,15 @@
-From 56d5c1eedf22a1d384120466e6004faf9933d113 Mon Sep 17 00:00:00 2001
+From 6a5a82c6448f2c3009a632042fdcc5d4ed03d6fb Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Thu, 30 Jan 2020 16:59:35 +0000
Subject: [PATCH] app/testpmd: fix uninitialized members of MPLS
+[ upstream commit 56d5c1eedf22a1d384120466e6004faf9933d113 ]
+
Some of the members of the MPLS struct are not initialized.
This commit init the uninitialized members.
Coverity issue: 325735
Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
-Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,10 +18,10 @@
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
-index e99e24c29f..c2cc4c57b8 100644
+index 3cf05b5072..f059978730 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
-@@ -4576,7 +4576,9 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
+@@ -4534,7 +4534,9 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
struct rte_flow_item_gre gre = {
.protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST),
};
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (169 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix memory regions release deadlock' " luca.boccassi
` (17 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Raslan Darawsheh; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d85f20f12eda4db0b25696d26a0c64db990eb7d3 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 4 Feb 2020 17:10:51 +0200
Subject: [PATCH] net/failsafe: fix reported hash key size in device info
[ upstream commit f9dd7539423b32c17c5b411260e696570fec4e2c ]
Hash key size is missing from reported device info.
This fills the hash key size in device info.
Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/failsafe/failsafe_ops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index a87e49b97d..50f2aca4e7 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1068,6 +1068,8 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
info->rx_queue_offload_capa &= sinfo->rx_queue_offload_capa;
info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;
+ info->hash_key_size = RTE_MIN(info->hash_key_size,
+ sinfo->hash_key_size);
}
/**
@@ -1117,6 +1119,7 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
infos->max_hash_mac_addrs = UINT32_MAX;
infos->max_vfs = UINT16_MAX;
infos->max_vmdq_pools = UINT16_MAX;
+ infos->hash_key_size = UINT8_MAX;
/*
* Set of capabilities that can be verified upon
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.567830635 +0000
+++ 0172-net-failsafe-fix-reported-hash-key-size-in-device-in.patch 2020-02-11 11:17:38.812009050 +0000
@@ -1,13 +1,14 @@
-From f9dd7539423b32c17c5b411260e696570fec4e2c Mon Sep 17 00:00:00 2001
+From d85f20f12eda4db0b25696d26a0c64db990eb7d3 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 4 Feb 2020 17:10:51 +0200
Subject: [PATCH] net/failsafe: fix reported hash key size in device info
+[ upstream commit f9dd7539423b32c17c5b411260e696570fec4e2c ]
+
Hash key size is missing from reported device info.
This fills the hash key size in device info.
Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")
-Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix memory regions release deadlock' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (170 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " luca.boccassi
@ 2020-02-11 11:21 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'net/mlx5: fix dirty array of actions' " luca.boccassi
` (16 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:21 UTC (permalink / raw)
To: Michael Baum; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f6f7ba7a7c7567211b779e7ff2bb816b10c3554b Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 4 Feb 2020 15:36:09 +0200
Subject: [PATCH] net/mlx5: fix memory regions release deadlock
[ upstream commit 4f8e6befe7c6045b082dc5b95afd5a1c00e30bf0 ]
The mpx5 PMD maintains the list of devices for those the memory
operation callback routines must be invoked to keep the device MRs (MR
is the entity backing the hardware DMA transactions) consistent with the
mapped memory.
Each device context in the list is protected with dedicated lock on per
device basis, which might be taken inside the callback routine.
When device is closing the PMD frees all MRs by calling
mlx5_mr_release(), that might call rte_free() under the taken device
lock. If this rte_free call triggers the entire memory segment freeing
it, in its turn, invokes the callback routine and attempt to take the
lock inside this one causes the deadlock.
The patch proposes the remove the device from the callback list first
and then call mlx5_mr_release() and free the remaining device MRs
explicitly.
Fixes: 0e3d0525b2f2 ("net/mlx5: fix memory event callback list")
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 50960c91ce..646d50285b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -673,12 +673,12 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
assert(rte_eal_process_type() == RTE_PROC_PRIMARY);
if (--sh->refcnt)
goto exit;
- /* Release created Memory Regions. */
- mlx5_mr_release(sh);
/* Remove from memory callback device list. */
rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock);
LIST_REMOVE(sh, mem_event_cb);
rte_rwlock_write_unlock(&mlx5_shared_data->mem_event_rwlock);
+ /* Release created Memory Regions. */
+ mlx5_mr_release(sh);
/* Remove context from the global device list. */
LIST_REMOVE(sh, next);
/*
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.595538811 +0000
+++ 0173-net-mlx5-fix-memory-regions-release-deadlock.patch 2020-02-11 11:17:38.812009050 +0000
@@ -1,8 +1,10 @@
-From 4f8e6befe7c6045b082dc5b95afd5a1c00e30bf0 Mon Sep 17 00:00:00 2001
+From f6f7ba7a7c7567211b779e7ff2bb816b10c3554b Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 4 Feb 2020 15:36:09 +0200
Subject: [PATCH] net/mlx5: fix memory regions release deadlock
+[ upstream commit 4f8e6befe7c6045b082dc5b95afd5a1c00e30bf0 ]
+
The mpx5 PMD maintains the list of devices for those the memory
operation callback routines must be invoked to keep the device MRs (MR
is the entity backing the hardware DMA transactions) consistent with the
@@ -21,7 +23,6 @@
explicitly.
Fixes: 0e3d0525b2f2 ("net/mlx5: fix memory event callback list")
-Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -31,11 +32,11 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 7a79722fb7..b4ec6cba1a 100644
+index 50960c91ce..646d50285b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
-@@ -679,12 +679,12 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
- MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
+@@ -673,12 +673,12 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
+ assert(rte_eal_process_type() == RTE_PROC_PRIMARY);
if (--sh->refcnt)
goto exit;
- /* Release created Memory Regions. */
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix dirty array of actions' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (171 preceding siblings ...)
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix memory regions release deadlock' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'net/virtio-user: do not reset virtqueues for split ring' " luca.boccassi
` (15 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Dekel Peled; +Cc: Matan Azrad, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9aab6dd691a5d3f3555e8c6f3ad0ffb1198ed98e Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 5 Feb 2020 08:42:02 +0200
Subject: [PATCH] net/mlx5: fix dirty array of actions
[ upstream commit ff44839929d0bea529be581ba784a48d085ab893 ]
Previous patch changed the format of struct
mlx5_flow_dv_modify_hdr_resource, to use a flexible array for
modification actions.
In __flow_dv_translate() a union was defined with item of this struct,
and an array of maximal possible size.
Array elements are filled in several functions.
In function flow_dv_convert_action_set_reg(), array element is filled
partially, while the other fields of this array element are left
uninitialized.
This may cause failure of flow_dv_modify_hdr_resource_register()
when calling driver function with the 'dirty' array.
This patch updates flow_dv_convert_action_set_reg(), setting the
selected array element fields while clearing the other fields.
Other functions that fill the same array elements are also updated
for clarity and proofing future use.
Fixes: 024e95759c16 ("net/mlx5: fix modify actions support limitation")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7bf1aa518d..df5e279ff4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -380,10 +380,12 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
off_b - __builtin_clz(mask);
assert(size_b);
size_b = size_b == sizeof(uint32_t) * CHAR_BIT ? 0 : size_b;
- actions[i].action_type = type;
- actions[i].field = field->id;
- actions[i].offset = off_b;
- actions[i].length = size_b;
+ actions[i] = (struct mlx5_modification_cmd) {
+ .action_type = type,
+ .field = field->id,
+ .offset = off_b,
+ .length = size_b,
+ };
/* Convert entire record to expected big-endian format. */
actions[i].data0 = rte_cpu_to_be_32(actions[i].data0);
if (type == MLX5_MODIFICATION_TYPE_COPY) {
@@ -573,10 +575,12 @@ flow_dv_convert_action_modify_vlan_vid
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
- actions[i].action_type = MLX5_MODIFICATION_TYPE_SET;
- actions[i].field = field->id;
- actions[i].length = field->size;
- actions[i].offset = field->offset;
+ actions[i] = (struct mlx5_modification_cmd) {
+ .action_type = MLX5_MODIFICATION_TYPE_SET,
+ .field = field->id,
+ .length = field->size,
+ .offset = field->offset,
+ };
actions[i].data0 = rte_cpu_to_be_32(actions[i].data0);
actions[i].data1 = conf->vlan_vid;
actions[i].data1 = actions[i].data1 << 16;
@@ -908,8 +912,10 @@ flow_dv_convert_action_set_reg
"too many items to modify");
assert(conf->id != REG_NONE);
assert(conf->id < RTE_DIM(reg_to_field));
- actions[i].action_type = MLX5_MODIFICATION_TYPE_SET;
- actions[i].field = reg_to_field[conf->id];
+ actions[i] = (struct mlx5_modification_cmd) {
+ .action_type = MLX5_MODIFICATION_TYPE_SET,
+ .field = reg_to_field[conf->id],
+ };
actions[i].data0 = rte_cpu_to_be_32(actions[i].data0);
actions[i].data1 = rte_cpu_to_be_32(conf->data);
++i;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.625373626 +0000
+++ 0174-net-mlx5-fix-dirty-array-of-actions.patch 2020-02-11 11:17:38.820009200 +0000
@@ -1,8 +1,10 @@
-From ff44839929d0bea529be581ba784a48d085ab893 Mon Sep 17 00:00:00 2001
+From 9aab6dd691a5d3f3555e8c6f3ad0ffb1198ed98e Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 5 Feb 2020 08:42:02 +0200
Subject: [PATCH] net/mlx5: fix dirty array of actions
+[ upstream commit ff44839929d0bea529be581ba784a48d085ab893 ]
+
Previous patch changed the format of struct
mlx5_flow_dv_modify_hdr_resource, to use a flexible array for
modification actions.
@@ -21,7 +23,6 @@
for clarity and proofing future use.
Fixes: 024e95759c16 ("net/mlx5: fix modify actions support limitation")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -31,12 +32,12 @@
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 2878393b17..3daabd3e68 100644
+index 7bf1aa518d..df5e279ff4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -385,10 +385,12 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
+@@ -380,10 +380,12 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
off_b - __builtin_clz(mask);
- MLX5_ASSERT(size_b);
+ assert(size_b);
size_b = size_b == sizeof(uint32_t) * CHAR_BIT ? 0 : size_b;
- actions[i].action_type = type;
- actions[i].field = field->id;
@@ -51,7 +52,7 @@
/* Convert entire record to expected big-endian format. */
actions[i].data0 = rte_cpu_to_be_32(actions[i].data0);
if (type == MLX5_MODIFICATION_TYPE_COPY) {
-@@ -578,10 +580,12 @@ flow_dv_convert_action_modify_vlan_vid
+@@ -573,10 +575,12 @@ flow_dv_convert_action_modify_vlan_vid
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"too many items to modify");
@@ -68,10 +69,10 @@
actions[i].data0 = rte_cpu_to_be_32(actions[i].data0);
actions[i].data1 = conf->vlan_vid;
actions[i].data1 = actions[i].data1 << 16;
-@@ -913,8 +917,10 @@ flow_dv_convert_action_set_reg
+@@ -908,8 +912,10 @@ flow_dv_convert_action_set_reg
"too many items to modify");
- MLX5_ASSERT(conf->id != REG_NONE);
- MLX5_ASSERT(conf->id < RTE_DIM(reg_to_field));
+ assert(conf->id != REG_NONE);
+ assert(conf->id < RTE_DIM(reg_to_field));
- actions[i].action_type = MLX5_MODIFICATION_TYPE_SET;
- actions[i].field = reg_to_field[conf->id];
+ actions[i] = (struct mlx5_modification_cmd) {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: do not reset virtqueues for split ring' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (172 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'net/mlx5: fix dirty array of actions' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " luca.boccassi
` (14 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cde00e7bac4a17d2991f16d008b46a4be00a4295 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 5 Feb 2020 10:11:08 +0800
Subject: [PATCH] net/virtio-user: do not reset virtqueues for split ring
[ upstream commit 92771257316f04157a863885979397731e755096 ]
Add missing braces to avoid resetting virtqueues unconditionally
during reconnection.
Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index f3b35d1bdd..e61af40683 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -89,10 +89,11 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
dev->features &= dev->device_features;
/* For packed ring, resetting queues is required in reconnection. */
- if (vtpci_packed_queue(hw))
+ if (vtpci_packed_queue(hw)) {
PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
" when packed ring reconnecting.");
virtio_user_reset_queues_packed(eth_dev);
+ }
ret = virtio_user_start_device(dev);
if (ret < 0)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.659429112 +0000
+++ 0175-net-virtio-user-do-not-reset-virtqueues-for-split-ri.patch 2020-02-11 11:17:38.820009200 +0000
@@ -1,13 +1,14 @@
-From 92771257316f04157a863885979397731e755096 Mon Sep 17 00:00:00 2001
+From cde00e7bac4a17d2991f16d008b46a4be00a4295 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 5 Feb 2020 10:11:08 +0800
Subject: [PATCH] net/virtio-user: do not reset virtqueues for split ring
+[ upstream commit 92771257316f04157a863885979397731e755096 ]
+
Add missing braces to avoid resetting virtqueues unconditionally
during reconnection.
Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
-Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: fix crash on port deletion' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (173 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'net/virtio-user: do not reset virtqueues for split ring' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " luca.boccassi
` (13 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Zhike Wang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a8e274db1b0a8cf241d8a95f4e87174e56eb7ea5 Mon Sep 17 00:00:00 2001
From: Zhike Wang <wangzhike@jd.com>
Date: Thu, 16 Jan 2020 10:07:37 +0800
Subject: [PATCH] vhost: fix crash on port deletion
[ upstream commit 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b ]
The vhost_user_read_cb() and rte_vhost_driver_unregister()
can be called at the same time by 2 threads. Eg thread1
calls vhost_user_read_cb() and removes the vsocket from
conn_list, then thread2 calls rte_vhost_driver_unregister()
and frees the vsocket since it is NOT in the conn_list.
So thread1 will access invalid memory when trying to
reconnect.
The fix is to move the "removing of vsocket from conn_list"
to end of the vhost_user_read_cb(), then avoid the race
condition.
The core trace is:
Program terminated with signal 11, Segmentation fault.
Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Signed-off-by: Zhike Wang <wangzhike@jd.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/socket.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 785cea46e5..26b9bb5534 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -318,16 +318,16 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
vhost_destroy_device(conn->vid);
+ if (vsocket->reconnect) {
+ create_unix_socket(vsocket);
+ vhost_user_start_client(vsocket);
+ }
+
pthread_mutex_lock(&vsocket->conn_mutex);
TAILQ_REMOVE(&vsocket->conn_list, conn, next);
pthread_mutex_unlock(&vsocket->conn_mutex);
free(conn);
-
- if (vsocket->reconnect) {
- create_unix_socket(vsocket);
- vhost_user_start_client(vsocket);
- }
}
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.687407231 +0000
+++ 0176-vhost-fix-crash-on-port-deletion.patch 2020-02-11 11:17:38.820009200 +0000
@@ -1,8 +1,10 @@
-From 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b Mon Sep 17 00:00:00 2001
+From a8e274db1b0a8cf241d8a95f4e87174e56eb7ea5 Mon Sep 17 00:00:00 2001
From: Zhike Wang <wangzhike@jd.com>
Date: Thu, 16 Jan 2020 10:07:37 +0800
Subject: [PATCH] vhost: fix crash on port deletion
+[ upstream commit 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b ]
+
The vhost_user_read_cb() and rte_vhost_driver_unregister()
can be called at the same time by 2 threads. Eg thread1
calls vhost_user_read_cb() and removes the vsocket from
@@ -19,7 +21,6 @@
Program terminated with signal 11, Segmentation fault.
Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
-Cc: stable@dpdk.org
Signed-off-by: Zhike Wang <wangzhike@jd.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -28,7 +29,7 @@
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 9740fb3403..85c64485c2 100644
+index 785cea46e5..26b9bb5534 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -318,16 +318,16 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: do not treat empty socket message as error' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (174 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: flush shadow Tx if no more packets' " luca.boccassi
` (12 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Vitaliy Mysak; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d4cd6ac99c71a8acc6f0fd0aa43fcd16fc325cb1 Mon Sep 17 00:00:00 2001
From: Vitaliy Mysak <vitaliy.mysak@intel.com>
Date: Thu, 30 Jan 2020 09:05:39 +0100
Subject: [PATCH] vhost: do not treat empty socket message as error
[ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ]
According to recvmsg() specification, 0 is a valid
return code when client is disconnecting.
Therefore, it should not be reported as error, unless there
are other dependencies that require message to not be empty.
But there are none, since the next immediate caller of recvmsg()
reports "vhost peer closed" info (not error) when message is empty.
This patch changes return code check for recvmsg() so that
misleading error message is not printed when the code is 0.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/socket.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 26b9bb5534..c9322707e7 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -127,7 +127,8 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
ret = recvmsg(sockfd, &msgh, 0);
if (ret <= 0) {
- RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
+ if (ret)
+ RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
return ret;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.715493262 +0000
+++ 0177-vhost-do-not-treat-empty-socket-message-as-error.patch 2020-02-11 11:17:38.824009275 +0000
@@ -1,8 +1,10 @@
-From bedf87c521902d1caeb0974fe9d3344584b849b5 Mon Sep 17 00:00:00 2001
+From d4cd6ac99c71a8acc6f0fd0aa43fcd16fc325cb1 Mon Sep 17 00:00:00 2001
From: Vitaliy Mysak <vitaliy.mysak@intel.com>
Date: Thu, 30 Jan 2020 09:05:39 +0100
Subject: [PATCH] vhost: do not treat empty socket message as error
+[ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ]
+
According to recvmsg() specification, 0 is a valid
return code when client is disconnecting.
Therefore, it should not be reported as error, unless there
@@ -14,7 +16,6 @@
misleading error message is not printed when the code is 0.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
-Cc: stable@dpdk.org
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -23,16 +24,16 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 85c64485c2..7c80121790 100644
+index 26b9bb5534..c9322707e7 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -127,7 +127,8 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
ret = recvmsg(sockfd, &msgh, 0);
if (ret <= 0) {
-- VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
+- RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
+ if (ret)
-+ VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
++ RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
return ret;
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: flush shadow Tx if no more packets' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (175 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " luca.boccassi
` (11 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Eugenio Pérez; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 474437bad30f58321ab8723f175ad5bc862afb8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
Date: Wed, 29 Jan 2020 20:33:10 +0100
Subject: [PATCH] vhost: flush shadow Tx if no more packets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit cdf1dc5e6a361df17d081e3e975cc586a4b7d68d ]
The current implementation of vhost_net in packed vring tries to fill
the shadow vector before send any actual changes to the guest. While
this can be beneficial for the throughput, it conflicts with some
bufferfloats methods like the linux kernel napi, that stops
transmitting packets if there are too much bytes/buffers in the
driver.
To solve it, we flush the shadow packets at the end of
virtio_dev_tx_packed if we have starved the vring, i.e. the next
buffer is not available for the device.
Since this last check can be expensive because of the atomic, we only
check it if we have not obtained the expected "count" packets. If it
happens to obtain "count" packets and there is no more available
packets the caller needs to keep call virtio_dev_tx_packed again.
Fixes: 31d6c6a5b820 ("vhost: optimize packed ring dequeue")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/virtio_net.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 21c311732a..ac2842b2d2 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2133,6 +2133,20 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,
return pkt_idx;
}
+static __rte_always_inline bool
+next_desc_is_avail(const struct vhost_virtqueue *vq)
+{
+ bool wrap_counter = vq->avail_wrap_counter;
+ uint16_t next_used_idx = vq->last_used_idx + 1;
+
+ if (next_used_idx >= vq->size) {
+ next_used_idx -= vq->size;
+ wrap_counter ^= 1;
+ }
+
+ return desc_is_avail(&vq->desc_packed[next_used_idx], wrap_counter);
+}
+
static __rte_noinline uint16_t
virtio_dev_tx_packed(struct virtio_net *dev,
struct vhost_virtqueue *vq,
@@ -2165,9 +2179,20 @@ virtio_dev_tx_packed(struct virtio_net *dev,
} while (remained);
- if (vq->shadow_used_idx)
+ if (vq->shadow_used_idx) {
do_data_copy_dequeue(vq);
+ if (remained && !next_desc_is_avail(vq)) {
+ /*
+ * The guest may be waiting to TX some buffers to
+ * enqueue more to avoid bufferfloat, so we try to
+ * reduce latency here.
+ */
+ vhost_flush_dequeue_shadow_packed(dev, vq);
+ vhost_vring_call_packed(dev, vq);
+ }
+ }
+
return pkt_idx;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.742544050 +0000
+++ 0178-vhost-flush-shadow-Tx-if-no-more-packets.patch 2020-02-11 11:17:38.824009275 +0000
@@ -1,4 +1,4 @@
-From cdf1dc5e6a361df17d081e3e975cc586a4b7d68d Mon Sep 17 00:00:00 2001
+From 474437bad30f58321ab8723f175ad5bc862afb8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
Date: Wed, 29 Jan 2020 20:33:10 +0100
Subject: [PATCH] vhost: flush shadow Tx if no more packets
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit cdf1dc5e6a361df17d081e3e975cc586a4b7d68d ]
+
The current implementation of vhost_net in packed vring tries to fill
the shadow vector before send any actual changes to the guest. While
this can be beneficial for the throughput, it conflicts with some
@@ -23,7 +25,6 @@
packets the caller needs to keep call virtio_dev_tx_packed again.
Fixes: 31d6c6a5b820 ("vhost: optimize packed ring dequeue")
-Cc: stable@dpdk.org
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -32,7 +33,7 @@
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 73bf98bd93..37c47c7dc0 100644
+index 21c311732a..ac2842b2d2 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2133,6 +2133,20 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost/crypto: fix fetch size' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (176 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: flush shadow Tx if no more packets' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " luca.boccassi
` (10 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Fan Zhang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c618ec477ab89e95b1146efcf4c845fec017032c Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 29 Jan 2020 10:24:22 +0000
Subject: [PATCH] vhost/crypto: fix fetch size
[ upstream commit 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 ]
This patch fixes the incorrect rte_vhost_crypto_fetch_requests
return value.
Coverity issue: 343401
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_crypto.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 684fddc30b..68911972b6 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -1539,18 +1539,18 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
if (unlikely(dev == NULL)) {
VC_LOG_ERR("Invalid vid %i", vid);
- return -EINVAL;
+ return 0;
}
if (unlikely(qid >= VHOST_MAX_QUEUE_PAIRS)) {
VC_LOG_ERR("Invalid qid %u", qid);
- return -EINVAL;
+ return 0;
}
vcrypto = (struct vhost_crypto *)dev->extern_data;
if (unlikely(vcrypto == NULL)) {
VC_LOG_ERR("Cannot find required data, is it initialized?");
- return -ENOENT;
+ return 0;
}
vq = dev->virtqueue[qid];
@@ -1572,7 +1572,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
if (unlikely(rte_mempool_get_bulk(vcrypto->mbuf_pool,
(void **)mbufs, count * 2) < 0)) {
VC_LOG_ERR("Insufficient memory");
- return -ENOMEM;
+ return 0;
}
for (i = 0; i < count; i++) {
@@ -1602,7 +1602,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
if (unlikely(rte_mempool_get_bulk(vcrypto->mbuf_pool,
(void **)mbufs, count) < 0)) {
VC_LOG_ERR("Insufficient memory");
- return -ENOMEM;
+ return 0;
}
for (i = 0; i < count; i++) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.771527875 +0000
+++ 0179-vhost-crypto-fix-fetch-size.patch 2020-02-11 11:17:38.824009275 +0000
@@ -1,14 +1,15 @@
-From 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 Mon Sep 17 00:00:00 2001
+From c618ec477ab89e95b1146efcf4c845fec017032c Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 29 Jan 2020 10:24:22 +0000
Subject: [PATCH] vhost/crypto: fix fetch size
+[ upstream commit 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 ]
+
This patch fixes the incorrect rte_vhost_crypto_fetch_requests
return value.
Coverity issue: 343401
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
-Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (177 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " luca.boccassi
` (9 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Adrian Moreno; +Cc: Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8e1c060d3fe59027f40cc00f78fe4043b62bb1fa Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Sat, 25 Jan 2020 09:52:16 +0100
Subject: [PATCH] vhost: fix packed virtqueue ready condition
[ upstream commit c5a910dd92ecbad24f86b4c59b4ff8105b5149fd ]
Consider a virtqueue ready when, apart from the descriptor area,
both event suppression areas have been mapped.
Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/vhost_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 0cfb8b792b..1c3a1a89fc 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1298,7 +1298,8 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq)
return false;
if (vq_is_packed(dev))
- rings_ok = !!vq->desc_packed;
+ rings_ok = vq->desc_packed && vq->driver_event &&
+ vq->device_event;
else
rings_ok = vq->desc && vq->avail && vq->used;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.800365311 +0000
+++ 0180-vhost-fix-packed-virtqueue-ready-condition.patch 2020-02-11 11:17:38.828009350 +0000
@@ -1,13 +1,14 @@
-From c5a910dd92ecbad24f86b4c59b4ff8105b5149fd Mon Sep 17 00:00:00 2001
+From 8e1c060d3fe59027f40cc00f78fe4043b62bb1fa Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Sat, 25 Jan 2020 09:52:16 +0100
Subject: [PATCH] vhost: fix packed virtqueue ready condition
+[ upstream commit c5a910dd92ecbad24f86b4c59b4ff8105b5149fd ]
+
Consider a virtqueue ready when, apart from the descriptor area,
both event suppression areas have been mapped.
Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")
-Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -16,7 +17,7 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 69b84a8820..c9cc4d6489 100644
+index 0cfb8b792b..1c3a1a89fc 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1298,7 +1298,8 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (178 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " luca.boccassi
` (8 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Ilja Van Sprundel, Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 43bbd5262003581cadec3b1068ffdb62a4bd3cb0 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 16 Jan 2020 11:44:27 +0100
Subject: [PATCH] vhost: catch overflow causing mmap of size 0
[ upstream commit c6420a36328b9c6b71770aaa982abacd0e2440b8 ]
This patch catches an overflow that could happen if an
invalid region size or page alignment is provided by the
guest via the VHOST_USER_SET_MEM_TABLE request.
If the sum of the size to mmap and the alignment overflows
uint64_t, then RTE_ALIGN_CEIL(mmap_size, alignment) macro
will return 0. This value was passed as is as size argument
to mmap().
While kernel handling of mmap() syscall returns an error
if size is 0, it is better to catch it earlier and provide
a meaningful error log.
Fixes: ec09c280b839 ("vhost: fix mmap not aligned with hugepage size")
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/vhost_user.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 1c3a1a89fc..4312e5e536 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1145,6 +1145,21 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
goto err_mmap;
}
mmap_size = RTE_ALIGN_CEIL(mmap_size, alignment);
+ if (mmap_size == 0) {
+ /*
+ * It could happen if initial mmap_size + alignment
+ * overflows the sizeof uint64, which could happen if
+ * either mmap_size or alignment value is wrong.
+ *
+ * mmap() kernel implementation would return an error,
+ * but better catch it before and provide useful info
+ * in the logs.
+ */
+ RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "
+ "or alignment (0x%" PRIx64 ") is invalid\n",
+ reg->size + mmap_offset, alignment);
+ goto err_mmap;
+ }
populate = (dev->dequeue_zero_copy) ? MAP_POPULATE : 0;
mmap_addr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.830085085 +0000
+++ 0181-vhost-catch-overflow-causing-mmap-of-size-0.patch 2020-02-11 11:17:38.832009425 +0000
@@ -1,8 +1,10 @@
-From c6420a36328b9c6b71770aaa982abacd0e2440b8 Mon Sep 17 00:00:00 2001
+From 43bbd5262003581cadec3b1068ffdb62a4bd3cb0 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 16 Jan 2020 11:44:27 +0100
Subject: [PATCH] vhost: catch overflow causing mmap of size 0
+[ upstream commit c6420a36328b9c6b71770aaa982abacd0e2440b8 ]
+
This patch catches an overflow that could happen if an
invalid region size or page alignment is provided by the
guest via the VHOST_USER_SET_MEM_TABLE request.
@@ -17,7 +19,6 @@
a meaningful error log.
Fixes: ec09c280b839 ("vhost: fix mmap not aligned with hugepage size")
-Cc: stable@dpdk.org
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -27,7 +28,7 @@
1 file changed, 15 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index c9cc4d6489..9f14ea6676 100644
+index 1c3a1a89fc..4312e5e536 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1145,6 +1145,21 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -44,7 +45,7 @@
+ * but better catch it before and provide useful info
+ * in the logs.
+ */
-+ VHOST_LOG_CONFIG(ERR, "mmap size (0x%" PRIx64 ") "
++ RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "
+ "or alignment (0x%" PRIx64 ") is invalid\n",
+ reg->size + mmap_offset, alignment);
+ goto err_mmap;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'crypto/armv8: fix clang build' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (179 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA conversions' " luca.boccassi
` (7 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Honnappa Nagarahalli, Gavin Hu, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 51ccb28908ac9c69c6ba7d3e696a756ab8253be3 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 23 Jan 2020 11:45:57 +0800
Subject: [PATCH] crypto/armv8: fix clang build
[ upstream commit 94b686e5026e2612038b8ea5382e22729553738a ]
1. Clang requires braces around initialization of subobject.
2. Clang complains implicit conversion of enumeration type.
Trapped issue with Clang version 8.0 and CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO
was set.
Error messages:
rte_armv8_pmd.c:144:2: error: suggest braces around initialization of
subobject [-Werror,-Wmissing-braces]
NULL
^~~~
{ }
/usr/lib/llvm-8/lib/clang/8.0.0/include/stddef.h:105:16: note: expanded
from macro 'NULL'
^~~~~~~~~~
rte_armv8_pmd.c:429:21: error: implicit conversion from enumeration
type 'enum rte_crypto_cipher_operation' to different enumeration type
'enum armv8_crypto_cipher_operation' [-Werror,-Wenum-conversion]
cop = sess->cipher.direction;
~ ~~~~~~~~~~~~~^~~~~~~~~
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/armv8/rte_armv8_pmd.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 7dc83e69e1..fd3093315a 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -84,12 +84,12 @@ crypto_op_ca_encrypt = {
static const crypto_func_tbl_t
crypto_op_ca_decrypt = {
- NULL
+ { {NULL} }
};
static const crypto_func_tbl_t
crypto_op_ac_encrypt = {
- NULL
+ { {NULL} }
};
static const crypto_func_tbl_t
@@ -369,7 +369,16 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,
/* Select cipher key */
sess->cipher.key.length = cipher_xform->cipher.key.length;
/* Set cipher direction */
- cop = sess->cipher.direction;
+ switch (sess->cipher.direction) {
+ case RTE_CRYPTO_CIPHER_OP_ENCRYPT:
+ cop = ARMV8_CRYPTO_CIPHER_OP_ENCRYPT;
+ break;
+ case RTE_CRYPTO_CIPHER_OP_DECRYPT:
+ cop = ARMV8_CRYPTO_CIPHER_OP_DECRYPT;
+ break;
+ default:
+ return -ENOTSUP;
+ }
/* Set cipher algorithm */
calg = cipher_xform->cipher.algo;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.859798132 +0000
+++ 0182-crypto-armv8-fix-clang-build.patch 2020-02-11 11:17:38.832009425 +0000
@@ -1,8 +1,10 @@
-From 94b686e5026e2612038b8ea5382e22729553738a Mon Sep 17 00:00:00 2001
+From 51ccb28908ac9c69c6ba7d3e696a756ab8253be3 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 23 Jan 2020 11:45:57 +0800
Subject: [PATCH] crypto/armv8: fix clang build
+[ upstream commit 94b686e5026e2612038b8ea5382e22729553738a ]
+
1. Clang requires braces around initialization of subobject.
2. Clang complains implicit conversion of enumeration type.
@@ -24,7 +26,6 @@
~ ~~~~~~~~~~~~~^~~~~~~~~
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
-Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -35,10 +36,10 @@
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
-index fd81408968..d2b7ab5e03 100644
+index 7dc83e69e1..fd3093315a 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
-@@ -86,12 +86,12 @@ crypto_op_ca_encrypt = {
+@@ -84,12 +84,12 @@ crypto_op_ca_encrypt = {
static const crypto_func_tbl_t
crypto_op_ca_decrypt = {
@@ -53,7 +54,7 @@
};
static const crypto_func_tbl_t
-@@ -377,7 +377,16 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,
+@@ -369,7 +369,16 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,
/* Select cipher key */
sess->cipher.key.length = cipher_xform->cipher.key.length;
/* Set cipher direction */
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA conversions' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (180 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " luca.boccassi
` (6 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b3bcd0abdaf0eb57c462e6add749944d467288fc Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 27 Jan 2020 14:37:23 +0530
Subject: [PATCH] crypto/dpaa_sec: fix IOVA conversions
[ upstream commit ec8615607f6e4e76b6234668dfa60f72a1c0e582 ]
DPAA sec driver is using virtual to physical address
translation in its data path and driver is using
dpaax_iova_table_update() API in every address translation
which is very costly.
This patch moves dpaax_iova_table_update() calling to rte_dpaa_mem_ptov(),
only if it fails to found translation from DPAAX table.
Fixes: 12e5842945bf ("crypto/dpaa_sec: fix IOVA table")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/bus/dpaa/rte_dpaa_bus.h | 18 ++++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 117 +++++++++++-----------------
drivers/crypto/dpaa_sec/meson.build | 2 +-
3 files changed, 64 insertions(+), 73 deletions(-)
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 9bf2cd9d68..373aca9785 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -132,7 +132,23 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
}
/* If not, Fallback to full memseg list searching */
- return rte_mem_iova2virt(paddr);
+ va = rte_mem_iova2virt(paddr);
+
+ dpaax_iova_table_update(paddr, va, RTE_CACHE_LINE_SIZE);
+
+ return va;
+}
+
+static inline rte_iova_t
+rte_dpaa_mem_vtop(void *vaddr)
+{
+ const struct rte_memseg *ms;
+
+ ms = rte_mem_virt2memseg(vaddr, NULL);
+ if (ms)
+ return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr);
+
+ return (size_t)NULL;
}
/**
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index e0b307cecd..df684d2654 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -94,31 +94,6 @@ dpaa_sec_alloc_ctx(dpaa_sec_session *ses, int sg_count)
return ctx;
}
-static inline rte_iova_t
-dpaa_mem_vtop(void *vaddr)
-{
- const struct rte_memseg *ms;
-
- ms = rte_mem_virt2memseg(vaddr, NULL);
- if (ms) {
- dpaax_iova_table_update(ms->iova, ms->addr, ms->len);
- return ms->iova + RTE_PTR_DIFF(vaddr, ms->addr);
- }
- return (size_t)NULL;
-}
-
-static inline void *
-dpaa_mem_ptov(rte_iova_t paddr)
-{
- void *va;
-
- va = (void *)dpaax_iova_table_get_va(paddr);
- if (likely(va))
- return va;
-
- return rte_mem_iova2virt(paddr);
-}
-
static void
ern_sec_fq_handler(struct qman_portal *qm __rte_unused,
struct qman_fq *fq,
@@ -183,7 +158,7 @@ dqrr_out_fq_cb_rx(struct qman_portal *qm __always_unused,
* sg[0] is for output
* sg[1] for input
*/
- job = dpaa_mem_ptov(qm_fd_addr_get64(fd));
+ job = rte_dpaa_mem_ptov(qm_fd_addr_get64(fd));
ctx = container_of(job, struct dpaa_sec_op_ctx, job);
ctx->fd_status = fd->status;
@@ -304,12 +279,12 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
if (!(cdb->sh_desc[2] & 1) && cipherdata.keylen) {
cipherdata.key =
- (size_t)dpaa_mem_vtop((void *)(size_t)cipherdata.key);
+ (size_t)rte_dpaa_mem_vtop((void *)(size_t)cipherdata.key);
cipherdata.key_type = RTA_DATA_PTR;
}
if (!(cdb->sh_desc[2] & (1 << 1)) && authdata.keylen) {
authdata.key =
- (size_t)dpaa_mem_vtop((void *)(size_t)authdata.key);
+ (size_t)rte_dpaa_mem_vtop((void *)(size_t)authdata.key);
authdata.key_type = RTA_DATA_PTR;
}
@@ -405,14 +380,14 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
if (cdb->sh_desc[2] & 1)
cipherdata.key_type = RTA_DATA_IMM;
else {
- cipherdata.key = (size_t)dpaa_mem_vtop(
+ cipherdata.key = (size_t)rte_dpaa_mem_vtop(
(void *)(size_t)cipherdata.key);
cipherdata.key_type = RTA_DATA_PTR;
}
if (cdb->sh_desc[2] & (1<<1))
authdata.key_type = RTA_DATA_IMM;
else {
- authdata.key = (size_t)dpaa_mem_vtop(
+ authdata.key = (size_t)rte_dpaa_mem_vtop(
(void *)(size_t)authdata.key);
authdata.key_type = RTA_DATA_PTR;
}
@@ -591,14 +566,14 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
if (cdb->sh_desc[2] & 1)
alginfo_c.key_type = RTA_DATA_IMM;
else {
- alginfo_c.key = (size_t)dpaa_mem_vtop(
+ alginfo_c.key = (size_t)rte_dpaa_mem_vtop(
(void *)(size_t)alginfo_c.key);
alginfo_c.key_type = RTA_DATA_PTR;
}
if (cdb->sh_desc[2] & (1<<1))
alginfo_a.key_type = RTA_DATA_IMM;
else {
- alginfo_a.key = (size_t)dpaa_mem_vtop(
+ alginfo_a.key = (size_t)rte_dpaa_mem_vtop(
(void *)(size_t)alginfo_a.key);
alginfo_a.key_type = RTA_DATA_PTR;
}
@@ -674,7 +649,7 @@ dpaa_sec_deq(struct dpaa_sec_qp *qp, struct rte_crypto_op **ops, int nb_ops)
* sg[0] is for output
* sg[1] for input
*/
- job = dpaa_mem_ptov(qm_fd_addr_get64(fd));
+ job = rte_dpaa_mem_ptov(qm_fd_addr_get64(fd));
ctx = container_of(job, struct dpaa_sec_op_ctx, job);
ctx->fd_status = fd->status;
@@ -768,7 +743,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
in_sg->extension = 1;
in_sg->final = 1;
in_sg->length = data_len;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(&cf->sg[2]));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(&cf->sg[2]));
/* 1st seg */
sg = in_sg + 1;
@@ -788,7 +763,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
} else {
sg->length = ses->iv.length;
}
- qm_sg_entry_set64(sg, dpaa_mem_vtop(iv_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(iv_ptr));
in_sg->length += sg->length;
cpu_to_hw_sg(sg);
sg++;
@@ -821,7 +796,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg++;
rte_memcpy(old_digest, sym->auth.digest.data,
ses->digest_length);
- start_addr = dpaa_mem_vtop(old_digest);
+ start_addr = rte_dpaa_mem_vtop(old_digest);
qm_sg_entry_set64(sg, start_addr);
sg->length = ses->digest_length;
in_sg->length += ses->digest_length;
@@ -888,7 +863,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
in_sg->extension = 1;
in_sg->final = 1;
in_sg->length = data_len;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(&cf->sg[2]));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(&cf->sg[2]));
sg = &cf->sg[2];
if (ses->iv.length) {
@@ -906,7 +881,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
} else {
sg->length = ses->iv.length;
}
- qm_sg_entry_set64(sg, dpaa_mem_vtop(iv_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(iv_ptr));
in_sg->length += sg->length;
cpu_to_hw_sg(sg);
sg++;
@@ -923,7 +898,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
rte_memcpy(old_digest, sym->auth.digest.data,
ses->digest_length);
/* let's check digest by hw */
- start_addr = dpaa_mem_vtop(old_digest);
+ start_addr = rte_dpaa_mem_vtop(old_digest);
sg++;
qm_sg_entry_set64(sg, start_addr);
sg->length = ses->digest_length;
@@ -987,7 +962,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
out_sg = &cf->sg[0];
out_sg->extension = 1;
out_sg->length = data_len;
- qm_sg_entry_set64(out_sg, dpaa_mem_vtop(&cf->sg[2]));
+ qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(&cf->sg[2]));
cpu_to_hw_sg(out_sg);
/* 1st seg */
@@ -1016,11 +991,11 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
in_sg->length = data_len + ses->iv.length;
sg++;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
cpu_to_hw_sg(in_sg);
/* IV */
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
cpu_to_hw_sg(sg);
@@ -1098,11 +1073,11 @@ build_cipher_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg->extension = 1;
sg->final = 1;
sg->length = data_len + ses->iv.length;
- qm_sg_entry_set64(sg, dpaa_mem_vtop(&cf->sg[2]));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(&cf->sg[2]));
cpu_to_hw_sg(sg);
sg = &cf->sg[2];
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
cpu_to_hw_sg(sg);
@@ -1163,7 +1138,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* output sg entries */
sg = &cf->sg[2];
- qm_sg_entry_set64(out_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(sg));
cpu_to_hw_sg(out_sg);
/* 1st seg */
@@ -1206,18 +1181,18 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* input sg entries */
sg++;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
cpu_to_hw_sg(in_sg);
/* 1st seg IV */
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
cpu_to_hw_sg(sg);
/* 2nd seg auth only */
if (ses->auth_only_len) {
sg++;
- qm_sg_entry_set64(sg, dpaa_mem_vtop(sym->aead.aad.data));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(sym->aead.aad.data));
sg->length = ses->auth_only_len;
cpu_to_hw_sg(sg);
}
@@ -1243,7 +1218,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg++;
memcpy(ctx->digest, sym->aead.digest.data,
ses->digest_length);
- qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(ctx->digest));
sg->length = ses->digest_length;
}
sg->final = 1;
@@ -1281,9 +1256,9 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* input */
rte_prefetch0(cf->sg);
sg = &cf->sg[2];
- qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(&cf->sg[1], rte_dpaa_mem_vtop(sg));
if (is_encode(ses)) {
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1291,7 +1266,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg++;
if (ses->auth_only_len) {
qm_sg_entry_set64(sg,
- dpaa_mem_vtop(sym->aead.aad.data));
+ rte_dpaa_mem_vtop(sym->aead.aad.data));
sg->length = ses->auth_only_len;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1303,7 +1278,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg->final = 1;
cpu_to_hw_sg(sg);
} else {
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1311,7 +1286,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg++;
if (ses->auth_only_len) {
qm_sg_entry_set64(sg,
- dpaa_mem_vtop(sym->aead.aad.data));
+ rte_dpaa_mem_vtop(sym->aead.aad.data));
sg->length = ses->auth_only_len;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1326,7 +1301,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
ses->digest_length);
sg++;
- qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(ctx->digest));
sg->length = ses->digest_length;
length += sg->length;
sg->final = 1;
@@ -1340,7 +1315,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* output */
sg++;
- qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(&cf->sg[0], rte_dpaa_mem_vtop(sg));
qm_sg_entry_set64(sg,
dst_start_addr + sym->aead.data.offset);
sg->length = sym->aead.data.length;
@@ -1409,7 +1384,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* output sg entries */
sg = &cf->sg[2];
- qm_sg_entry_set64(out_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(sg));
cpu_to_hw_sg(out_sg);
/* 1st seg */
@@ -1451,11 +1426,11 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* input sg entries */
sg++;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
cpu_to_hw_sg(in_sg);
/* 1st seg IV */
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
cpu_to_hw_sg(sg);
@@ -1481,7 +1456,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg++;
memcpy(ctx->digest, sym->auth.digest.data,
ses->digest_length);
- qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(ctx->digest));
sg->length = ses->digest_length;
}
sg->final = 1;
@@ -1518,9 +1493,9 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* input */
rte_prefetch0(cf->sg);
sg = &cf->sg[2];
- qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(&cf->sg[1], rte_dpaa_mem_vtop(sg));
if (is_encode(ses)) {
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1532,7 +1507,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
sg->final = 1;
cpu_to_hw_sg(sg);
} else {
- qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr));
sg->length = ses->iv.length;
length += sg->length;
cpu_to_hw_sg(sg);
@@ -1548,7 +1523,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
ses->digest_length);
sg++;
- qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest));
+ qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(ctx->digest));
sg->length = ses->digest_length;
length += sg->length;
sg->final = 1;
@@ -1562,7 +1537,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* output */
sg++;
- qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(&cf->sg[0], rte_dpaa_mem_vtop(sg));
qm_sg_entry_set64(sg, dst_start_addr + sym->cipher.data.offset);
sg->length = sym->cipher.data.length;
length = sg->length;
@@ -1656,7 +1631,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
/* output */
out_sg = &cf->sg[0];
out_sg->extension = 1;
- qm_sg_entry_set64(out_sg, dpaa_mem_vtop(&cf->sg[2]));
+ qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(&cf->sg[2]));
/* 1st seg */
sg = &cf->sg[2];
@@ -1689,7 +1664,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
in_len = mbuf->data_len;
sg++;
- qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg));
+ qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
/* 1st seg */
qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
@@ -1884,7 +1859,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
inq[loop] = ses->inq[rte_lcore_id() % MAX_DPAA_CORES];
fd->opaque_addr = 0;
fd->cmd = 0;
- qm_fd_addr_set64(fd, dpaa_mem_vtop(cf->sg));
+ qm_fd_addr_set64(fd, rte_dpaa_mem_vtop(cf->sg));
fd->_format1 = qm_fd_compound;
fd->length29 = 2 * sizeof(struct qm_sg_entry);
@@ -2349,7 +2324,7 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
}
}
ret = dpaa_sec_init_rx(sess->inq[rte_lcore_id() % MAX_DPAA_CORES],
- dpaa_mem_vtop(&sess->cdb),
+ rte_dpaa_mem_vtop(&sess->cdb),
qman_fq_fqid(&qp->outq));
if (ret)
DPAA_SEC_ERR("Unable to init sec queue");
@@ -3149,7 +3124,7 @@ dpaa_sec_process_parallel_event(void *event,
* sg[0] is for output
* sg[1] for input
*/
- job = dpaa_mem_ptov(qm_fd_addr_get64(fd));
+ job = rte_dpaa_mem_ptov(qm_fd_addr_get64(fd));
ctx = container_of(job, struct dpaa_sec_op_ctx, job);
ctx->fd_status = fd->status;
@@ -3204,7 +3179,7 @@ dpaa_sec_process_atomic_event(void *event,
* sg[0] is for output
* sg[1] for input
*/
- job = dpaa_mem_ptov(qm_fd_addr_get64(fd));
+ job = rte_dpaa_mem_ptov(qm_fd_addr_get64(fd));
ctx = container_of(job, struct dpaa_sec_op_ctx, job);
ctx->fd_status = fd->status;
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 9f17d3a43e..71de819407 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -6,7 +6,7 @@ if not is_linux
reason = 'only supported on linux'
endif
-deps += ['bus_dpaa', 'security']
+deps += ['bus_dpaa', 'mempool_dpaa', 'security']
sources = files('dpaa_sec.c')
allow_experimental_apis = true
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.888243496 +0000
+++ 0183-crypto-dpaa_sec-fix-IOVA-conversions.patch 2020-02-11 11:17:38.836009499 +0000
@@ -1,8 +1,10 @@
-From ec8615607f6e4e76b6234668dfa60f72a1c0e582 Mon Sep 17 00:00:00 2001
+From b3bcd0abdaf0eb57c462e6add749944d467288fc Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 27 Jan 2020 14:37:23 +0530
Subject: [PATCH] crypto/dpaa_sec: fix IOVA conversions
+[ upstream commit ec8615607f6e4e76b6234668dfa60f72a1c0e582 ]
+
DPAA sec driver is using virtual to physical address
translation in its data path and driver is using
dpaax_iova_table_update() API in every address translation
@@ -11,7 +13,6 @@
only if it fails to found translation from DPAAX table.
Fixes: 12e5842945bf ("crypto/dpaa_sec: fix IOVA table")
-Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (181 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA conversions' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " luca.boccassi
` (5 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Sucharitha Sarananaga; +Cc: Archana Muniganti, Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a1a5805d75be8398e9174083f5e3ff05fb3a83a6 Mon Sep 17 00:00:00 2001
From: Sucharitha Sarananaga <ssarananaga@marvell.com>
Date: Mon, 6 Jan 2020 15:03:11 +0530
Subject: [PATCH] examples/fips_validation: fix cipher length for AES-GCM
[ upstream commit 07f5e4553293cff259b7c44f1aa7bad7734eaca2 ]
Cipher length need to be updated in case of AES-GCM decryption.
Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
examples/fips_validation/fips_validation_gcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index ea48ddf707..f295025590 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -19,6 +19,7 @@
#define PTLEN_STR "PTlen = "
#define AADLEN_STR "AADlen = "
#define TAGLEN_STR "Taglen = "
+#define CTLEN_STR "PTlen = "
#define COUNT_STR "Count = "
#define KEY_STR "Key = "
@@ -46,6 +47,7 @@ struct fips_test_callback gcm_interim_vectors[] = {
{KEYLEN_STR, parser_read_uint32_bit_val, &vec.aead.key},
{IVLEN_STR, parser_read_uint32_bit_val, &vec.iv},
{PTLEN_STR, parser_read_uint32_bit_val, &vec.pt},
+ {CTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
{AADLEN_STR, parser_read_uint32_bit_val, &vec.aead.aad},
{TAGLEN_STR, parser_read_uint32_bit_val,
&vec.aead.digest},
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.919553149 +0000
+++ 0184-examples-fips_validation-fix-cipher-length-for-AES-G.patch 2020-02-11 11:17:38.836009499 +0000
@@ -1,12 +1,13 @@
-From 07f5e4553293cff259b7c44f1aa7bad7734eaca2 Mon Sep 17 00:00:00 2001
+From a1a5805d75be8398e9174083f5e3ff05fb3a83a6 Mon Sep 17 00:00:00 2001
From: Sucharitha Sarananaga <ssarananaga@marvell.com>
Date: Mon, 6 Jan 2020 15:03:11 +0530
Subject: [PATCH] examples/fips_validation: fix cipher length for AES-GCM
+[ upstream commit 07f5e4553293cff259b7c44f1aa7bad7734eaca2 ]
+
Cipher length need to be updated in case of AES-GCM decryption.
Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")
-Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (182 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " luca.boccassi
` (4 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Archana Muniganti; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1d601e575b3b05b913c40cb610051d57cae1adde Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:16 +0530
Subject: [PATCH] common/cpt: check cipher and auth keys are set
[ upstream commit e40175c5c56a6a355e022aec106400d25b4f294d ]
Returning error when cipher and auth key are not getting set
Fixes: 6cc54096520d ("crypto/octeontx: add supported sessions")
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/common/cpt/cpt_ucode.h | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index d5a0135d73..979870c754 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -298,7 +298,7 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key,
cpt_fc_ciph_set_key_kasumi_f8_cbc(cpt_ctx, key, key_len);
goto success;
default:
- break;
+ return -1;
}
/* Only for FC_GEN case */
@@ -2620,10 +2620,13 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
sess->iv_length = aead_form->iv.length;
sess->aad_length = aead_form->aad_length;
- cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,
- aead_form->key.length, NULL);
+ if (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,
+ aead_form->key.length, NULL)))
+ return -1;
- cpt_fc_auth_set_key(ctx, auth_type, NULL, 0, aead_form->digest_length);
+ if (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,
+ aead_form->digest_length)))
+ return -1;
return 0;
}
@@ -2723,8 +2726,9 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
sess->iv_length = c_form->iv.length;
sess->is_null = is_null;
- cpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type, c_form->key.data,
- c_form->key.length, NULL);
+ if (unlikely(cpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type,
+ c_form->key.data, c_form->key.length, NULL)))
+ return -1;
return 0;
}
@@ -2823,8 +2827,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
sess->auth_iv_offset = a_form->iv.offset;
sess->auth_iv_length = a_form->iv.length;
}
- cpt_fc_auth_set_key(SESS_PRIV(sess), auth_type, a_form->key.data,
- a_form->key.length, a_form->digest_length);
+ if (unlikely(cpt_fc_auth_set_key(SESS_PRIV(sess), auth_type,
+ a_form->key.data, a_form->key.length,
+ a_form->digest_length)))
+ return -1;
return 0;
}
@@ -2867,9 +2873,13 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
sess->iv_length = a_form->iv.length;
sess->mac_len = a_form->digest_length;
- cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,
- a_form->key.length, NULL);
- cpt_fc_auth_set_key(ctx, auth_type, NULL, 0, a_form->digest_length);
+ if (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,
+ a_form->key.length, NULL)))
+ return -1;
+
+ if (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,
+ a_form->digest_length)))
+ return -1;
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.946369379 +0000
+++ 0185-common-cpt-check-cipher-and-auth-keys-are-set.patch 2020-02-11 11:17:38.836009499 +0000
@@ -1,12 +1,13 @@
-From e40175c5c56a6a355e022aec106400d25b4f294d Mon Sep 17 00:00:00 2001
+From 1d601e575b3b05b913c40cb610051d57cae1adde Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:16 +0530
Subject: [PATCH] common/cpt: check cipher and auth keys are set
+[ upstream commit e40175c5c56a6a355e022aec106400d25b4f294d ]
+
Returning error when cipher and auth key are not getting set
Fixes: 6cc54096520d ("crypto/octeontx: add supported sessions")
-Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
@@ -15,7 +16,7 @@
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
-index 4ef87c298e..081249cd7b 100644
+index d5a0135d73..979870c754 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -298,7 +298,7 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key,
@@ -27,7 +28,7 @@
}
/* Only for FC_GEN case */
-@@ -2616,10 +2616,13 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
+@@ -2620,10 +2620,13 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
sess->iv_length = aead_form->iv.length;
sess->aad_length = aead_form->aad_length;
@@ -44,7 +45,7 @@
return 0;
}
-@@ -2719,8 +2722,9 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
+@@ -2723,8 +2726,9 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
sess->iv_length = c_form->iv.length;
sess->is_null = is_null;
@@ -56,7 +57,7 @@
return 0;
}
-@@ -2814,8 +2818,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
+@@ -2823,8 +2827,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
sess->auth_iv_offset = a_form->iv.offset;
sess->auth_iv_length = a_form->iv.length;
}
@@ -69,7 +70,7 @@
return 0;
}
-@@ -2858,9 +2864,13 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
+@@ -2867,9 +2873,13 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
sess->iv_length = a_form->iv.length;
sess->mac_len = a_form->digest_length;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (183 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " luca.boccassi
` (3 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Archana Muniganti; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From edf1e8adad106816b35f23dc2abc0968401f72ff Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:17 +0530
Subject: [PATCH] common/cpt: fix component for empty IOV buffer
[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]
fill_sg_comp_from_iov() prepares gather components for i/p IOV
buffers and extra buf. This API is failing to create a gather component
for extra_buf when IOV buf len is zero. Though there is enough space
to accommodate extra_buf, because of pre-decrementing of extra_buf
length from aggregate size, this issue is seen.
Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/common/cpt/cpt_ucode.h | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 979870c754..9dc0fc652a 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -377,7 +377,7 @@ fill_sg_comp_from_iov(sg_comp_t *list,
{
int32_t j;
uint32_t extra_len = extra_buf ? extra_buf->size : 0;
- uint32_t size = *psize - extra_len;
+ uint32_t size = *psize;
buf_ptr_t *bufs;
bufs = from->bufs;
@@ -386,9 +386,6 @@ fill_sg_comp_from_iov(sg_comp_t *list,
uint32_t e_len;
sg_comp_t *to = &list[i >> 2];
- if (!bufs[j].size)
- continue;
-
if (unlikely(from_offset)) {
if (from_offset >= bufs[j].size) {
from_offset -= bufs[j].size;
@@ -420,18 +417,19 @@ fill_sg_comp_from_iov(sg_comp_t *list,
to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len);
}
+ extra_len = RTE_MIN(extra_len, size);
/* Insert extra data ptr */
if (extra_len) {
i++;
to = &list[i >> 2];
to->u.s.len[i % 4] =
- rte_cpu_to_be_16(extra_buf->size);
+ rte_cpu_to_be_16(extra_len);
to->ptr[i % 4] =
rte_cpu_to_be_64(extra_buf->dma_addr);
-
- /* size already decremented by extra len */
+ size -= extra_len;
}
+ next_len = RTE_MIN(next_len, size);
/* insert the rest of the data */
if (next_len) {
i++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.975712420 +0000
+++ 0186-common-cpt-fix-component-for-empty-IOV-buffer.patch 2020-02-11 11:17:38.840009574 +0000
@@ -1,8 +1,10 @@
-From 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 Mon Sep 17 00:00:00 2001
+From edf1e8adad106816b35f23dc2abc0968401f72ff Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:17 +0530
Subject: [PATCH] common/cpt: fix component for empty IOV buffer
+[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]
+
fill_sg_comp_from_iov() prepares gather components for i/p IOV
buffers and extra buf. This API is failing to create a gather component
for extra_buf when IOV buf len is zero. Though there is enough space
@@ -10,7 +12,6 @@
length from aggregate size, this issue is seen.
Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
-Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
@@ -19,10 +20,10 @@
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
-index 081249cd7b..c310ea7cb4 100644
+index 979870c754..9dc0fc652a 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
-@@ -373,7 +373,7 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -377,7 +377,7 @@ fill_sg_comp_from_iov(sg_comp_t *list,
{
int32_t j;
uint32_t extra_len = extra_buf ? extra_buf->size : 0;
@@ -31,7 +32,7 @@
buf_ptr_t *bufs;
bufs = from->bufs;
-@@ -382,9 +382,6 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -386,9 +386,6 @@ fill_sg_comp_from_iov(sg_comp_t *list,
uint32_t e_len;
sg_comp_t *to = &list[i >> 2];
@@ -41,7 +42,7 @@
if (unlikely(from_offset)) {
if (from_offset >= bufs[j].size) {
from_offset -= bufs[j].size;
-@@ -416,18 +413,19 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -420,18 +417,19 @@ fill_sg_comp_from_iov(sg_comp_t *list,
to->u.s.len[i % 4] = rte_cpu_to_be_16(e_len);
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'bpf: fix headers install with meson' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (184 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " luca.boccassi
` (2 subsequent siblings)
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Junxiao Shi; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6c42ff93982b86f057a0b9123777385c024cd1c0 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 14:38:00 -0700
Subject: [PATCH] bpf: fix headers install with meson
[ upstream commit 0e8d1ea327d4bd45fd24948be45dcc6716473753 ]
Previously, when librte_bpf is built with meson+ninja, its
headers such as bpf_def is not installed to the system.
This commit fixes this problem.
Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_bpf/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_bpf/meson.build b/lib/librte_bpf/meson.build
index 13fc02db38..52cfaf9ac2 100644
--- a/lib/librte_bpf/meson.build
+++ b/lib/librte_bpf/meson.build
@@ -14,7 +14,7 @@ elif dpdk_conf.has('RTE_ARCH_ARM64')
sources += files('bpf_jit_arm64.c')
endif
-install_headers = files('bpf_def.h',
+install_headers('bpf_def.h',
'rte_bpf.h',
'rte_bpf_ethdev.h')
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:45.005266493 +0000
+++ 0187-bpf-fix-headers-install-with-meson.patch 2020-02-11 11:17:38.840009574 +0000
@@ -1,14 +1,15 @@
-From 0e8d1ea327d4bd45fd24948be45dcc6716473753 Mon Sep 17 00:00:00 2001
+From 6c42ff93982b86f057a0b9123777385c024cd1c0 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 14:38:00 -0700
Subject: [PATCH] bpf: fix headers install with meson
+[ upstream commit 0e8d1ea327d4bd45fd24948be45dcc6716473753 ]
+
Previously, when librte_bpf is built with meson+ninja, its
headers such as bpf_def is not installed to the system.
This commit fixes this problem.
Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
-Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/pdump: fix build with clang' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (185 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'fib: fix possible integer overflow' " luca.boccassi
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 69881e4c3968d3d12b1608cba96d7007aed3907b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 25 Jan 2020 17:04:38 -0800
Subject: [PATCH] app/pdump: fix build with clang
[ upstream commit ab30f26aaaa025121bdf804152ade031ce9d7c0a ]
Clang checks indentation and found incorrect indentation in pdump.
app/pdump/main.c:598:3: error: misleading indentation;
statement is not part of the previous 'if'
[-Werror,-Wmisleading-indentation]
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/pdump/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 903d02f482..d05a023667 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -595,7 +595,7 @@ configure_vdev(uint16_t port_id)
if (ret != 0)
rte_exit(EXIT_FAILURE, "dev config failed\n");
- for (q = 0; q < txRings; q++) {
+ for (q = 0; q < txRings; q++) {
ret = rte_eth_tx_queue_setup(port_id, q, TX_DESC_PER_QUEUE,
rte_eth_dev_socket_id(port_id), NULL);
if (ret < 0)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:45.031970324 +0000
+++ 0188-app-pdump-fix-build-with-clang.patch 2020-02-11 11:17:38.840009574 +0000
@@ -1,8 +1,10 @@
-From ab30f26aaaa025121bdf804152ade031ce9d7c0a Mon Sep 17 00:00:00 2001
+From 69881e4c3968d3d12b1608cba96d7007aed3907b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 25 Jan 2020 17:04:38 -0800
Subject: [PATCH] app/pdump: fix build with clang
+[ upstream commit ab30f26aaaa025121bdf804152ade031ce9d7c0a ]
+
Clang checks indentation and found incorrect indentation in pdump.
app/pdump/main.c:598:3: error: misleading indentation;
@@ -10,7 +12,6 @@
[-Werror,-Wmisleading-indentation]
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'mem: fix munmap in error unwind' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (186 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'fib: fix possible integer overflow' " luca.boccassi
188 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 38d2c9ffdfa00563a6da266caba7ac0e55910260 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:06:11 -0800
Subject: [PATCH] mem: fix munmap in error unwind
[ upstream commit 292f02b58c26c3bad2327a52c49ec6eff580e124 ]
The loop to unwind existing mmaps was only unmapping the
first segment and the error paths after mmap() were not
doing munmap of the current segment.
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linux/eal/eal_memory.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 43e4ffc757..5604c2a7c0 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -1928,7 +1928,7 @@ eal_legacy_hugepage_attach(void)
if (flock(fd, LOCK_SH) < 0) {
RTE_LOG(DEBUG, EAL, "%s(): Locking file failed: %s\n",
__func__, strerror(errno));
- goto fd_error;
+ goto mmap_error;
}
/* find segment data */
@@ -1936,13 +1936,13 @@ eal_legacy_hugepage_attach(void)
if (msl == NULL) {
RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg list\n",
__func__);
- goto fd_error;
+ goto mmap_error;
}
ms = rte_mem_virt2memseg(map_addr, msl);
if (ms == NULL) {
RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg\n",
__func__);
- goto fd_error;
+ goto mmap_error;
}
msl_idx = msl - mcfg->memsegs;
@@ -1950,7 +1950,7 @@ eal_legacy_hugepage_attach(void)
if (ms_idx < 0) {
RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg idx\n",
__func__);
- goto fd_error;
+ goto mmap_error;
}
/* store segment fd internally */
@@ -1963,18 +1963,15 @@ eal_legacy_hugepage_attach(void)
close(fd_hugepage);
return 0;
+mmap_error:
+ munmap(hp[i].final_va, hp[i].size);
fd_error:
close(fd);
error:
- /* map all segments into memory to make sure we get the addrs */
- cur_seg = 0;
- for (cur_seg = 0; cur_seg < i; cur_seg++) {
- struct hugepage_file *hf = &hp[i];
- size_t map_sz = hf->size;
- void *map_addr = hf->final_va;
+ /* unwind mmap's done so far */
+ for (cur_seg = 0; cur_seg < i; cur_seg++)
+ munmap(hp[cur_seg].final_va, hp[cur_seg].size);
- munmap(map_addr, map_sz);
- }
if (hp != NULL && hp != MAP_FAILED)
munmap(hp, size);
if (fd_hugepage >= 0)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:45.060093444 +0000
+++ 0189-mem-fix-munmap-in-error-unwind.patch 2020-02-11 11:17:38.840009574 +0000
@@ -1,14 +1,15 @@
-From 292f02b58c26c3bad2327a52c49ec6eff580e124 Mon Sep 17 00:00:00 2001
+From 38d2c9ffdfa00563a6da266caba7ac0e55910260 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:06:11 -0800
Subject: [PATCH] mem: fix munmap in error unwind
+[ upstream commit 292f02b58c26c3bad2327a52c49ec6eff580e124 ]
+
The loop to unwind existing mmaps was only unmapping the
first segment and the error paths after mmap() were not
doing munmap of the current segment.
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
-Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'fib: fix possible integer overflow' has been queued to stable release 19.11.1
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
` (187 preceding siblings ...)
2020-02-11 11:22 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " luca.boccassi
@ 2020-02-11 11:22 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
188 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-11 11:22 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From fddb5b5cea39f543694928775f69892b369b6d51 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 21 Jan 2020 15:07:09 +0000
Subject: [PATCH] fib: fix possible integer overflow
[ upstream commit 247a38c52056f3255da357fc6501a1eec414aa23 ]
This commit fixes possible integer overflow for
prev_idx in build_common_root() CID 350596
and
tbl8_idx in write_edge() CID 350597
Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression tbl8_idx * 256
with type int (32 bits, signed) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of
type uint64_t (64 bits, unsigned).
Coverity issue: 350596, 350597
Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/librte_fib/trie.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/librte_fib/trie.c b/lib/librte_fib/trie.c
index 124aa8b98b..2ae2add4f3 100644
--- a/lib/librte_fib/trie.c
+++ b/lib/librte_fib/trie.c
@@ -240,9 +240,8 @@ tbl8_alloc(struct rte_trie_tbl *dp, uint64_t nh)
tbl8_idx = tbl8_get(dp);
if (tbl8_idx < 0)
return tbl8_idx;
- tbl8_ptr = (uint8_t *)dp->tbl8 +
- ((tbl8_idx * TRIE_TBL8_GRP_NUM_ENT) <<
- dp->nh_sz);
+ tbl8_ptr = get_tbl_p_by_idx(dp->tbl8,
+ tbl8_idx * TRIE_TBL8_GRP_NUM_ENT, dp->nh_sz);
/*Init tbl8 entries with nexthop from tbl24*/
write_to_dp((void *)tbl8_ptr, nh, dp->nh_sz,
TRIE_TBL8_GRP_NUM_ENT);
@@ -317,7 +316,7 @@ get_idx(const uint8_t *ip, uint32_t prev_idx, int bytes, int first_byte)
bitshift = (int8_t)(((first_byte + bytes - 1) - i)*BYTE_SIZE);
idx |= ip[i] << bitshift;
}
- return (prev_idx * 256) + idx;
+ return (prev_idx * TRIE_TBL8_GRP_NUM_ENT) + idx;
}
static inline uint64_t
@@ -354,8 +353,8 @@ recycle_root_path(struct rte_trie_tbl *dp, const uint8_t *ip_part,
return;
if (common_tbl8 != 0) {
- p = get_tbl_p_by_idx(dp->tbl8, (val >> 1) * 256 + *ip_part,
- dp->nh_sz);
+ p = get_tbl_p_by_idx(dp->tbl8, (val >> 1) *
+ TRIE_TBL8_GRP_NUM_ENT + *ip_part, dp->nh_sz);
recycle_root_path(dp, ip_part + 1, common_tbl8 - 1, p);
}
tbl8_recycle(dp, prev, val >> 1);
@@ -388,7 +387,8 @@ build_common_root(struct rte_trie_tbl *dp, const uint8_t *ip,
j = i;
cur_tbl = dp->tbl8;
}
- *tbl = get_tbl_p_by_idx(cur_tbl, prev_idx * 256, dp->nh_sz);
+ *tbl = get_tbl_p_by_idx(cur_tbl, prev_idx * TRIE_TBL8_GRP_NUM_ENT,
+ dp->nh_sz);
return 0;
}
@@ -411,8 +411,8 @@ write_edge(struct rte_trie_tbl *dp, const uint8_t *ip_part, uint64_t next_hop,
return tbl8_idx;
val = (tbl8_idx << 1)|TRIE_EXT_ENT;
}
- p = get_tbl_p_by_idx(dp->tbl8, (tbl8_idx * 256) + *ip_part,
- dp->nh_sz);
+ p = get_tbl_p_by_idx(dp->tbl8, (tbl8_idx *
+ TRIE_TBL8_GRP_NUM_ENT) + *ip_part, dp->nh_sz);
ret = write_edge(dp, ip_part + 1, next_hop, len - 1, edge, p);
if (ret < 0)
return ret;
@@ -420,8 +420,8 @@ write_edge(struct rte_trie_tbl *dp, const uint8_t *ip_part, uint64_t next_hop,
write_to_dp((uint8_t *)p + (1 << dp->nh_sz),
next_hop << 1, dp->nh_sz, UINT8_MAX - *ip_part);
} else {
- write_to_dp(get_tbl_p_by_idx(dp->tbl8, tbl8_idx * 256,
- dp->nh_sz),
+ write_to_dp(get_tbl_p_by_idx(dp->tbl8, tbl8_idx *
+ TRIE_TBL8_GRP_NUM_ENT, dp->nh_sz),
next_hop << 1, dp->nh_sz, *ip_part);
}
tbl8_recycle(dp, &val, tbl8_idx);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:45.089401763 +0000
+++ 0190-fib-fix-possible-integer-overflow.patch 2020-02-11 11:17:38.844009649 +0000
@@ -1,8 +1,10 @@
-From 247a38c52056f3255da357fc6501a1eec414aa23 Mon Sep 17 00:00:00 2001
+From fddb5b5cea39f543694928775f69892b369b6d51 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Tue, 21 Jan 2020 15:07:09 +0000
Subject: [PATCH] fib: fix possible integer overflow
+[ upstream commit 247a38c52056f3255da357fc6501a1eec414aa23 ]
+
This commit fixes possible integer overflow for
prev_idx in build_common_root() CID 350596
and
@@ -16,7 +18,6 @@
Coverity issue: 350596, 350597
Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6")
-Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-11 11:19 ` [dpdk-stable] patch 'test/crypto: fix missing operation status check' " luca.boccassi
@ 2020-02-11 11:37 ` Dybkowski, AdamX
2020-02-11 11:52 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Dybkowski, AdamX @ 2020-02-11 11:37 UTC (permalink / raw)
To: luca.boccassi; +Cc: Trahe, Fiona, Ankur Dwivedi, Anoob Joseph, dpdk stable
Hi Luca.
I originally targeted this patch for DPDK 18.11. That's good it'll go into 19.11, too. But will it be applied to 18.11 as well?
Adam
> -----Original Message-----
> From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> Sent: Tuesday, 11 February, 2020 12:19
> To: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Ankur Dwivedi
> <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; dpdk
> stable <stable@dpdk.org>
> Subject: patch 'test/crypto: fix missing operation status check' has been
> queued to stable release 19.11.1
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 02/13/20. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
> 2001
> From: Adam Dybkowski <adamx.dybkowski@intel.com>
> Date: Fri, 20 Dec 2019 13:58:52 +0100
> Subject: [PATCH] test/crypto: fix missing operation status check
>
> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
>
> This patch adds checking of the symmetric crypto operation status that was
> silently skipped before. It fixes the wireless algorithms session creation
> (SNOW3G, KASUMI, ZUC) and passing of the digest data for the verification
> by PMD. Also fixed the missing aad padding issue revealed after op status
> checking was introduced.
>
> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
>
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> Tested-by: Ankur Dwivedi <adwivedi@marvell.com>
> Reviewed-by: Anoob Joseph <anoobj@marvell.com>
> ---
> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------------
> 1 file changed, 52 insertions(+), 44 deletions(-)
>
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index
> 1b561456d7..79ced809de 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
> if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
> - printf("Error sending packet for encryption");
> + RTE_LOG(ERR, USER1, "Error sending packet for
> encryption\n");
> return NULL;
> }
>
> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
> rte_crypto_op *op)
> while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
> rte_pause();
>
> + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
> + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
> >status);
> + return NULL;
> + }
> +
> return op;
> }
>
> @@ -2823,9 +2828,18 @@
> create_wireless_algo_auth_cipher_session(uint8_t dev_id,
> ut_params->sess = rte_cryptodev_sym_session_create(
> ts_params->session_mpool);
>
> - status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
> - &ut_params->auth_xform,
> - ts_params->session_priv_mpool);
> + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
> + ut_params->auth_xform.next = NULL;
> + ut_params->cipher_xform.next = &ut_params->auth_xform;
> + status = rte_cryptodev_sym_session_init(dev_id, ut_params-
> >sess,
> + &ut_params->cipher_xform,
> + ts_params->session_priv_mpool);
> +
> + } else
> + status = rte_cryptodev_sym_session_init(dev_id, ut_params-
> >sess,
> + &ut_params->auth_xform,
> + ts_params->session_priv_mpool);
> +
> TEST_ASSERT_EQUAL(status, 0, "session init failed");
> TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
> failed");
>
> @@ -3018,13 +3032,14 @@
> create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag, }
>
> static int
> -create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
> +create_wireless_algo_auth_cipher_operation(
> + const uint8_t *auth_tag, unsigned int auth_tag_len,
> const uint8_t *cipher_iv, uint8_t cipher_iv_len,
> const uint8_t *auth_iv, uint8_t auth_iv_len,
> unsigned int data_pad_len,
> unsigned int cipher_len, unsigned int cipher_offset,
> unsigned int auth_len, unsigned int auth_offset,
> - uint8_t op_mode, uint8_t do_sgl)
> + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
> {
> struct crypto_testsuite_params *ts_params = &testsuite_params;
> struct crypto_unittest_params *ut_params = &unittest_params; @@
> -3081,6 +3096,10 @@
> create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
> }
> }
>
> + /* Copy digest for the verification */
> + if (verify)
> + memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
> +
> /* Copy cipher and auth IVs at the end of the crypto operation */
> uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
> ut_params->op, uint8_t *, IV_OFFSET); @@ -4643,7
> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
> *tdata,
>
> /* Create SNOW 3G operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> tdata->auth_iv.data, tdata->auth_iv.len,
> (tdata->digest.offset_bytes == 0 ?
> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
> snow3g_test_data *tdata,
> tdata->cipher.offset_bits,
> tdata->validAuthLenInBits.len,
> tdata->auth.offset_bits,
> - op_mode, 0);
> + op_mode, 0, verify);
>
> if (retval < 0)
> return retval;
> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
> snow3g_test_data *tdata,
>
> /* Create SNOW 3G operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> tdata->auth_iv.data, tdata->auth_iv.len,
> (tdata->digest.offset_bytes == 0 ?
> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
> snow3g_test_data *tdata,
> tdata->cipher.offset_bits,
> tdata->validAuthLenInBits.len,
> tdata->auth.offset_bits,
> - op_mode, 1);
> + op_mode, 1, verify);
>
> if (retval < 0)
> return retval;
> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
> kasumi_test_data *tdata,
>
> /* Create KASUMI operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> NULL, 0,
> (tdata->digest.offset_bytes == 0 ?
> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
> kasumi_test_data *tdata,
> tdata->validCipherOffsetInBits.len,
> tdata->validAuthLenInBits.len,
> 0,
> - op_mode, 0);
> + op_mode, 0, verify);
>
> if (retval < 0)
> return retval;
> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
> kasumi_test_data *tdata,
>
> /* Create KASUMI operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> NULL, 0,
> (tdata->digest.offset_bytes == 0 ?
> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
> kasumi_test_data *tdata,
> tdata->validCipherOffsetInBits.len,
> tdata->validAuthLenInBits.len,
> 0,
> - op_mode, 1);
> + op_mode, 1, verify);
>
> if (retval < 0)
> return retval;
> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
> wireless_test_data *tdata,
>
> /* Create ZUC operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> tdata->auth_iv.data, tdata->auth_iv.len,
> (tdata->digest.offset_bytes == 0 ?
> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
> wireless_test_data *tdata,
> tdata->validCipherOffsetInBits.len,
> tdata->validAuthLenInBits.len,
> 0,
> - op_mode, 0);
> + op_mode, 0, verify);
>
> if (retval < 0)
> return retval;
> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
> wireless_test_data *tdata,
>
> /* Create ZUC operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest.len,
> + tdata->digest.data, tdata->digest.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> NULL, 0,
> (tdata->digest.offset_bytes == 0 ?
> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
> wireless_test_data *tdata,
> tdata->validCipherOffsetInBits.len,
> tdata->validAuthLenInBits.len,
> 0,
> - op_mode, 1);
> + op_mode, 1, verify);
>
> if (retval < 0)
> return retval;
> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
> mixed_cipher_auth_test_data *tdata,
>
> /* Create the operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest_enc.len,
> + tdata->digest_enc.data, tdata->digest_enc.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> tdata->auth_iv.data, tdata->auth_iv.len,
> (tdata->digest_enc.offset == 0 ?
> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
> mixed_cipher_auth_test_data *tdata,
> tdata->cipher.offset_bits,
> tdata->validAuthLen.len_bits,
> tdata->auth.offset_bits,
> - op_mode, 0);
> + op_mode, 0, verify);
>
> if (retval < 0)
> return retval;
> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
> mixed_cipher_auth_test_data *tdata,
>
> /* Create the operation */
> retval = create_wireless_algo_auth_cipher_operation(
> - tdata->digest_enc.len,
> + tdata->digest_enc.data, tdata->digest_enc.len,
> tdata->cipher_iv.data, tdata->cipher_iv.len,
> tdata->auth_iv.data, tdata->auth_iv.len,
> (tdata->digest_enc.offset == 0 ?
> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
> mixed_cipher_auth_test_data *tdata,
> tdata->cipher.offset_bits,
> tdata->validAuthLen.len_bits,
> tdata->auth.offset_bits,
> - op_mode, 1);
> + op_mode, 1, verify);
>
> if (retval < 0)
> return retval;
> @@ -10818,13 +10837,8 @@
> test_authentication_verify_fail_when_data_corruption(
>
> ut_params->op = process_crypto_request(ts_params->valid_devs[0],
> ut_params->op);
> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> - "authentication not failed");
>
> - ut_params->obuf = ut_params->op->sym->m_src;
> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> obuf");
> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>
> return 0;
> }
> @@ -10879,13 +10893,8 @@
> test_authentication_verify_GMAC_fail_when_corruption(
>
> ut_params->op = process_crypto_request(ts_params->valid_devs[0],
> ut_params->op);
> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> - "authentication not failed");
>
> - ut_params->obuf = ut_params->op->sym->m_src;
> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> obuf");
> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>
> return 0;
> }
> @@ -10940,13 +10949,7 @@
> test_authenticated_decryption_fail_when_corruption(
> ut_params->op = process_crypto_request(ts_params->valid_devs[0],
> ut_params->op);
>
> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> - "authentication not failed");
> -
> - ut_params->obuf = ut_params->op->sym->m_src;
> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> obuf");
> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>
> return 0;
> }
> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
> rte_crypto_aead_operation op,
> const unsigned int auth_tag_len = tdata->auth_tag.len;
> const unsigned int iv_len = tdata->iv.len;
> unsigned int aad_len = tdata->aad.len;
> + unsigned int aad_len_pad = 0;
>
> /* Generate Crypto op data structure */
> ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
> rte_crypto_aead_operation op,
>
> rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
>
> + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
> +
> sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
> - ut_params->ibuf, aad_len);
> + ut_params->ibuf, aad_len_pad);
> TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
> "no room to prepend aad");
> sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
> rte_crypto_aead_operation op,
> }
>
> sym_op->aead.data.length = tdata->plaintext.len;
> - sym_op->aead.data.offset = aad_len;
> + sym_op->aead.data.offset = aad_len_pad;
>
> return 0;
> }
> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const struct
> aead_test_data *tdata,
> int ecx = 0;
> void *digest_mem = NULL;
>
> - uint32_t prepend_len = tdata->aad.len;
> + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
>
> if (tdata->plaintext.len % fragsz != 0) {
> if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@ -
> 11915,6 +11921,8 @@ static struct unit_test_suite cryptodev_qat_testsuite =
> {
>
> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
> TEST_CASE_ST(ut_setup, ut_teardown,
>
> test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
> + TEST_CASE_ST(ut_setup, ut_teardown,
> +
> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
> TEST_CASE_ST(ut_setup, ut_teardown,
>
> test_AES_GCM_authenticated_encryption_test_case_1),
> TEST_CASE_ST(ut_setup, ut_teardown,
> --
> 2.20.1
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2020-02-11 11:17:39.986002596 +0000
> +++ 0023-test-crypto-fix-missing-operation-status-check.patch 2020-02-11
> 11:17:38.332000075 +0000
> @@ -1,8 +1,10 @@
> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17 00:00:00
> 2001
> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
> 2001
> From: Adam Dybkowski <adamx.dybkowski@intel.com>
> Date: Fri, 20 Dec 2019 13:58:52 +0100
> Subject: [PATCH] test/crypto: fix missing operation status check
>
> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> +
> This patch adds checking of the symmetric crypto operation status that was
> silently skipped before. It fixes the wireless algorithms session creation
> (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@
>
> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> oriented")
> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> -Cc: stable@dpdk.org
>
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-11 11:37 ` Dybkowski, AdamX
@ 2020-02-11 11:52 ` Luca Boccassi
2020-02-11 12:10 ` Kevin Traynor
0 siblings, 1 reply; 310+ messages in thread
From: Luca Boccassi @ 2020-02-11 11:52 UTC (permalink / raw)
To: Dybkowski, AdamX, Kevin Traynor
Cc: Trahe, Fiona, Ankur Dwivedi, Anoob Joseph, dpdk stable
Hi,
That's a question for Kevin, the 18.11 maintainer.
On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote:
> Hi Luca.
>
> I originally targeted this patch for DPDK 18.11. That's good it'll go
> into 19.11, too. But will it be applied to 18.11 as well?
>
> Adam
>
> > -----Original Message-----
> > From:
> > luca.boccassi@gmail.com
> > [mailto:
> > luca.boccassi@gmail.com
> > ]
> > Sent: Tuesday, 11 February, 2020 12:19
> > To: Dybkowski, AdamX <
> > adamx.dybkowski@intel.com
> > >
> > Cc: Trahe, Fiona <
> > fiona.trahe@intel.com
> > >; Ankur Dwivedi
> > <
> > adwivedi@marvell.com
> > >; Anoob Joseph <
> > anoobj@marvell.com
> > >; dpdk
> > stable <
> > stable@dpdk.org
> > >
> > Subject: patch 'test/crypto: fix missing operation status check'
> > has been
> > queued to stable release 19.11.1
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.11.1
> >
> > Note it hasn't been pushed to
> > http://dpdk.org/browse/dpdk-stable
> > yet.
> > It will be pushed if I get no objections before 02/13/20. So please
> > shout if
> > anyone has objections.
> >
> > Also note that after the patch there's a diff of the upstream
> > commit vs the
> > patch applied to the branch. This will indicate if there was any
> > rebasing
> > needed to apply to the stable branch. If there were code changes
> > for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase
> > was
> > correctly done.
> >
> > Thanks.
> >
> > Luca Boccassi
> >
> > ---
> > From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
> > 2001
> > From: Adam Dybkowski <
> > adamx.dybkowski@intel.com
> > >
> > Date: Fri, 20 Dec 2019 13:58:52 +0100
> > Subject: [PATCH] test/crypto: fix missing operation status check
> >
> > [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> >
> > This patch adds checking of the symmetric crypto operation status
> > that was
> > silently skipped before. It fixes the wireless algorithms session
> > creation
> > (SNOW3G, KASUMI, ZUC) and passing of the digest data for the
> > verification
> > by PMD. Also fixed the missing aad padding issue revealed after op
> > status
> > checking was introduced.
> >
> > Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> > oriented")
> > Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> >
> > Signed-off-by: Adam Dybkowski <
> > adamx.dybkowski@intel.com
> > >
> > Acked-by: Fiona Trahe <
> > fiona.trahe@intel.com
> > >
> > Tested-by: Ankur Dwivedi <
> > adwivedi@marvell.com
> > >
> > Reviewed-by: Anoob Joseph <
> > anoobj@marvell.com
> > >
> > ---
> > app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------
> > ------
> > 1 file changed, 52 insertions(+), 44 deletions(-)
> >
> > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> > index
> > 1b561456d7..79ced809de 100644
> > --- a/app/test/test_cryptodev.c
> > +++ b/app/test/test_cryptodev.c
> > @@ -143,7 +143,7 @@ static struct rte_crypto_op *
> > process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
> > if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
> > - printf("Error sending packet for encryption");
> > + RTE_LOG(ERR, USER1, "Error sending packet for
> > encryption\n");
> > return NULL;
> > }
> >
> > @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
> > rte_crypto_op *op)
> > while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
> > rte_pause();
> >
> > + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
> > + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
> > > status);
> >
> > + return NULL;
> > + }
> > +
> > return op;
> > }
> >
> > @@ -2823,9 +2828,18 @@
> > create_wireless_algo_auth_cipher_session(uint8_t dev_id,
> > ut_params->sess = rte_cryptodev_sym_session_create(
> > ts_params->session_mpool);
> >
> > - status = rte_cryptodev_sym_session_init(dev_id, ut_params-
> > >sess,
> > - &ut_params->auth_xform,
> > - ts_params->session_priv_mpool);
> > + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
> > + ut_params->auth_xform.next = NULL;
> > + ut_params->cipher_xform.next = &ut_params->auth_xform;
> > + status = rte_cryptodev_sym_session_init(dev_id,
> > ut_params-
> > > sess,
> >
> > + &ut_params->cipher_xform,
> > + ts_params->session_priv_mpool);
> > +
> > + } else
> > + status = rte_cryptodev_sym_session_init(dev_id,
> > ut_params-
> > > sess,
> >
> > + &ut_params->auth_xform,
> > + ts_params->session_priv_mpool);
> > +
> > TEST_ASSERT_EQUAL(status, 0, "session init failed");
> > TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
> > failed");
> >
> > @@ -3018,13 +3032,14 @@
> > create_wireless_algo_cipher_hash_operation(const uint8_t
> > *auth_tag, }
> >
> > static int
> > -create_wireless_algo_auth_cipher_operation(unsigned int
> > auth_tag_len,
> > +create_wireless_algo_auth_cipher_operation(
> > + const uint8_t *auth_tag, unsigned int auth_tag_len,
> > const uint8_t *cipher_iv, uint8_t cipher_iv_len,
> > const uint8_t *auth_iv, uint8_t auth_iv_len,
> > unsigned int data_pad_len,
> > unsigned int cipher_len, unsigned int cipher_offset,
> > unsigned int auth_len, unsigned int auth_offset,
> > - uint8_t op_mode, uint8_t do_sgl)
> > + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
> > {
> > struct crypto_testsuite_params *ts_params = &testsuite_params;
> > struct crypto_unittest_params *ut_params = &unittest_params; @@
> > -3081,6 +3096,10 @@
> > create_wireless_algo_auth_cipher_operation(unsigned int
> > auth_tag_len,
> > }
> > }
> >
> > + /* Copy digest for the verification */
> > + if (verify)
> > + memcpy(sym_op->auth.digest.data, auth_tag,
> > auth_tag_len);
> > +
> > /* Copy cipher and auth IVs at the end of the crypto operation
> > */
> > uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
> > ut_params->op, uint8_t *, IV_OFFSET); @@
> > -4643,7
> > +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
> > *tdata,
> >
> > /* Create SNOW 3G operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > tdata->auth_iv.data, tdata->auth_iv.len,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
> > snow3g_test_data *tdata,
> > tdata->cipher.offset_bits,
> > tdata->validAuthLenInBits.len,
> > tdata->auth.offset_bits,
> > - op_mode, 0);
> > + op_mode, 0, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
> > snow3g_test_data *tdata,
> >
> > /* Create SNOW 3G operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > tdata->auth_iv.data, tdata->auth_iv.len,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
> > snow3g_test_data *tdata,
> > tdata->cipher.offset_bits,
> > tdata->validAuthLenInBits.len,
> > tdata->auth.offset_bits,
> > - op_mode, 1);
> > + op_mode, 1, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
> > kasumi_test_data *tdata,
> >
> > /* Create KASUMI operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > NULL, 0,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
> > kasumi_test_data *tdata,
> > tdata->validCipherOffsetInBits.len,
> > tdata->validAuthLenInBits.len,
> > 0,
> > - op_mode, 0);
> > + op_mode, 0, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
> > kasumi_test_data *tdata,
> >
> > /* Create KASUMI operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > NULL, 0,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
> > kasumi_test_data *tdata,
> > tdata->validCipherOffsetInBits.len,
> > tdata->validAuthLenInBits.len,
> > 0,
> > - op_mode, 1);
> > + op_mode, 1, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
> > wireless_test_data *tdata,
> >
> > /* Create ZUC operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > tdata->auth_iv.data, tdata->auth_iv.len,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
> > wireless_test_data *tdata,
> > tdata->validCipherOffsetInBits.len,
> > tdata->validAuthLenInBits.len,
> > 0,
> > - op_mode, 0);
> > + op_mode, 0, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
> > wireless_test_data *tdata,
> >
> > /* Create ZUC operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest.len,
> > + tdata->digest.data, tdata->digest.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > NULL, 0,
> > (tdata->digest.offset_bytes == 0 ?
> > @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
> > wireless_test_data *tdata,
> > tdata->validCipherOffsetInBits.len,
> > tdata->validAuthLenInBits.len,
> > 0,
> > - op_mode, 1);
> > + op_mode, 1, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
> > mixed_cipher_auth_test_data *tdata,
> >
> > /* Create the operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest_enc.len,
> > + tdata->digest_enc.data, tdata->digest_enc.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > tdata->auth_iv.data, tdata->auth_iv.len,
> > (tdata->digest_enc.offset == 0 ?
> > @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
> > mixed_cipher_auth_test_data *tdata,
> > tdata->cipher.offset_bits,
> > tdata->validAuthLen.len_bits,
> > tdata->auth.offset_bits,
> > - op_mode, 0);
> > + op_mode, 0, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
> > mixed_cipher_auth_test_data *tdata,
> >
> > /* Create the operation */
> > retval = create_wireless_algo_auth_cipher_operation(
> > - tdata->digest_enc.len,
> > + tdata->digest_enc.data, tdata->digest_enc.len,
> > tdata->cipher_iv.data, tdata->cipher_iv.len,
> > tdata->auth_iv.data, tdata->auth_iv.len,
> > (tdata->digest_enc.offset == 0 ?
> > @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
> > mixed_cipher_auth_test_data *tdata,
> > tdata->cipher.offset_bits,
> > tdata->validAuthLen.len_bits,
> > tdata->auth.offset_bits,
> > - op_mode, 1);
> > + op_mode, 1, verify);
> >
> > if (retval < 0)
> > return retval;
> > @@ -10818,13 +10837,8 @@
> > test_authentication_verify_fail_when_data_corruption(
> >
> > ut_params->op = process_crypto_request(ts_params-
> > >valid_devs[0],
> > ut_params->op);
> > - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > - "authentication not failed");
> >
> > - ut_params->obuf = ut_params->op->sym->m_src;
> > - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > obuf");
> > + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >
> > return 0;
> > }
> > @@ -10879,13 +10893,8 @@
> > test_authentication_verify_GMAC_fail_when_corruption(
> >
> > ut_params->op = process_crypto_request(ts_params-
> > >valid_devs[0],
> > ut_params->op);
> > - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > - "authentication not failed");
> >
> > - ut_params->obuf = ut_params->op->sym->m_src;
> > - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > obuf");
> > + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >
> > return 0;
> > }
> > @@ -10940,13 +10949,7 @@
> > test_authenticated_decryption_fail_when_corruption(
> > ut_params->op = process_crypto_request(ts_params-
> > >valid_devs[0],
> > ut_params->op);
> >
> > - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > - "authentication not failed");
> > -
> > - ut_params->obuf = ut_params->op->sym->m_src;
> > - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > obuf");
> > + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >
> > return 0;
> > }
> > @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
> > rte_crypto_aead_operation op,
> > const unsigned int auth_tag_len = tdata->auth_tag.len;
> > const unsigned int iv_len = tdata->iv.len;
> > unsigned int aad_len = tdata->aad.len;
> > + unsigned int aad_len_pad = 0;
> >
> > /* Generate Crypto op data structure */
> > ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
> > @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
> > rte_crypto_aead_operation op,
> >
> > rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
> >
> > + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
> > +
> > sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
> > - ut_params->ibuf, aad_len);
> > + ut_params->ibuf, aad_len_pad);
> > TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
> > "no room to prepend aad");
> > sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
> > 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
> > rte_crypto_aead_operation op,
> > }
> >
> > sym_op->aead.data.length = tdata->plaintext.len;
> > - sym_op->aead.data.offset = aad_len;
> > + sym_op->aead.data.offset = aad_len_pad;
> >
> > return 0;
> > }
> > @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const
> > struct
> > aead_test_data *tdata,
> > int ecx = 0;
> > void *digest_mem = NULL;
> >
> > - uint32_t prepend_len = tdata->aad.len;
> > + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
> >
> > if (tdata->plaintext.len % fragsz != 0) {
> > if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@
> > -
> > 11915,6 +11921,8 @@ static struct unit_test_suite
> > cryptodev_qat_testsuite =
> > {
> >
> > test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
> > TEST_CASE_ST(ut_setup, ut_teardown,
> >
> > test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
> > + TEST_CASE_ST(ut_setup, ut_teardown,
> > +
> > test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
> > TEST_CASE_ST(ut_setup, ut_teardown,
> >
> > test_AES_GCM_authenticated_encryption_test_case_1),
> > TEST_CASE_ST(ut_setup, ut_teardown,
> > --
> > 2.20.1
> >
> > ---
> > Diff of the applied patch vs upstream commit (please double-check
> > if non-
> > empty:
> > ---
> > --- - 2020-02-11 11:17:39.986002596 +0000
> > +++ 0023-test-crypto-fix-missing-operation-status-check.patch
> > 2020-02-11
> > 11:17:38.332000075 +0000
> > @@ -1,8 +1,10 @@
> > -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17 00:00:00
> > 2001
> > +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
> > 2001
> > From: Adam Dybkowski <
> > adamx.dybkowski@intel.com
> > >
> > Date: Fri, 20 Dec 2019 13:58:52 +0100
> > Subject: [PATCH] test/crypto: fix missing operation status check
> >
> > +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> > +
> > This patch adds checking of the symmetric crypto operation
> > status that was
> > silently skipped before. It fixes the wireless algorithms session
> > creation
> > (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@
> >
> > Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> > oriented")
> > Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> > -Cc:
> > stable@dpdk.org
> >
> >
> > Signed-off-by: Adam Dybkowski <
> > adamx.dybkowski@intel.com
> > >
> > Acked-by: Fiona Trahe <
> > fiona.trahe@intel.com
> > >
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-11 11:52 ` Luca Boccassi
@ 2020-02-11 12:10 ` Kevin Traynor
2020-02-12 11:19 ` Dybkowski, AdamX
0 siblings, 1 reply; 310+ messages in thread
From: Kevin Traynor @ 2020-02-11 12:10 UTC (permalink / raw)
To: Luca Boccassi, Dybkowski, AdamX
Cc: Trahe, Fiona, Ankur Dwivedi, Anoob Joseph, dpdk stable
On 11/02/2020 11:52, Luca Boccassi wrote:
> Hi,
>
> That's a question for Kevin, the 18.11 maintainer.
>
> On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote:
>> Hi Luca.
>>
>> I originally targeted this patch for DPDK 18.11. That's good it'll go
>> into 19.11, too. But will it be applied to 18.11 as well?
>>
I tried to apply it on 18.11 branch last week, but it doesn't apply and
I have a note to say there was too much churn. So, you'll need to send a
rebased version on 18.11 branch. It will be on the list of commits that
didn't apply and asking authors for rebase that I'll send out a bit later.
>> Adam
>>
>>> -----Original Message-----
>>> From:
>>> luca.boccassi@gmail.com
>>> [mailto:
>>> luca.boccassi@gmail.com
>>> ]
>>> Sent: Tuesday, 11 February, 2020 12:19
>>> To: Dybkowski, AdamX <
>>> adamx.dybkowski@intel.com
>>>>
>>> Cc: Trahe, Fiona <
>>> fiona.trahe@intel.com
>>>> ; Ankur Dwivedi
>>> <
>>> adwivedi@marvell.com
>>>> ; Anoob Joseph <
>>> anoobj@marvell.com
>>>> ; dpdk
>>> stable <
>>> stable@dpdk.org
>>>>
>>> Subject: patch 'test/crypto: fix missing operation status check'
>>> has been
>>> queued to stable release 19.11.1
>>>
>>> Hi,
>>>
>>> FYI, your patch has been queued to stable release 19.11.1
>>>
>>> Note it hasn't been pushed to
>>> http://dpdk.org/browse/dpdk-stable
>>> yet.
>>> It will be pushed if I get no objections before 02/13/20. So please
>>> shout if
>>> anyone has objections.
>>>
>>> Also note that after the patch there's a diff of the upstream
>>> commit vs the
>>> patch applied to the branch. This will indicate if there was any
>>> rebasing
>>> needed to apply to the stable branch. If there were code changes
>>> for
>>> rebasing
>>> (ie: not only metadata diffs), please double check that the rebase
>>> was
>>> correctly done.
>>>
>>> Thanks.
>>>
>>> Luca Boccassi
>>>
>>> ---
>>> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
>>> 2001
>>> From: Adam Dybkowski <
>>> adamx.dybkowski@intel.com
>>>>
>>> Date: Fri, 20 Dec 2019 13:58:52 +0100
>>> Subject: [PATCH] test/crypto: fix missing operation status check
>>>
>>> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
>>>
>>> This patch adds checking of the symmetric crypto operation status
>>> that was
>>> silently skipped before. It fixes the wireless algorithms session
>>> creation
>>> (SNOW3G, KASUMI, ZUC) and passing of the digest data for the
>>> verification
>>> by PMD. Also fixed the missing aad padding issue revealed after op
>>> status
>>> checking was introduced.
>>>
>>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
>>> oriented")
>>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
>>>
>>> Signed-off-by: Adam Dybkowski <
>>> adamx.dybkowski@intel.com
>>>>
>>> Acked-by: Fiona Trahe <
>>> fiona.trahe@intel.com
>>>>
>>> Tested-by: Ankur Dwivedi <
>>> adwivedi@marvell.com
>>>>
>>> Reviewed-by: Anoob Joseph <
>>> anoobj@marvell.com
>>>>
>>> ---
>>> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------
>>> ------
>>> 1 file changed, 52 insertions(+), 44 deletions(-)
>>>
>>> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
>>> index
>>> 1b561456d7..79ced809de 100644
>>> --- a/app/test/test_cryptodev.c
>>> +++ b/app/test/test_cryptodev.c
>>> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
>>> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
>>> if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
>>> - printf("Error sending packet for encryption");
>>> + RTE_LOG(ERR, USER1, "Error sending packet for
>>> encryption\n");
>>> return NULL;
>>> }
>>>
>>> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
>>> rte_crypto_op *op)
>>> while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
>>> rte_pause();
>>>
>>> + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
>>> + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
>>>> status);
>>>
>>> + return NULL;
>>> + }
>>> +
>>> return op;
>>> }
>>>
>>> @@ -2823,9 +2828,18 @@
>>> create_wireless_algo_auth_cipher_session(uint8_t dev_id,
>>> ut_params->sess = rte_cryptodev_sym_session_create(
>>> ts_params->session_mpool);
>>>
>>> - status = rte_cryptodev_sym_session_init(dev_id, ut_params-
>>>> sess,
>>> - &ut_params->auth_xform,
>>> - ts_params->session_priv_mpool);
>>> + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
>>> + ut_params->auth_xform.next = NULL;
>>> + ut_params->cipher_xform.next = &ut_params->auth_xform;
>>> + status = rte_cryptodev_sym_session_init(dev_id,
>>> ut_params-
>>>> sess,
>>>
>>> + &ut_params->cipher_xform,
>>> + ts_params->session_priv_mpool);
>>> +
>>> + } else
>>> + status = rte_cryptodev_sym_session_init(dev_id,
>>> ut_params-
>>>> sess,
>>>
>>> + &ut_params->auth_xform,
>>> + ts_params->session_priv_mpool);
>>> +
>>> TEST_ASSERT_EQUAL(status, 0, "session init failed");
>>> TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
>>> failed");
>>>
>>> @@ -3018,13 +3032,14 @@
>>> create_wireless_algo_cipher_hash_operation(const uint8_t
>>> *auth_tag, }
>>>
>>> static int
>>> -create_wireless_algo_auth_cipher_operation(unsigned int
>>> auth_tag_len,
>>> +create_wireless_algo_auth_cipher_operation(
>>> + const uint8_t *auth_tag, unsigned int auth_tag_len,
>>> const uint8_t *cipher_iv, uint8_t cipher_iv_len,
>>> const uint8_t *auth_iv, uint8_t auth_iv_len,
>>> unsigned int data_pad_len,
>>> unsigned int cipher_len, unsigned int cipher_offset,
>>> unsigned int auth_len, unsigned int auth_offset,
>>> - uint8_t op_mode, uint8_t do_sgl)
>>> + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
>>> {
>>> struct crypto_testsuite_params *ts_params = &testsuite_params;
>>> struct crypto_unittest_params *ut_params = &unittest_params; @@
>>> -3081,6 +3096,10 @@
>>> create_wireless_algo_auth_cipher_operation(unsigned int
>>> auth_tag_len,
>>> }
>>> }
>>>
>>> + /* Copy digest for the verification */
>>> + if (verify)
>>> + memcpy(sym_op->auth.digest.data, auth_tag,
>>> auth_tag_len);
>>> +
>>> /* Copy cipher and auth IVs at the end of the crypto operation
>>> */
>>> uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
>>> ut_params->op, uint8_t *, IV_OFFSET); @@
>>> -4643,7
>>> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
>>> *tdata,
>>>
>>> /* Create SNOW 3G operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
>>> snow3g_test_data *tdata,
>>> tdata->cipher.offset_bits,
>>> tdata->validAuthLenInBits.len,
>>> tdata->auth.offset_bits,
>>> - op_mode, 0);
>>> + op_mode, 0, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
>>> snow3g_test_data *tdata,
>>>
>>> /* Create SNOW 3G operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
>>> snow3g_test_data *tdata,
>>> tdata->cipher.offset_bits,
>>> tdata->validAuthLenInBits.len,
>>> tdata->auth.offset_bits,
>>> - op_mode, 1);
>>> + op_mode, 1, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
>>> kasumi_test_data *tdata,
>>>
>>> /* Create KASUMI operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> NULL, 0,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
>>> kasumi_test_data *tdata,
>>> tdata->validCipherOffsetInBits.len,
>>> tdata->validAuthLenInBits.len,
>>> 0,
>>> - op_mode, 0);
>>> + op_mode, 0, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
>>> kasumi_test_data *tdata,
>>>
>>> /* Create KASUMI operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> NULL, 0,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
>>> kasumi_test_data *tdata,
>>> tdata->validCipherOffsetInBits.len,
>>> tdata->validAuthLenInBits.len,
>>> 0,
>>> - op_mode, 1);
>>> + op_mode, 1, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
>>> wireless_test_data *tdata,
>>>
>>> /* Create ZUC operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
>>> wireless_test_data *tdata,
>>> tdata->validCipherOffsetInBits.len,
>>> tdata->validAuthLenInBits.len,
>>> 0,
>>> - op_mode, 0);
>>> + op_mode, 0, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
>>> wireless_test_data *tdata,
>>>
>>> /* Create ZUC operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest.len,
>>> + tdata->digest.data, tdata->digest.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> NULL, 0,
>>> (tdata->digest.offset_bytes == 0 ?
>>> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
>>> wireless_test_data *tdata,
>>> tdata->validCipherOffsetInBits.len,
>>> tdata->validAuthLenInBits.len,
>>> 0,
>>> - op_mode, 1);
>>> + op_mode, 1, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
>>> mixed_cipher_auth_test_data *tdata,
>>>
>>> /* Create the operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest_enc.len,
>>> + tdata->digest_enc.data, tdata->digest_enc.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>> (tdata->digest_enc.offset == 0 ?
>>> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
>>> mixed_cipher_auth_test_data *tdata,
>>> tdata->cipher.offset_bits,
>>> tdata->validAuthLen.len_bits,
>>> tdata->auth.offset_bits,
>>> - op_mode, 0);
>>> + op_mode, 0, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
>>> mixed_cipher_auth_test_data *tdata,
>>>
>>> /* Create the operation */
>>> retval = create_wireless_algo_auth_cipher_operation(
>>> - tdata->digest_enc.len,
>>> + tdata->digest_enc.data, tdata->digest_enc.len,
>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>> (tdata->digest_enc.offset == 0 ?
>>> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
>>> mixed_cipher_auth_test_data *tdata,
>>> tdata->cipher.offset_bits,
>>> tdata->validAuthLen.len_bits,
>>> tdata->auth.offset_bits,
>>> - op_mode, 1);
>>> + op_mode, 1, verify);
>>>
>>> if (retval < 0)
>>> return retval;
>>> @@ -10818,13 +10837,8 @@
>>> test_authentication_verify_fail_when_data_corruption(
>>>
>>> ut_params->op = process_crypto_request(ts_params-
>>>> valid_devs[0],
>>> ut_params->op);
>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>> - "authentication not failed");
>>>
>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>> obuf");
>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>
>>> return 0;
>>> }
>>> @@ -10879,13 +10893,8 @@
>>> test_authentication_verify_GMAC_fail_when_corruption(
>>>
>>> ut_params->op = process_crypto_request(ts_params-
>>>> valid_devs[0],
>>> ut_params->op);
>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>> - "authentication not failed");
>>>
>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>> obuf");
>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>
>>> return 0;
>>> }
>>> @@ -10940,13 +10949,7 @@
>>> test_authenticated_decryption_fail_when_corruption(
>>> ut_params->op = process_crypto_request(ts_params-
>>>> valid_devs[0],
>>> ut_params->op);
>>>
>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>> - "authentication not failed");
>>> -
>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>> obuf");
>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>
>>> return 0;
>>> }
>>> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
>>> rte_crypto_aead_operation op,
>>> const unsigned int auth_tag_len = tdata->auth_tag.len;
>>> const unsigned int iv_len = tdata->iv.len;
>>> unsigned int aad_len = tdata->aad.len;
>>> + unsigned int aad_len_pad = 0;
>>>
>>> /* Generate Crypto op data structure */
>>> ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
>>> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
>>> rte_crypto_aead_operation op,
>>>
>>> rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
>>>
>>> + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
>>> +
>>> sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
>>> - ut_params->ibuf, aad_len);
>>> + ut_params->ibuf, aad_len_pad);
>>> TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
>>> "no room to prepend aad");
>>> sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
>>> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
>>> rte_crypto_aead_operation op,
>>> }
>>>
>>> sym_op->aead.data.length = tdata->plaintext.len;
>>> - sym_op->aead.data.offset = aad_len;
>>> + sym_op->aead.data.offset = aad_len_pad;
>>>
>>> return 0;
>>> }
>>> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const
>>> struct
>>> aead_test_data *tdata,
>>> int ecx = 0;
>>> void *digest_mem = NULL;
>>>
>>> - uint32_t prepend_len = tdata->aad.len;
>>> + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
>>>
>>> if (tdata->plaintext.len % fragsz != 0) {
>>> if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@
>>> -
>>> 11915,6 +11921,8 @@ static struct unit_test_suite
>>> cryptodev_qat_testsuite =
>>> {
>>>
>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>>
>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
>>> + TEST_CASE_ST(ut_setup, ut_teardown,
>>> +
>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>>
>>> test_AES_GCM_authenticated_encryption_test_case_1),
>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>> --
>>> 2.20.1
>>>
>>> ---
>>> Diff of the applied patch vs upstream commit (please double-check
>>> if non-
>>> empty:
>>> ---
>>> --- - 2020-02-11 11:17:39.986002596 +0000
>>> +++ 0023-test-crypto-fix-missing-operation-status-check.patch
>>> 2020-02-11
>>> 11:17:38.332000075 +0000
>>> @@ -1,8 +1,10 @@
>>> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17 00:00:00
>>> 2001
>>> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00
>>> 2001
>>> From: Adam Dybkowski <
>>> adamx.dybkowski@intel.com
>>>>
>>> Date: Fri, 20 Dec 2019 13:58:52 +0100
>>> Subject: [PATCH] test/crypto: fix missing operation status check
>>>
>>> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
>>> +
>>> This patch adds checking of the symmetric crypto operation
>>> status that was
>>> silently skipped before. It fixes the wireless algorithms session
>>> creation
>>> (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@
>>>
>>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
>>> oriented")
>>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
>>> -Cc:
>>> stable@dpdk.org
>>>
>>>
>>> Signed-off-by: Adam Dybkowski <
>>> adamx.dybkowski@intel.com
>>>>
>>> Acked-by: Fiona Trahe <
>>> fiona.trahe@intel.com
>>>>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/ipn3ke: fix meson build' has been queued to stable release 19.11.1
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix meson build' " luca.boccassi
@ 2020-02-11 13:11 ` Xu, Rosen
0 siblings, 0 replies; 310+ messages in thread
From: Xu, Rosen @ 2020-02-11 13:11 UTC (permalink / raw)
To: luca.boccassi, Richardson, Bruce; +Cc: dpdk stable
Hi Luca,
Thanks a lot.
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Tuesday, February 11, 2020 19:20
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Xu, Rosen <rosen.xu@intel.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/ipn3ke: fix meson build' has been queued to stable
> release 19.11.1
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 02/13/20. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From ea1e97addf528d6749741e8eaf60ee3fec9cbc74 Mon Sep 17 00:00:00
> 2001
> From: Bruce Richardson <bruce.richardson@intel.com>
> Date: Thu, 12 Dec 2019 17:28:43 +0000
> Subject: [PATCH] net/ipn3ke: fix meson build
>
> [ upstream commit 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 ]
>
> The ipn3ke driver and the ifpga driver had circular dependencies on each
> other, meaning that neither could be built with meson. Fix this by:
>
> * setting the build order of net and raw to match that in makefiles
> * removing the dependency from the net driver on the rawdev one
> * fixing the dependency names in the rawdev driver meson.build file
>
> Fixes: 8418c92811b4 ("net/ipn3ke: remove configuration for i40e port
> bonding")
> Fixes: e1defba4cf66 ("raw/ifpga/base: support device tree")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Rosen Xu <rosen.xu@intel.com>
> ---
> drivers/meson.build | 4 ++--
> drivers/net/ipn3ke/meson.build | 4 +++- drivers/raw/ifpga/meson.build |
> 2 +-
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/meson.build b/drivers/meson.build index
> 72eec46088..32d68aa1d0 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -9,8 +9,8 @@ endif
> dpdk_driver_classes = ['common',
> 'bus',
> 'mempool', # depends on common and bus.
> - 'raw', # depends on common and bus.
> - 'net', # depends on common, bus, mempool and raw.
> + 'net', # depends on common, bus, mempool
> + 'raw', # depends on common, bus and net.
> 'crypto', # depends on common, bus and mempool (net in
> future).
> 'compress', # depends on common, bus, mempool.
> 'event', # depends on common, bus, mempool and net.
> diff --git a/drivers/net/ipn3ke/meson.build
> b/drivers/net/ipn3ke/meson.build index e3c8a6768c..bfec592aba 100644
> --- a/drivers/net/ipn3ke/meson.build
> +++ b/drivers/net/ipn3ke/meson.build
> @@ -21,9 +21,11 @@ endif
> if build
> allow_experimental_apis = true
>
> + includes += include_directories('../../raw/ifpga')
> +
> sources += files('ipn3ke_ethdev.c',
> 'ipn3ke_representor.c',
> 'ipn3ke_tm.c',
> 'ipn3ke_flow.c')
> - deps += ['bus_ifpga', 'sched', 'pmd_i40e', 'rawdev', 'rawdev_ifpga']
> + deps += ['bus_ifpga', 'ethdev', 'sched']
> endif
> diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
> index 206136ff48..d4027068d6 100644
> --- a/drivers/raw/ifpga/meson.build
> +++ b/drivers/raw/ifpga/meson.build
> @@ -15,7 +15,7 @@ if build
> objs = [base_objs]
>
> deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs',
> - 'bus_vdev', 'bus_ifpga', 'net', 'i40e', 'ipn3ke']
> + 'bus_vdev', 'bus_ifpga', 'net', 'pmd_i40e', 'pmd_ipn3ke']
> ext_deps += dep
>
> sources = files('ifpga_rawdev.c')
> --
> 2.20.1
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2020-02-11 11:17:40.234853543 +0000
> +++ 0031-net-ipn3ke-fix-meson-build.patch 2020-02-11
> 11:17:38.344000300 +0000
> @@ -1,8 +1,10 @@
> -From 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 Mon Sep 17 00:00:00 2001
> +From ea1e97addf528d6749741e8eaf60ee3fec9cbc74 Mon Sep 17 00:00:00
> 2001
> From: Bruce Richardson <bruce.richardson@intel.com>
> Date: Thu, 12 Dec 2019 17:28:43 +0000
> Subject: [PATCH] net/ipn3ke: fix meson build
>
> +[ upstream commit 7a3c4f4de26381f3f2b85297f603ad6a5f96a9f3 ]
> +
> The ipn3ke driver and the ifpga driver had circular dependencies on each
> other, meaning that neither could be built with meson. Fix this by:
>
> @@ -12,7 +14,6 @@
>
> Fixes: 8418c92811b4 ("net/ipn3ke: remove configuration for i40e port
> bonding")
> Fixes: e1defba4cf66 ("raw/ifpga/base: support device tree")
> -Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Rosen Xu <rosen.xu@intel.com> @@ -23,7 +24,7 @@
> 3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/meson.build b/drivers/meson.build -index
> 3f8749d0b7..29708cc2bb 100644
> +index 72eec46088..32d68aa1d0 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -9,8 +9,8 @@ endif
> @@ -36,7 +37,7 @@
> + 'raw', # depends on common, bus and net.
> 'crypto', # depends on common, bus and mempool (net in
> future).
> 'compress', # depends on common, bus, mempool.
> - 'vdpa', # depends on common, bus and mempool.
> + 'event', # depends on common, bus, mempool and net.
> diff --git a/drivers/net/ipn3ke/meson.build
> b/drivers/net/ipn3ke/meson.build index e3c8a6768c..bfec592aba 100644
> --- a/drivers/net/ipn3ke/meson.build
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' has been queued to stable release 19.11.1
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' " luca.boccassi
@ 2020-02-11 13:12 ` Xu, Rosen
0 siblings, 0 replies; 310+ messages in thread
From: Xu, Rosen @ 2020-02-11 13:12 UTC (permalink / raw)
To: luca.boccassi, Pei, Andy; +Cc: dpdk stable
Hi Luca,
Thanks a lot.
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Tuesday, February 11, 2020 19:20
> To: Pei, Andy <andy.pei@intel.com>
> Cc: Xu, Rosen <rosen.xu@intel.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/ipn3ke: fix line side statistics register read' has been
> queued to stable release 19.11.1
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 02/13/20. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From aa6b3a7622f6f713c9eb13d573f4bd1108a4518f Mon Sep 17 00:00:00
> 2001
> From: Andy Pei <andy.pei@intel.com>
> Date: Tue, 31 Dec 2019 14:53:47 +0800
> Subject: [PATCH] net/ipn3ke: fix line side statistics register read
>
> [ upstream commit eeb1497641cb6d7945abf62a4ea65f514df807e7 ]
>
> To read line side statistics register, eth_group_sel args in function
> ipn3ke_indirect_mac_read should be 0.
> When eth_group_sel is 1, the nic side register is read.
>
> Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> Acked-by: Rosen Xu <rosen.xu@intel.com>
> ---
> drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index 8d9ebef915..80122e3fc5 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -701,7 +701,7 @@ struct ipn3ke_rpst_hw_port_stats *hw_stats)
> &tmp,
> IPN3KE_25G_TX_STATISTICS_STATUS,
> port_id,
> - 1);
> + 0);
> if (tmp &
> IPN3KE_25G_TX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {
> tmp = 0x00000000;
> (*hw->f_mac_read)(hw,
> --
> 2.20.1
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2020-02-11 11:17:40.729794725 +0000
> +++ 0047-net-ipn3ke-fix-line-side-statistics-register-read.patch 2020-
> 02-11 11:17:38.400001347 +0000
> @@ -1,14 +1,15 @@
> -From eeb1497641cb6d7945abf62a4ea65f514df807e7 Mon Sep 17 00:00:00
> 2001
> +From aa6b3a7622f6f713c9eb13d573f4bd1108a4518f Mon Sep 17 00:00:00
> 2001
> From: Andy Pei <andy.pei@intel.com>
> Date: Tue, 31 Dec 2019 14:53:47 +0800
> Subject: [PATCH] net/ipn3ke: fix line side statistics register read
>
> +[ upstream commit eeb1497641cb6d7945abf62a4ea65f514df807e7 ]
> +
> To read line side statistics register, eth_group_sel args in function
> ipn3ke_indirect_mac_read should be 0.
> When eth_group_sel is 1, the nic side register is read.
>
> Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")
> -Cc: stable@dpdk.org
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> Acked-by: Rosen Xu <rosen.xu@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' " luca.boccassi
@ 2020-02-11 13:48 ` Bing Zhao
2020-02-11 14:22 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Bing Zhao @ 2020-02-11 13:48 UTC (permalink / raw)
To: luca.boccassi; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi Luca,
Many thanks for your help.
Yes, this needs to be also applied to the 19.11 stable branch. I want
to rebase it but could not find the branch in
http://git.dpdk.org/dpdk-stable/ , so would you please share me the
branch information then I can try to finish the rebasing today or
early tomorrow.
BR. Bing
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Tuesday, February 11, 2020 7:21 PM
> To: Bing Zhao <bingz@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/mlx5: fix modify actions support limitation' has
> been queued to stable release 19.11.1
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> dpdk.org%2Fbrowse%2Fdpdk-
> stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> It will be pushed if I get no objections before 02/13/20. So please shout
> if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs
> the patch applied to the branch. This will indicate if there was any
> rebasing needed to apply to the stable branch. If there were code
> changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> 00:00:00 2001
> From: Bing Zhao <bingz@mellanox.com>
> Date: Mon, 20 Jan 2020 11:43:07 +0200
> Subject: [PATCH] net/mlx5: fix modify actions support limitation
>
> [ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
>
> In the root table, there is some limitation of total number of header
> modify actions, 16 or 8 for each. But in other tables, there is no such
> strict limitation. In an IPv6 case, the IP fields modifying will occupy
> more actions than that in IPv4, so the total support number should be
> increased in order to support as many actions as possible for an IPv6 +
> TCP packet.
> And in the meanwhile, the memory consumption should also be taken
> into consideration because sometimes only several actions are needed.
> The root table checking could also be done in low layer driver and the
> error code will be returned if the actions number is over the maximal
> supported value.
>
> Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> number")
>
> Signed-off-by: Bing Zhao <bingz@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.h | 15 +++--
> drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++-------------
> --
> 2 files changed, 66 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.h
> b/drivers/net/mlx5/mlx5_flow.h index db12715ecc..13bed08d75
> 100644
> --- a/drivers/net/mlx5/mlx5_flow.h
> +++ b/drivers/net/mlx5/mlx5_flow.h
> @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
>
> /*
> * Number of modification commands.
> - * If extensive metadata registers are supported
> - * the maximal actions amount is 16 and 8 otherwise.
> + * If extensive metadata registers are supported, the maximal actions
> + amount is
> + * 16 and 8 otherwise on root table. The validation could also be done
> + in the
> + * lower driver layer.
> + * On non-root table, there is no limitation, but 32 is enough right
> now.
> */
> -#define MLX5_MODIFY_NUM 16
> -#define MLX5_MODIFY_NUM_NO_MREG 8
> +#define MLX5_MAX_MODIFY_NUM 32
> +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
>
> /* Modify resource structure */
> struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9 @@
> struct mlx5_flow_dv_modify_hdr_resource {
> /**< Verbs modify header action object. */
> uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> uint32_t actions_num; /**< Number of modification actions.
> */
> - struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM];
> + uint64_t flags; /**< Flags for RDMA API. */
> + struct mlx5_modification_cmd actions[];
> /**< Modification actions. */
> - uint64_t flags; /**< Flags for RDMA API. */
> };
>
> /* Jump action resource structure. */
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 8f77909419..74d1a68e4a
> 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> rte_flow_item *item,
> uint32_t mask;
> uint32_t data;
>
> - if (i >= MLX5_MODIFY_NUM)
> + if (i >= MLX5_MAX_MODIFY_NUM)
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> "too many items to modify");
> @@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> rte_flow_item *item,
> ++i;
> ++field;
> } while (field->size);
> - resource->actions_num = i;
> - if (!resource->actions_num)
> + if (resource->actions_num == i)
> return rte_flow_error_set(error, EINVAL,
>
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "invalid modification flow
> item");
> + resource->actions_num = i;
> return 0;
> }
>
> @@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> struct mlx5_modification_cmd *actions = &resource->actions[i];
> struct field_modify_info *field = modify_vlan_out_first_vid;
>
> - if (i >= MLX5_MODIFY_NUM)
> + if (i >= MLX5_MAX_MODIFY_NUM)
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many items to modify");
> @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> struct mlx5_modification_cmd *actions = resource->actions;
> uint32_t i = resource->actions_num;
>
> - if (i >= MLX5_MODIFY_NUM)
> + if (i >= MLX5_MAX_MODIFY_NUM)
> return rte_flow_error_set(error, EINVAL,
>
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many items to modify");
> @@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> actions[i].data1 = rte_cpu_to_be_32(conf->data);
> ++i;
> resource->actions_num = i;
> - if (!resource->actions_num)
> - return rte_flow_error_set(error, EINVAL,
> -
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> - "invalid modification flow
> item");
> return 0;
> }
>
> @@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> domain = sh->rx_domain;
> else
> domain = sh->tx_domain;
> -
> /* Lookup a matching resource from cache. */
> LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> if (resource->reformat_type == cache_resource-
> >reformat_type && @@ -3367,21 +3362,27 @@
> flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> *
> * @param dev
> * Pointer to rte_eth_dev structure.
> + * @param flags
> + * Flags bits to check if root level.
> *
> * @return
> * Max number of modify header actions device can support.
> */
> static unsigned int
> -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev, uint64_t
> flags)
> {
> /*
> * There's no way to directly query the max cap. Although it
> has to be
> * acquried by iterative trial, it is a safe assumption that more
> * actions are supported by FW if extensive metadata register
> is
> - * supported.
> + * supported. (Only in the root table)
> */
> - return mlx5_flow_ext_mreg_supported(dev) ?
> MLX5_MODIFY_NUM :
> -
> MLX5_MODIFY_NUM_NO_MREG;
> + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> + return MLX5_MAX_MODIFY_NUM;
> + else
> + return mlx5_flow_ext_mreg_supported(dev) ?
> +
> MLX5_ROOT_TBL_MODIFY_NUM :
> +
> MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> }
>
> /**
> @@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> struct mlx5_ibv_shared *sh = priv->sh;
> struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> struct mlx5dv_dr_domain *ns;
> + uint32_t actions_len;
>
> - if (resource->actions_num >
> flow_dv_modify_hdr_action_max(dev))
> + resource->flags =
> + dev_flow->group ? 0 :
> MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> + if (resource->actions_num >
> flow_dv_modify_hdr_action_max(dev,
> + resource->flags))
> return rte_flow_error_set(error, EOVERFLOW,
>
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many modify header
> items"); @@ -3483,17 +3488,15 @@
> flow_dv_modify_hdr_resource_register
> ns = sh->tx_domain;
> else
> ns = sh->rx_domain;
> - resource->flags =
> - dev_flow->group ? 0 :
> MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> /* Lookup a matching resource from cache. */
> + actions_len = resource->actions_num * sizeof(resource-
> >actions[0]);
> LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> if (resource->ft_type == cache_resource->ft_type &&
> resource->actions_num == cache_resource-
> >actions_num &&
> resource->flags == cache_resource->flags &&
> !memcmp((const void *)resource->actions,
> (const void *)cache_resource->actions,
> - (resource->actions_num *
> - sizeof(resource-
> >actions[0])))) {
> + actions_len)) {
> DRV_LOG(DEBUG, "modify-header
> resource %p: refcnt %d++",
> (void *)cache_resource,
> rte_atomic32_read(&cache_resource-
> >refcnt));
> @@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
> }
> }
> /* Register new modify-header resource. */
> - cache_resource = rte_calloc(__func__, 1,
> sizeof(*cache_resource), 0);
> + cache_resource = rte_calloc(__func__, 1,
> + sizeof(*cache_resource) +
> actions_len, 0);
> if (!cache_resource)
> return rte_flow_error_set(error, ENOMEM,
>
> RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> "cannot allocate resource
> memory");
> *cache_resource = *resource;
> + rte_memcpy(cache_resource->actions, resource->actions,
> actions_len);
> cache_resource->verbs_action =
> mlx5_glue->dv_create_flow_action_modify_header
> - (sh->ctx, cache_resource-
> >ft_type,
> - ns, cache_resource->flags,
> - cache_resource->actions_num
> *
> - sizeof(cache_resource-
> >actions[0]),
> + (sh->ctx, cache_resource-
> >ft_type, ns,
> + cache_resource->flags,
> actions_len,
> (uint64_t *)cache_resource-
> >actions);
> if (!cache_resource->verbs_action) {
> rte_free(cache_resource);
> @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> };
> int actions_n = 0;
> bool actions_end = false;
> - struct mlx5_flow_dv_modify_hdr_resource mhdr_res = {
> - .ft_type = attr->egress ?
> MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> -
> MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> - };
> + union {
> + struct mlx5_flow_dv_modify_hdr_resource res;
> + uint8_t len[sizeof(struct
> mlx5_flow_dv_modify_hdr_resource) +
> + sizeof(struct mlx5_modification_cmd) *
> + (MLX5_MAX_MODIFY_NUM + 1)];
> + } mhdr_dummy;
> + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res =
> &mhdr_dummy.res;
> union flow_dv_attr flow_attr = { .attr = 0 };
> uint32_t tag_be;
> union mlx5_flow_tbl_key tbl_key;
> @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> uint32_t table;
> int ret = 0;
>
> + mhdr_res->ft_type = attr->egress ?
> MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> +
> MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr-
> >group,
> &table, error);
> if (ret)
> return ret;
> dev_flow->group = table;
> if (attr->transfer)
> - mhdr_res.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> + mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> if (priority == MLX5_FLOW_PRIO_RSVD)
> priority = dev_conf->flow_prio - 1;
> + /* number of actions must be set to 0 in case of dirty stack. */
> + mhdr_res->actions_num = 0;
> for (; !actions_end ; actions++) {
> const struct rte_flow_action_queue *queue;
> const struct rte_flow_action_rss *rss; @@ -6731,7
> +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> };
>
> if (flow_dv_convert_action_mark(dev,
> &mark,
> -
> &mhdr_res,
> +
> mhdr_res,
> error))
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> __flow_dv_translate(struct rte_eth_dev *dev,
> actions->conf;
>
> if (flow_dv_convert_action_mark(dev,
> mark,
> -
> &mhdr_res,
> +
> mhdr_res,
> error))
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> __flow_dv_translate(struct rte_eth_dev *dev,
> break;
> case RTE_FLOW_ACTION_TYPE_SET_META:
> if (flow_dv_convert_action_set_meta
> - (dev, &mhdr_res, attr,
> + (dev, mhdr_res, attr,
> (const struct
> rte_flow_action_set_meta *)
> actions->conf, error))
> return -rte_errno;
> @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> break;
> case RTE_FLOW_ACTION_TYPE_SET_TAG:
> if (flow_dv_convert_action_set_tag
> - (dev, &mhdr_res,
> + (dev, mhdr_res,
> (const struct rte_flow_action_set_tag *)
> actions->conf, error))
> return -rte_errno;
> @@ -6882,7 +6892,7 @@ cnt_err:
> mlx5_update_vlan_vid_pcp(actions, &vlan);
> /* If no VLAN push - this is a modify header
> action */
> if (flow_dv_convert_action_modify_vlan_vid
> - (&mhdr_res, actions,
> error))
> + (mhdr_res, actions,
> error))
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> break;
> @@ -6981,7 +6991,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> if (flow_dv_convert_action_modify_mac
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> @@ -6991,7 +7001,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> if (flow_dv_convert_action_modify_ipv4
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> @@ -7001,7 +7011,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> if (flow_dv_convert_action_modify_ipv6
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> @@ -7011,7 +7021,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> if (flow_dv_convert_action_modify_tp
> - (&mhdr_res, actions, items,
> + (mhdr_res, actions, items,
> &flow_attr, error))
> return -rte_errno;
> action_flags |= actions->type ==
> @@ -7021,13 +7031,13 @@ cnt_err:
> break;
> case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> if (flow_dv_convert_action_modify_dec_ttl
> - (&mhdr_res, items, &flow_attr,
> error))
> + (mhdr_res, items, &flow_attr,
> error))
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
> break;
> case RTE_FLOW_ACTION_TYPE_SET_TTL:
> if (flow_dv_convert_action_modify_ttl
> - (&mhdr_res, actions, items,
> + (mhdr_res, actions, items,
> &flow_attr, error))
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> @@ -7035,7 +7045,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> if (flow_dv_convert_action_modify_tcp_seq
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> @@ -7046,7 +7056,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> if (flow_dv_convert_action_modify_tcp_ack
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> @@ -7055,13 +7065,13 @@ cnt_err:
> break;
> case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> if (flow_dv_convert_action_set_reg
> - (&mhdr_res, actions, error))
> + (mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> break;
> case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> if (flow_dv_convert_action_copy_mreg
> - (dev, &mhdr_res, actions,
> error))
> + (dev, mhdr_res, actions, error))
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> break;
> @@ -7086,10 +7096,10 @@ cnt_err:
> break;
> case RTE_FLOW_ACTION_TYPE_END:
> actions_end = true;
> - if (mhdr_res.actions_num) {
> + if (mhdr_res->actions_num) {
> /* create modify action if needed. */
> if
> (flow_dv_modify_hdr_resource_register
> - (dev, &mhdr_res, dev_flow,
> error))
> + (dev, mhdr_res, dev_flow,
> error))
> return -rte_errno;
> dev_flow-
> >dv.actions[modify_action_position] =
> dev_flow->dv.modify_hdr-
> >verbs_action;
> @@ -7098,7 +7108,7 @@ cnt_err:
> default:
> break;
> }
> - if (mhdr_res.actions_num &&
> + if (mhdr_res->actions_num &&
> modify_action_position == UINT32_MAX)
> modify_action_position = actions_n++;
> }
> --
> 2.20.1
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- - 2020-02-11 11:17:42.994804790 +0000
> +++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch 2020-
> 02-11 11:17:38.612005311 +0000
> @@ -1,8 +1,10 @@
> -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep 17
> 00:00:00 2001
> +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> 00:00:00 2001
> From: Bing Zhao <bingz@mellanox.com>
> Date: Mon, 20 Jan 2020 11:43:07 +0200
> Subject: [PATCH] net/mlx5: fix modify actions support limitation
>
> +[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> +
> In the root table, there is some limitation of total number of header
> modify actions, 16 or 8 for each. But in other tables, there is no such
> strict limitation. In an IPv6 case, the IP fields modifying @@ -16,21
> +18,20 @@ maximal supported value.
>
> Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> number")
> -Cc: stable@dpdk.org
>
> Signed-off-by: Bing Zhao <bingz@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow.h | 15 +++--
> - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++------------
> ---
> - 2 files changed, 68 insertions(+), 55 deletions(-)
> + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++-----------
> ----
> + 2 files changed, 66 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow.h
> b/drivers/net/mlx5/mlx5_flow.h -index a1c7b67488..9832542328
> 100644
> +index db12715ecc..13bed08d75 100644
> --- a/drivers/net/mlx5/mlx5_flow.h
> +++ b/drivers/net/mlx5/mlx5_flow.h
> -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
>
> /*
> * Number of modification commands.
> @@ -49,7 +50,7 @@
>
> /* Modify resource structure */
> struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9 +410,9 @@
> struct mlx5_flow_dv_modify_hdr_resource {
> +@@ -406,9 +409,9 @@ struct mlx5_flow_dv_modify_hdr_resource {
> /**< Verbs modify header action object. */
> uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> uint32_t actions_num; /**< Number of modification actions.
> */ @@ -62,10 +63,10 @@
>
> /* Jump action resource structure. */
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c -index 26dbaaf329..5a1b42698c
> 100644
> +index 8f77909419..74d1a68e4a 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> -@@ -366,7 +366,7 @@ flow_dv_convert_modify_action(struct
> rte_flow_item *item,
> +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> rte_flow_item
> +*item,
> uint32_t mask;
> uint32_t data;
>
> @@ -74,7 +75,7 @@
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> "too many items to modify");
> -@@ -407,11 +407,11 @@ flow_dv_convert_modify_action(struct
> rte_flow_item *item,
> +@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> +rte_flow_item *item,
> ++i;
> ++field;
> } while (field->size);
> @@ -88,7 +89,7 @@
> return 0;
> }
>
> -@@ -572,7 +572,7 @@ flow_dv_convert_action_modify_vlan_vid
> +@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> struct mlx5_modification_cmd *actions = &resource->actions[i];
> struct field_modify_info *field = modify_vlan_out_first_vid;
>
> @@ -97,7 +98,7 @@
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many items to modify");
> -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> struct mlx5_modification_cmd *actions = resource->actions;
> uint32_t i = resource->actions_num;
>
> @@ -106,7 +107,7 @@
> return rte_flow_error_set(error, EINVAL,
>
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many items to modify");
> -@@ -917,10 +917,6 @@ flow_dv_convert_action_set_reg
> +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> actions[i].data1 = rte_cpu_to_be_32(conf->data);
> ++i;
> resource->actions_num = i;
> @@ -117,7 +118,7 @@
> return 0;
> }
>
> -@@ -2385,7 +2381,6 @@ flow_dv_encap_decap_resource_register
> +@@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> domain = sh->rx_domain;
> else
> domain = sh->tx_domain;
> @@ -125,7 +126,7 @@
> /* Lookup a matching resource from cache. */
> LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> if (resource->reformat_type == cache_resource-
> >reformat_type && -@@ -3496,21 +3491,27 @@
> flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> +@@ -3367,21 +3362,27 @@ flow_dv_validate_action_port_id(struct
> +rte_eth_dev *dev,
> *
> * @param dev
> * Pointer to rte_eth_dev structure.
> @@ -157,7 +158,7 @@
> }
>
> /**
> -@@ -3669,8 +3670,12 @@ flow_dv_modify_hdr_resource_register
> +@@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> struct mlx5_ibv_shared *sh = priv->sh;
> struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> struct mlx5dv_dr_domain *ns;
> @@ -171,7 +172,7 @@
> return rte_flow_error_set(error, EOVERFLOW,
>
> RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> "too many modify header
> items"); -@@ -3680,17 +3685,15 @@
> flow_dv_modify_hdr_resource_register
> +@@ -3483,17 +3488,15 @@ flow_dv_modify_hdr_resource_register
> ns = sh->tx_domain;
> else
> ns = sh->rx_domain;
> @@ -191,7 +192,7 @@
> DRV_LOG(DEBUG, "modify-header
> resource %p: refcnt %d++",
> (void *)cache_resource,
> rte_atomic32_read(&cache_resource-
> >refcnt));
> -@@ -3700,18 +3703,18 @@ flow_dv_modify_hdr_resource_register
> +@@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
> }
> }
> /* Register new modify-header resource. */ @@ -215,7 +216,7
> @@
> (uint64_t *)cache_resource-
> >actions);
> if (!cache_resource->verbs_action) {
> rte_free(cache_resource);
> -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> };
> int actions_n = 0;
> bool actions_end = false;
> @@ -233,7 +234,7 @@
> union flow_dv_attr flow_attr = { .attr = 0 };
> uint32_t tag_be;
> union mlx5_flow_tbl_key tbl_key;
> -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> uint32_t table;
> int ret = 0;
>
> @@ -254,7 +255,7 @@
> for (; !actions_end ; actions++) {
> const struct rte_flow_action_queue *queue;
> const struct rte_flow_action_rss *rss; -@@ -7081,7
> +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> +@@ -6731,7 +6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> };
>
> if (flow_dv_convert_action_mark(dev,
> &mark, @@ -263,7 +264,7 @@
> error))
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> __flow_dv_translate(struct rte_eth_dev *dev,
> +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> actions->conf;
>
> if (flow_dv_convert_action_mark(dev,
> mark, @@ -272,7 +273,7 @@
> error))
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> __flow_dv_translate(struct rte_eth_dev *dev,
> +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> break;
> case RTE_FLOW_ACTION_TYPE_SET_META:
> if (flow_dv_convert_action_set_meta @@ -
> 281,7 +282,7 @@
> (const struct
> rte_flow_action_set_meta *)
> actions->conf, error))
> return -rte_errno;
> -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> break;
> case RTE_FLOW_ACTION_TYPE_SET_TAG:
> if (flow_dv_convert_action_set_tag
> @@ -290,7 +291,7 @@
> (const struct rte_flow_action_set_tag *)
> actions->conf, error))
> return -rte_errno;
> -@@ -7232,7 +7242,7 @@ cnt_err:
> +@@ -6882,7 +6892,7 @@ cnt_err:
> mlx5_update_vlan_vid_pcp(actions, &vlan);
> /* If no VLAN push - this is a modify header
> action */
> if (flow_dv_convert_action_modify_vlan_vid
> @@ -299,7 +300,7 @@
> return -rte_errno;
> action_flags |=
> MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> break;
> -@@ -7331,7 +7341,7 @@ cnt_err:
> +@@ -6981,7 +6991,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> if (flow_dv_convert_action_modify_mac
> @@ -308,7 +309,7 @@
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> -@@ -7341,7 +7351,7 @@ cnt_err:
> +@@ -6991,7 +7001,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> if (flow_dv_convert_action_modify_ipv4
> @@ -317,7 +318,7 @@
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> -@@ -7351,7 +7361,7 @@ cnt_err:
> +@@ -7001,7 +7011,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> if (flow_dv_convert_action_modify_ipv6
> @@ -326,7 +327,7 @@
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> -@@ -7361,7 +7371,7 @@ cnt_err:
> +@@ -7011,7 +7021,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> if (flow_dv_convert_action_modify_tp @@ -
> 335,7 +336,7 @@
> &flow_attr, error))
> return -rte_errno;
> action_flags |= actions->type ==
> -@@ -7371,13 +7381,13 @@ cnt_err:
> +@@ -7021,13 +7031,13 @@ cnt_err:
> break;
> case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> if (flow_dv_convert_action_modify_dec_ttl
> @@ -351,7 +352,7 @@
> &flow_attr, error))
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> -@@ -7385,7 +7395,7 @@ cnt_err:
> +@@ -7035,7 +7045,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> if (flow_dv_convert_action_modify_tcp_seq
> @@ -360,7 +361,7 @@
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> -@@ -7396,7 +7406,7 @@ cnt_err:
> +@@ -7046,7 +7056,7 @@ cnt_err:
> case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> if (flow_dv_convert_action_modify_tcp_ack
> @@ -369,7 +370,7 @@
> return -rte_errno;
> action_flags |= actions->type ==
>
> RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> -@@ -7405,13 +7415,13 @@ cnt_err:
> +@@ -7055,13 +7065,13 @@ cnt_err:
> break;
> case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> if (flow_dv_convert_action_set_reg
> @@ -385,22 +386,7 @@
> return -rte_errno;
> action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> break;
> -@@ -7435,23 +7445,23 @@ cnt_err:
> - action_flags |= MLX5_FLOW_ACTION_METER;
> - break;
> - case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> -- if
> (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> -+ if
> (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> - actions,
> error))
> - return -rte_errno;
> - action_flags |=
> MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> - break;
> - case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> -- if
> (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> -+ if
> (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> - actions,
> error))
> - return -rte_errno;
> - action_flags |=
> MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> +@@ -7086,10 +7096,10 @@ cnt_err:
> break;
> case RTE_FLOW_ACTION_TYPE_END:
> actions_end = true;
> @@ -413,7 +399,7 @@
> return -rte_errno;
> dev_flow-
> >dv.actions[modify_action_position] =
> dev_flow->dv.modify_hdr-
> >verbs_action;
> -@@ -7460,7 +7470,7 @@ cnt_err:
> +@@ -7098,7 +7108,7 @@ cnt_err:
> default:
> break;
> }
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-11 13:48 ` Bing Zhao
@ 2020-02-11 14:22 ` Luca Boccassi
2020-02-13 9:06 ` Bing Zhao
0 siblings, 1 reply; 310+ messages in thread
From: Luca Boccassi @ 2020-02-11 14:22 UTC (permalink / raw)
To: Bing Zhao; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi,
The rebasing is done and you can see the result in the mail you replied
to.
The new 19.11 branch will be pushed by the end of the week.
On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> Hi Luca,
>
> Many thanks for your help.
>
> Yes, this needs to be also applied to the 19.11 stable branch. I want
> to rebase it but could not find the branch in
> http://git.dpdk.org/dpdk-stable/
> , so would you please share me the
> branch information then I can try to finish the rebasing today or
> early tomorrow.
>
> BR. Bing
>
> > -----Original Message-----
> > From:
> > luca.boccassi@gmail.com
> > <
> > luca.boccassi@gmail.com
> > >
> > Sent: Tuesday, February 11, 2020 7:21 PM
> > To: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Cc: Ori Kam <
> > orika@mellanox.com
> > >; Slava Ovsiienko
> > <
> > viacheslavo@mellanox.com
> > >; dpdk stable <
> > stable@dpdk.org
> > >
> > Subject: patch 'net/mlx5: fix modify actions support limitation'
> > has
> > been queued to stable release 19.11.1
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.11.1
> >
> > Note it hasn't been pushed to
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> >
> > dpdk.org%2Fbrowse%2Fdpdk-
> > stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> > 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> > 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > It will be pushed if I get no objections before 02/13/20. So please
> > shout
> > if anyone has objections.
> >
> > Also note that after the patch there's a diff of the upstream
> > commit vs
> > the patch applied to the branch. This will indicate if there was
> > any
> > rebasing needed to apply to the stable branch. If there were code
> > changes for rebasing
> > (ie: not only metadata diffs), please double check that the rebase
> > was
> > correctly done.
> >
> > Thanks.
> >
> > Luca Boccassi
> >
> > ---
> > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > 00:00:00 2001
> > From: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > Subject: [PATCH] net/mlx5: fix modify actions support limitation
> >
> > [ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> >
> > In the root table, there is some limitation of total number of
> > header
> > modify actions, 16 or 8 for each. But in other tables, there is no
> > such
> > strict limitation. In an IPv6 case, the IP fields modifying will
> > occupy
> > more actions than that in IPv4, so the total support number should
> > be
> > increased in order to support as many actions as possible for an
> > IPv6 +
> > TCP packet.
> > And in the meanwhile, the memory consumption should also be taken
> > into consideration because sometimes only several actions are
> > needed.
> > The root table checking could also be done in low layer driver and
> > the
> > error code will be returned if the actions number is over the
> > maximal
> > supported value.
> >
> > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > number")
> >
> > Signed-off-by: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Acked-by: Ori Kam <
> > orika@mellanox.com
> > >
> > Acked-by: Viacheslav Ovsiienko <
> > viacheslavo@mellanox.com
> > >
> > ---
> > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++-----------
> > --
> > --
> > 2 files changed, 66 insertions(+), 53 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > b/drivers/net/mlx5/mlx5_flow.h index db12715ecc..13bed08d75
> > 100644
> > --- a/drivers/net/mlx5/mlx5_flow.h
> > +++ b/drivers/net/mlx5/mlx5_flow.h
> > @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> >
> > /*
> > * Number of modification commands.
> > - * If extensive metadata registers are supported
> > - * the maximal actions amount is 16 and 8 otherwise.
> > + * If extensive metadata registers are supported, the maximal
> > actions
> > + amount is
> > + * 16 and 8 otherwise on root table. The validation could also be
> > done
> > + in the
> > + * lower driver layer.
> > + * On non-root table, there is no limitation, but 32 is enough
> > right
> > now.
> > */
> > -#define MLX5_MODIFY_NUM 16
> > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > +#define MLX5_MAX_MODIFY_NUM 32
> > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
> >
> > /* Modify resource structure */
> > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9 @@
> > struct mlx5_flow_dv_modify_hdr_resource {
> > /**< Verbs modify header action object. */
> > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > uint32_t actions_num; /**< Number of modification actions.
> > */
> > - struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM];
> > + uint64_t flags; /**< Flags for RDMA API. */
> > + struct mlx5_modification_cmd actions[];
> > /**< Modification actions. */
> > - uint64_t flags; /**< Flags for RDMA API. */
> > };
> >
> > /* Jump action resource structure. */
> > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> > b/drivers/net/mlx5/mlx5_flow_dv.c index 8f77909419..74d1a68e4a
> > 100644
> > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > rte_flow_item *item,
> > uint32_t mask;
> > uint32_t data;
> >
> > - if (i >= MLX5_MODIFY_NUM)
> > + if (i >= MLX5_MAX_MODIFY_NUM)
> > return rte_flow_error_set(error, EINVAL,
> > RTE_FLOW_ERROR_TYPE_ACTION,
> > NULL,
> > "too many items to modify");
> > @@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > rte_flow_item *item,
> > ++i;
> > ++field;
> > } while (field->size);
> > - resource->actions_num = i;
> > - if (!resource->actions_num)
> > + if (resource->actions_num == i)
> > return rte_flow_error_set(error, EINVAL,
> >
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "invalid modification flow
> > item");
> > + resource->actions_num = i;
> > return 0;
> > }
> >
> > @@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > struct mlx5_modification_cmd *actions = &resource->actions[i];
> > struct field_modify_info *field = modify_vlan_out_first_vid;
> >
> > - if (i >= MLX5_MODIFY_NUM)
> > + if (i >= MLX5_MAX_MODIFY_NUM)
> > return rte_flow_error_set(error, EINVAL,
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many items to modify");
> > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > struct mlx5_modification_cmd *actions = resource->actions;
> > uint32_t i = resource->actions_num;
> >
> > - if (i >= MLX5_MODIFY_NUM)
> > + if (i >= MLX5_MAX_MODIFY_NUM)
> > return rte_flow_error_set(error, EINVAL,
> >
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many items to modify");
> > @@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > ++i;
> > resource->actions_num = i;
> > - if (!resource->actions_num)
> > - return rte_flow_error_set(error, EINVAL,
> > -
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > - "invalid modification flow
> > item");
> > return 0;
> > }
> >
> > @@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> > domain = sh->rx_domain;
> > else
> > domain = sh->tx_domain;
> > -
> > /* Lookup a matching resource from cache. */
> > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> > if (resource->reformat_type == cache_resource-
> > > reformat_type && @@ -3367,21 +3362,27 @@
> >
> > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > *
> > * @param dev
> > * Pointer to rte_eth_dev structure.
> > + * @param flags
> > + * Flags bits to check if root level.
> > *
> > * @return
> > * Max number of modify header actions device can support.
> > */
> > static unsigned int
> > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev, uint64_t
> > flags)
> > {
> > /*
> > * There's no way to directly query the max cap. Although it
> > has to be
> > * acquried by iterative trial, it is a safe assumption that
> > more
> > * actions are supported by FW if extensive metadata register
> > is
> > - * supported.
> > + * supported. (Only in the root table)
> > */
> > - return mlx5_flow_ext_mreg_supported(dev) ?
> > MLX5_MODIFY_NUM :
> > -
> > MLX5_MODIFY_NUM_NO_MREG;
> > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > + return MLX5_MAX_MODIFY_NUM;
> > + else
> > + return mlx5_flow_ext_mreg_supported(dev) ?
> > +
> > MLX5_ROOT_TBL_MODIFY_NUM :
> > +
> > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > }
> >
> > /**
> > @@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> > struct mlx5_ibv_shared *sh = priv->sh;
> > struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> > struct mlx5dv_dr_domain *ns;
> > + uint32_t actions_len;
> >
> > - if (resource->actions_num >
> > flow_dv_modify_hdr_action_max(dev))
> > + resource->flags =
> > + dev_flow->group ? 0 :
> > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > + if (resource->actions_num >
> > flow_dv_modify_hdr_action_max(dev,
> > + resource->flags))
> > return rte_flow_error_set(error, EOVERFLOW,
> >
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many modify header
> > items"); @@ -3483,17 +3488,15 @@
> > flow_dv_modify_hdr_resource_register
> > ns = sh->tx_domain;
> > else
> > ns = sh->rx_domain;
> > - resource->flags =
> > - dev_flow->group ? 0 :
> > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > /* Lookup a matching resource from cache. */
> > + actions_len = resource->actions_num * sizeof(resource-
> > > actions[0]);
> >
> > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> > if (resource->ft_type == cache_resource->ft_type &&
> > resource->actions_num == cache_resource-
> > > actions_num &&
> >
> > resource->flags == cache_resource->flags &&
> > !memcmp((const void *)resource->actions,
> > (const void *)cache_resource->actions,
> > - (resource->actions_num *
> > - sizeof(resource-
> > > actions[0])))) {
> >
> > + actions_len)) {
> > DRV_LOG(DEBUG, "modify-header
> > resource %p: refcnt %d++",
> > (void *)cache_resource,
> > rte_atomic32_read(&cache_resource-
> > > refcnt));
> >
> > @@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
> > }
> > }
> > /* Register new modify-header resource. */
> > - cache_resource = rte_calloc(__func__, 1,
> > sizeof(*cache_resource), 0);
> > + cache_resource = rte_calloc(__func__, 1,
> > + sizeof(*cache_resource) +
> > actions_len, 0);
> > if (!cache_resource)
> > return rte_flow_error_set(error, ENOMEM,
> >
> > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > "cannot allocate resource
> > memory");
> > *cache_resource = *resource;
> > + rte_memcpy(cache_resource->actions, resource->actions,
> > actions_len);
> > cache_resource->verbs_action =
> > mlx5_glue->dv_create_flow_action_modify_header
> > - (sh->ctx, cache_resource-
> > > ft_type,
> >
> > - ns, cache_resource->flags,
> > - cache_resource->actions_num
> > *
> > - sizeof(cache_resource-
> > > actions[0]),
> >
> > + (sh->ctx, cache_resource-
> > > ft_type, ns,
> >
> > + cache_resource->flags,
> > actions_len,
> > (uint64_t *)cache_resource-
> > > actions);
> >
> > if (!cache_resource->verbs_action) {
> > rte_free(cache_resource);
> > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > };
> > int actions_n = 0;
> > bool actions_end = false;
> > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res = {
> > - .ft_type = attr->egress ?
> > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > -
> > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > - };
> > + union {
> > + struct mlx5_flow_dv_modify_hdr_resource res;
> > + uint8_t len[sizeof(struct
> > mlx5_flow_dv_modify_hdr_resource) +
> > + sizeof(struct mlx5_modification_cmd) *
> > + (MLX5_MAX_MODIFY_NUM + 1)];
> > + } mhdr_dummy;
> > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res =
> > &mhdr_dummy.res;
> > union flow_dv_attr flow_attr = { .attr = 0 };
> > uint32_t tag_be;
> > union mlx5_flow_tbl_key tbl_key;
> > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > uint32_t table;
> > int ret = 0;
> >
> > + mhdr_res->ft_type = attr->egress ?
> > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > +
> > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr-
> > > group,
> >
> > &table, error);
> > if (ret)
> > return ret;
> > dev_flow->group = table;
> > if (attr->transfer)
> > - mhdr_res.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > + mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > if (priority == MLX5_FLOW_PRIO_RSVD)
> > priority = dev_conf->flow_prio - 1;
> > + /* number of actions must be set to 0 in case of dirty stack.
> > */
> > + mhdr_res->actions_num = 0;
> > for (; !actions_end ; actions++) {
> > const struct rte_flow_action_queue *queue;
> > const struct rte_flow_action_rss *rss; @@ -6731,7
> > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > };
> >
> > if (flow_dv_convert_action_mark(dev,
> > &mark,
> > -
> > &mhdr_res,
> > +
> > mhdr_res,
> > error))
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> > __flow_dv_translate(struct rte_eth_dev *dev,
> > actions->conf;
> >
> > if (flow_dv_convert_action_mark(dev,
> > mark,
> > -
> > &mhdr_res,
> > +
> > mhdr_res,
> > error))
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> > __flow_dv_translate(struct rte_eth_dev *dev,
> > break;
> > case RTE_FLOW_ACTION_TYPE_SET_META:
> > if (flow_dv_convert_action_set_meta
> > - (dev, &mhdr_res, attr,
> > + (dev, mhdr_res, attr,
> > (const struct
> > rte_flow_action_set_meta *)
> > actions->conf, error))
> > return -rte_errno;
> > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > break;
> > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > if (flow_dv_convert_action_set_tag
> > - (dev, &mhdr_res,
> > + (dev, mhdr_res,
> > (const struct rte_flow_action_set_tag
> > *)
> > actions->conf, error))
> > return -rte_errno;
> > @@ -6882,7 +6892,7 @@ cnt_err:
> > mlx5_update_vlan_vid_pcp(actions, &vlan);
> > /* If no VLAN push - this is a modify header
> > action */
> > if (flow_dv_convert_action_modify_vlan_vid
> > - (&mhdr_res, actions,
> > error))
> > + (mhdr_res, actions,
> > error))
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > break;
> > @@ -6981,7 +6991,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > if (flow_dv_convert_action_modify_mac
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > @@ -6991,7 +7001,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > if (flow_dv_convert_action_modify_ipv4
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > @@ -7001,7 +7011,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > if (flow_dv_convert_action_modify_ipv6
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > @@ -7011,7 +7021,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > if (flow_dv_convert_action_modify_tp
> > - (&mhdr_res, actions, items,
> > + (mhdr_res, actions, items,
> > &flow_attr, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> > @@ -7021,13 +7031,13 @@ cnt_err:
> > break;
> > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > if (flow_dv_convert_action_modify_dec_ttl
> > - (&mhdr_res, items, &flow_attr,
> > error))
> > + (mhdr_res, items, &flow_attr,
> > error))
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
> > break;
> > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > if (flow_dv_convert_action_modify_ttl
> > - (&mhdr_res, actions, items,
> > + (mhdr_res, actions, items,
> > &flow_attr, error))
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> > @@ -7035,7 +7045,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > if (flow_dv_convert_action_modify_tcp_seq
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > @@ -7046,7 +7056,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > if (flow_dv_convert_action_modify_tcp_ack
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > @@ -7055,13 +7065,13 @@ cnt_err:
> > break;
> > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > if (flow_dv_convert_action_set_reg
> > - (&mhdr_res, actions, error))
> > + (mhdr_res, actions, error))
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > break;
> > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > if (flow_dv_convert_action_copy_mreg
> > - (dev, &mhdr_res, actions,
> > error))
> > + (dev, mhdr_res, actions,
> > error))
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > break;
> > @@ -7086,10 +7096,10 @@ cnt_err:
> > break;
> > case RTE_FLOW_ACTION_TYPE_END:
> > actions_end = true;
> > - if (mhdr_res.actions_num) {
> > + if (mhdr_res->actions_num) {
> > /* create modify action if needed. */
> > if
> > (flow_dv_modify_hdr_resource_register
> > - (dev, &mhdr_res, dev_flow,
> > error))
> > + (dev, mhdr_res, dev_flow,
> > error))
> > return -rte_errno;
> > dev_flow-
> > > dv.actions[modify_action_position] =
> >
> > dev_flow->dv.modify_hdr-
> > > verbs_action;
> >
> > @@ -7098,7 +7108,7 @@ cnt_err:
> > default:
> > break;
> > }
> > - if (mhdr_res.actions_num &&
> > + if (mhdr_res->actions_num &&
> > modify_action_position == UINT32_MAX)
> > modify_action_position = actions_n++;
> > }
> > --
> > 2.20.1
> >
> > ---
> > Diff of the applied patch vs upstream commit (please double-check
> > if
> > non-empty:
> > ---
> > --- - 2020-02-11 11:17:42.994804790 +0000
> > +++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch
> > 2020-
> > 02-11 11:17:38.612005311 +0000
> > @@ -1,8 +1,10 @@
> > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep 17
> > 00:00:00 2001
> > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > 00:00:00 2001
> > From: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > Subject: [PATCH] net/mlx5: fix modify actions support limitation
> >
> > +[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > +
> > In the root table, there is some limitation of total number of
> > header
> > modify actions, 16 or 8 for each. But in other tables, there is
> > no such
> > strict limitation. In an IPv6 case, the IP fields modifying @@
> > -16,21
> > +18,20 @@ maximal supported value.
> >
> > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > number")
> > -Cc:
> > stable@dpdk.org
> >
> >
> > Signed-off-by: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Acked-by: Ori Kam <
> > orika@mellanox.com
> > >
> > Acked-by: Viacheslav Ovsiienko <
> > viacheslavo@mellanox.com
> > >
> > ---
> > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++--------
> > ----
> > ---
> > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++--------
> > ---
> > ----
> > + 2 files changed, 66 insertions(+), 53 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > b/drivers/net/mlx5/mlx5_flow.h -index a1c7b67488..9832542328
> > 100644
> > +index db12715ecc..13bed08d75 100644
> > --- a/drivers/net/mlx5/mlx5_flow.h
> > +++ b/drivers/net/mlx5/mlx5_flow.h
> > -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> > +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> >
> > /*
> > * Number of modification commands.
> > @@ -49,7 +50,7 @@
> >
> > /* Modify resource structure */
> > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9 +410,9 @@
> > struct mlx5_flow_dv_modify_hdr_resource {
> > +@@ -406,9 +409,9 @@ struct mlx5_flow_dv_modify_hdr_resource {
> > /**< Verbs modify header action object. */
> > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > uint32_t actions_num; /**< Number of modification actions.
> > */ @@ -62,10 +63,10 @@
> >
> > /* Jump action resource structure. */
> > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> > b/drivers/net/mlx5/mlx5_flow_dv.c -index 26dbaaf329..5a1b42698c
> > 100644
> > +index 8f77909419..74d1a68e4a 100644
> > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > -@@ -366,7 +366,7 @@ flow_dv_convert_modify_action(struct
> > rte_flow_item *item,
> > +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > rte_flow_item
> > +*item,
> > uint32_t mask;
> > uint32_t data;
> >
> > @@ -74,7 +75,7 @@
> > return rte_flow_error_set(error, EINVAL,
> > RTE_FLOW_ERROR_TYPE_ACTION,
> > NULL,
> > "too many items to modify");
> > -@@ -407,11 +407,11 @@ flow_dv_convert_modify_action(struct
> > rte_flow_item *item,
> > +@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > +rte_flow_item *item,
> > ++i;
> > ++field;
> > } while (field->size);
> > @@ -88,7 +89,7 @@
> > return 0;
> > }
> >
> > -@@ -572,7 +572,7 @@ flow_dv_convert_action_modify_vlan_vid
> > +@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > struct mlx5_modification_cmd *actions = &resource->actions[i];
> > struct field_modify_info *field = modify_vlan_out_first_vid;
> >
> > @@ -97,7 +98,7 @@
> > return rte_flow_error_set(error, EINVAL,
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many items to modify");
> > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > struct mlx5_modification_cmd *actions = resource->actions;
> > uint32_t i = resource->actions_num;
> >
> > @@ -106,7 +107,7 @@
> > return rte_flow_error_set(error, EINVAL,
> >
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many items to modify");
> > -@@ -917,10 +917,6 @@ flow_dv_convert_action_set_reg
> > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > ++i;
> > resource->actions_num = i;
> > @@ -117,7 +118,7 @@
> > return 0;
> > }
> >
> > -@@ -2385,7 +2381,6 @@ flow_dv_encap_decap_resource_register
> > +@@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> > domain = sh->rx_domain;
> > else
> > domain = sh->tx_domain;
> > @@ -125,7 +126,7 @@
> > /* Lookup a matching resource from cache. */
> > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> > if (resource->reformat_type == cache_resource-
> > > reformat_type && -@@ -3496,21 +3491,27 @@
> >
> > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > +@@ -3367,21 +3362,27 @@ flow_dv_validate_action_port_id(struct
> > +rte_eth_dev *dev,
> > *
> > * @param dev
> > * Pointer to rte_eth_dev structure.
> > @@ -157,7 +158,7 @@
> > }
> >
> > /**
> > -@@ -3669,8 +3670,12 @@ flow_dv_modify_hdr_resource_register
> > +@@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> > struct mlx5_ibv_shared *sh = priv->sh;
> > struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> > struct mlx5dv_dr_domain *ns;
> > @@ -171,7 +172,7 @@
> > return rte_flow_error_set(error, EOVERFLOW,
> >
> > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > "too many modify header
> > items"); -@@ -3680,17 +3685,15 @@
> > flow_dv_modify_hdr_resource_register
> > +@@ -3483,17 +3488,15 @@ flow_dv_modify_hdr_resource_register
> > ns = sh->tx_domain;
> > else
> > ns = sh->rx_domain;
> > @@ -191,7 +192,7 @@
> > DRV_LOG(DEBUG, "modify-header
> > resource %p: refcnt %d++",
> > (void *)cache_resource,
> > rte_atomic32_read(&cache_resource-
> > > refcnt));
> >
> > -@@ -3700,18 +3703,18 @@ flow_dv_modify_hdr_resource_register
> > +@@ -3503,18 +3506,18 @@ flow_dv_modify_hdr_resource_register
> > }
> > }
> > /* Register new modify-header resource. */ @@ -215,7 +216,7
> > @@
> > (uint64_t *)cache_resource-
> > > actions);
> >
> > if (!cache_resource->verbs_action) {
> > rte_free(cache_resource);
> > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > };
> > int actions_n = 0;
> > bool actions_end = false;
> > @@ -233,7 +234,7 @@
> > union flow_dv_attr flow_attr = { .attr = 0 };
> > uint32_t tag_be;
> > union mlx5_flow_tbl_key tbl_key;
> > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > uint32_t table;
> > int ret = 0;
> >
> > @@ -254,7 +255,7 @@
> > for (; !actions_end ; actions++) {
> > const struct rte_flow_action_queue *queue;
> > const struct rte_flow_action_rss *rss; -@@ -7081,7
> > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > +@@ -6731,7 +6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > };
> >
> > if (flow_dv_convert_action_mark(dev,
> > &mark, @@ -263,7 +264,7 @@
> > error))
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> > __flow_dv_translate(struct rte_eth_dev *dev,
> > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > actions->conf;
> >
> > if (flow_dv_convert_action_mark(dev,
> > mark, @@ -272,7 +273,7 @@
> > error))
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> > __flow_dv_translate(struct rte_eth_dev *dev,
> > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > break;
> > case RTE_FLOW_ACTION_TYPE_SET_META:
> > if (flow_dv_convert_action_set_meta @@ -
> > 281,7 +282,7 @@
> > (const struct
> > rte_flow_action_set_meta *)
> > actions->conf, error))
> > return -rte_errno;
> > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> > *dev,
> > break;
> > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > if (flow_dv_convert_action_set_tag
> > @@ -290,7 +291,7 @@
> > (const struct rte_flow_action_set_tag
> > *)
> > actions->conf, error))
> > return -rte_errno;
> > -@@ -7232,7 +7242,7 @@ cnt_err:
> > +@@ -6882,7 +6892,7 @@ cnt_err:
> > mlx5_update_vlan_vid_pcp(actions, &vlan);
> > /* If no VLAN push - this is a modify header
> > action */
> > if (flow_dv_convert_action_modify_vlan_vid
> > @@ -299,7 +300,7 @@
> > return -rte_errno;
> > action_flags |=
> > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > break;
> > -@@ -7331,7 +7341,7 @@ cnt_err:
> > +@@ -6981,7 +6991,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > if (flow_dv_convert_action_modify_mac
> > @@ -308,7 +309,7 @@
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > -@@ -7341,7 +7351,7 @@ cnt_err:
> > +@@ -6991,7 +7001,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > if (flow_dv_convert_action_modify_ipv4
> > @@ -317,7 +318,7 @@
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > -@@ -7351,7 +7361,7 @@ cnt_err:
> > +@@ -7001,7 +7011,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > if (flow_dv_convert_action_modify_ipv6
> > @@ -326,7 +327,7 @@
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > -@@ -7361,7 +7371,7 @@ cnt_err:
> > +@@ -7011,7 +7021,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > if (flow_dv_convert_action_modify_tp @@ -
> > 335,7 +336,7 @@
> > &flow_attr, error))
> > return -rte_errno;
> > action_flags |= actions->type ==
> > -@@ -7371,13 +7381,13 @@ cnt_err:
> > +@@ -7021,13 +7031,13 @@ cnt_err:
> > break;
> > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > if (flow_dv_convert_action_modify_dec_ttl
> > @@ -351,7 +352,7 @@
> > &flow_attr, error))
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> > -@@ -7385,7 +7395,7 @@ cnt_err:
> > +@@ -7035,7 +7045,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > if (flow_dv_convert_action_modify_tcp_seq
> > @@ -360,7 +361,7 @@
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > -@@ -7396,7 +7406,7 @@ cnt_err:
> > +@@ -7046,7 +7056,7 @@ cnt_err:
> > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > if (flow_dv_convert_action_modify_tcp_ack
> > @@ -369,7 +370,7 @@
> > return -rte_errno;
> > action_flags |= actions->type ==
> >
> > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > -@@ -7405,13 +7415,13 @@ cnt_err:
> > +@@ -7055,13 +7065,13 @@ cnt_err:
> > break;
> > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > if (flow_dv_convert_action_set_reg
> > @@ -385,22 +386,7 @@
> > return -rte_errno;
> > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > break;
> > -@@ -7435,23 +7445,23 @@ cnt_err:
> > - action_flags |= MLX5_FLOW_ACTION_METER;
> > - break;
> > - case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > -- if
> > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > -+ if
> > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > - actions,
> > error))
> > - return -rte_errno;
> > - action_flags |=
> > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > - break;
> > - case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > -- if
> > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > -+ if
> > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > - actions,
> > error))
> > - return -rte_errno;
> > - action_flags |=
> > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > +@@ -7086,10 +7096,10 @@ cnt_err:
> > break;
> > case RTE_FLOW_ACTION_TYPE_END:
> > actions_end = true;
> > @@ -413,7 +399,7 @@
> > return -rte_errno;
> > dev_flow-
> > > dv.actions[modify_action_position] =
> >
> > dev_flow->dv.modify_hdr-
> > > verbs_action;
> >
> > -@@ -7460,7 +7470,7 @@ cnt_err:
> > +@@ -7098,7 +7108,7 @@ cnt_err:
> > default:
> > break;
> > }
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-11 12:10 ` Kevin Traynor
@ 2020-02-12 11:19 ` Dybkowski, AdamX
2020-02-12 11:21 ` Dybkowski, AdamX
2020-02-12 13:43 ` Kevin Traynor
0 siblings, 2 replies; 310+ messages in thread
From: Dybkowski, AdamX @ 2020-02-12 11:19 UTC (permalink / raw)
To: Kevin Traynor; +Cc: dpdk stable
Hi Kevin.
I made the fix to be applied onto "18.11" branch at:
Clone URL: git://dpdk.org/dpdk-stable
Last commits: https://git.dpdk.org/dpdk-stable/log/?h=18.11
Is this the correct one?
The patch I sent (that updates the file app/test/test_cryptodev.c only) can be applied on my side with no issues.
Adam
> -----Original Message-----
> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Tuesday, 11 February, 2020 13:10
> To: Luca Boccassi <luca.boccassi@gmail.com>; Dybkowski, AdamX
> <adamx.dybkowski@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Ankur Dwivedi
> <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; dpdk
> stable <stable@dpdk.org>
> Subject: Re: patch 'test/crypto: fix missing operation status check' has been
> queued to stable release 19.11.1
>
> On 11/02/2020 11:52, Luca Boccassi wrote:
> > Hi,
> >
> > That's a question for Kevin, the 18.11 maintainer.
> >
> > On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote:
> >> Hi Luca.
> >>
> >> I originally targeted this patch for DPDK 18.11. That's good it'll go
> >> into 19.11, too. But will it be applied to 18.11 as well?
> >>
>
> I tried to apply it on 18.11 branch last week, but it doesn't apply and I have a
> note to say there was too much churn. So, you'll need to send a rebased
> version on 18.11 branch. It will be on the list of commits that didn't apply and
> asking authors for rebase that I'll send out a bit later.
>
> >> Adam
> >>
> >>> -----Original Message-----
> >>> From:
> >>> luca.boccassi@gmail.com
> >>> [mailto:
> >>> luca.boccassi@gmail.com
> >>> ]
> >>> Sent: Tuesday, 11 February, 2020 12:19
> >>> To: Dybkowski, AdamX <
> >>> adamx.dybkowski@intel.com
> >>>>
> >>> Cc: Trahe, Fiona <
> >>> fiona.trahe@intel.com
> >>>> ; Ankur Dwivedi
> >>> <
> >>> adwivedi@marvell.com
> >>>> ; Anoob Joseph <
> >>> anoobj@marvell.com
> >>>> ; dpdk
> >>> stable <
> >>> stable@dpdk.org
> >>>>
> >>> Subject: patch 'test/crypto: fix missing operation status check'
> >>> has been
> >>> queued to stable release 19.11.1
> >>>
> >>> Hi,
> >>>
> >>> FYI, your patch has been queued to stable release 19.11.1
> >>>
> >>> Note it hasn't been pushed to
> >>> http://dpdk.org/browse/dpdk-stable
> >>> yet.
> >>> It will be pushed if I get no objections before 02/13/20. So please
> >>> shout if anyone has objections.
> >>>
> >>> Also note that after the patch there's a diff of the upstream commit
> >>> vs the patch applied to the branch. This will indicate if there was
> >>> any rebasing needed to apply to the stable branch. If there were
> >>> code changes for rebasing
> >>> (ie: not only metadata diffs), please double check that the rebase
> >>> was correctly done.
> >>>
> >>> Thanks.
> >>>
> >>> Luca Boccassi
> >>>
> >>> ---
> >>> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
> 00:00:00
> >>> 2001
> >>> From: Adam Dybkowski <
> >>> adamx.dybkowski@intel.com
> >>>>
> >>> Date: Fri, 20 Dec 2019 13:58:52 +0100
> >>> Subject: [PATCH] test/crypto: fix missing operation status check
> >>>
> >>> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> >>>
> >>> This patch adds checking of the symmetric crypto operation status
> >>> that was
> >>> silently skipped before. It fixes the wireless algorithms session
> >>> creation
> >>> (SNOW3G, KASUMI, ZUC) and passing of the digest data for the
> >>> verification
> >>> by PMD. Also fixed the missing aad padding issue revealed after op
> >>> status
> >>> checking was introduced.
> >>>
> >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> >>> oriented")
> >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> >>>
> >>> Signed-off-by: Adam Dybkowski <
> >>> adamx.dybkowski@intel.com
> >>>>
> >>> Acked-by: Fiona Trahe <
> >>> fiona.trahe@intel.com
> >>>>
> >>> Tested-by: Ankur Dwivedi <
> >>> adwivedi@marvell.com
> >>>>
> >>> Reviewed-by: Anoob Joseph <
> >>> anoobj@marvell.com
> >>>>
> >>> ---
> >>> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------
> >>> ------
> >>> 1 file changed, 52 insertions(+), 44 deletions(-)
> >>>
> >>> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> >>> index
> >>> 1b561456d7..79ced809de 100644
> >>> --- a/app/test/test_cryptodev.c
> >>> +++ b/app/test/test_cryptodev.c
> >>> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
> >>> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
> >>> if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
> >>> - printf("Error sending packet for encryption");
> >>> + RTE_LOG(ERR, USER1, "Error sending packet for
> >>> encryption\n");
> >>> return NULL;
> >>> }
> >>>
> >>> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
> >>> rte_crypto_op *op)
> >>> while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
> >>> rte_pause();
> >>>
> >>> + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
> >>> + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
> >>>> status);
> >>>
> >>> + return NULL;
> >>> + }
> >>> +
> >>> return op;
> >>> }
> >>>
> >>> @@ -2823,9 +2828,18 @@
> >>> create_wireless_algo_auth_cipher_session(uint8_t dev_id,
> >>> ut_params->sess = rte_cryptodev_sym_session_create(
> >>> ts_params->session_mpool);
> >>>
> >>> - status = rte_cryptodev_sym_session_init(dev_id, ut_params-
> >>>> sess,
> >>> - &ut_params->auth_xform,
> >>> - ts_params->session_priv_mpool);
> >>> + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
> >>> + ut_params->auth_xform.next = NULL;
> >>> + ut_params->cipher_xform.next = &ut_params->auth_xform;
> >>> + status = rte_cryptodev_sym_session_init(dev_id,
> >>> ut_params-
> >>>> sess,
> >>>
> >>> + &ut_params->cipher_xform,
> >>> + ts_params->session_priv_mpool);
> >>> +
> >>> + } else
> >>> + status = rte_cryptodev_sym_session_init(dev_id,
> >>> ut_params-
> >>>> sess,
> >>>
> >>> + &ut_params->auth_xform,
> >>> + ts_params->session_priv_mpool);
> >>> +
> >>> TEST_ASSERT_EQUAL(status, 0, "session init failed");
> >>> TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
> >>> failed");
> >>>
> >>> @@ -3018,13 +3032,14 @@
> >>> create_wireless_algo_cipher_hash_operation(const uint8_t
> >>> *auth_tag, }
> >>>
> >>> static int
> >>> -create_wireless_algo_auth_cipher_operation(unsigned int
> >>> auth_tag_len,
> >>> +create_wireless_algo_auth_cipher_operation(
> >>> + const uint8_t *auth_tag, unsigned int auth_tag_len,
> >>> const uint8_t *cipher_iv, uint8_t cipher_iv_len,
> >>> const uint8_t *auth_iv, uint8_t auth_iv_len,
> >>> unsigned int data_pad_len,
> >>> unsigned int cipher_len, unsigned int cipher_offset,
> >>> unsigned int auth_len, unsigned int auth_offset,
> >>> - uint8_t op_mode, uint8_t do_sgl)
> >>> + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
> >>> {
> >>> struct crypto_testsuite_params *ts_params = &testsuite_params;
> >>> struct crypto_unittest_params *ut_params = &unittest_params; @@
> >>> -3081,6 +3096,10 @@
> >>> create_wireless_algo_auth_cipher_operation(unsigned int
> >>> auth_tag_len,
> >>> }
> >>> }
> >>>
> >>> + /* Copy digest for the verification */
> >>> + if (verify)
> >>> + memcpy(sym_op->auth.digest.data, auth_tag,
> >>> auth_tag_len);
> >>> +
> >>> /* Copy cipher and auth IVs at the end of the crypto operation
> >>> */
> >>> uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
> >>> ut_params->op, uint8_t *, IV_OFFSET); @@
> >>> -4643,7
> >>> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
> >>> *tdata,
> >>>
> >>> /* Create SNOW 3G operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> tdata->auth_iv.data, tdata->auth_iv.len,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
> >>> snow3g_test_data *tdata,
> >>> tdata->cipher.offset_bits,
> >>> tdata->validAuthLenInBits.len,
> >>> tdata->auth.offset_bits,
> >>> - op_mode, 0);
> >>> + op_mode, 0, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
> >>> snow3g_test_data *tdata,
> >>>
> >>> /* Create SNOW 3G operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> tdata->auth_iv.data, tdata->auth_iv.len,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
> >>> snow3g_test_data *tdata,
> >>> tdata->cipher.offset_bits,
> >>> tdata->validAuthLenInBits.len,
> >>> tdata->auth.offset_bits,
> >>> - op_mode, 1);
> >>> + op_mode, 1, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
> >>> kasumi_test_data *tdata,
> >>>
> >>> /* Create KASUMI operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> NULL, 0,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
> >>> kasumi_test_data *tdata,
> >>> tdata->validCipherOffsetInBits.len,
> >>> tdata->validAuthLenInBits.len,
> >>> 0,
> >>> - op_mode, 0);
> >>> + op_mode, 0, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
> >>> kasumi_test_data *tdata,
> >>>
> >>> /* Create KASUMI operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> NULL, 0,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
> >>> kasumi_test_data *tdata,
> >>> tdata->validCipherOffsetInBits.len,
> >>> tdata->validAuthLenInBits.len,
> >>> 0,
> >>> - op_mode, 1);
> >>> + op_mode, 1, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
> >>> wireless_test_data *tdata,
> >>>
> >>> /* Create ZUC operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> tdata->auth_iv.data, tdata->auth_iv.len,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
> >>> wireless_test_data *tdata,
> >>> tdata->validCipherOffsetInBits.len,
> >>> tdata->validAuthLenInBits.len,
> >>> 0,
> >>> - op_mode, 0);
> >>> + op_mode, 0, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
> >>> wireless_test_data *tdata,
> >>>
> >>> /* Create ZUC operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest.len,
> >>> + tdata->digest.data, tdata->digest.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> NULL, 0,
> >>> (tdata->digest.offset_bytes == 0 ?
> >>> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
> >>> wireless_test_data *tdata,
> >>> tdata->validCipherOffsetInBits.len,
> >>> tdata->validAuthLenInBits.len,
> >>> 0,
> >>> - op_mode, 1);
> >>> + op_mode, 1, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
> >>> mixed_cipher_auth_test_data *tdata,
> >>>
> >>> /* Create the operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest_enc.len,
> >>> + tdata->digest_enc.data, tdata->digest_enc.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> tdata->auth_iv.data, tdata->auth_iv.len,
> >>> (tdata->digest_enc.offset == 0 ?
> >>> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
> >>> mixed_cipher_auth_test_data *tdata,
> >>> tdata->cipher.offset_bits,
> >>> tdata->validAuthLen.len_bits,
> >>> tdata->auth.offset_bits,
> >>> - op_mode, 0);
> >>> + op_mode, 0, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
> >>> mixed_cipher_auth_test_data *tdata,
> >>>
> >>> /* Create the operation */
> >>> retval = create_wireless_algo_auth_cipher_operation(
> >>> - tdata->digest_enc.len,
> >>> + tdata->digest_enc.data, tdata->digest_enc.len,
> >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> >>> tdata->auth_iv.data, tdata->auth_iv.len,
> >>> (tdata->digest_enc.offset == 0 ?
> >>> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
> >>> mixed_cipher_auth_test_data *tdata,
> >>> tdata->cipher.offset_bits,
> >>> tdata->validAuthLen.len_bits,
> >>> tdata->auth.offset_bits,
> >>> - op_mode, 1);
> >>> + op_mode, 1, verify);
> >>>
> >>> if (retval < 0)
> >>> return retval;
> >>> @@ -10818,13 +10837,8 @@
> >>> test_authentication_verify_fail_when_data_corruption(
> >>>
> >>> ut_params->op = process_crypto_request(ts_params-
> >>>> valid_devs[0],
> >>> ut_params->op);
> >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> >>> - "authentication not failed");
> >>>
> >>> - ut_params->obuf = ut_params->op->sym->m_src;
> >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> >>> obuf");
> >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >>>
> >>> return 0;
> >>> }
> >>> @@ -10879,13 +10893,8 @@
> >>> test_authentication_verify_GMAC_fail_when_corruption(
> >>>
> >>> ut_params->op = process_crypto_request(ts_params-
> >>>> valid_devs[0],
> >>> ut_params->op);
> >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> >>> - "authentication not failed");
> >>>
> >>> - ut_params->obuf = ut_params->op->sym->m_src;
> >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> >>> obuf");
> >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >>>
> >>> return 0;
> >>> }
> >>> @@ -10940,13 +10949,7 @@
> >>> test_authenticated_decryption_fail_when_corruption(
> >>> ut_params->op = process_crypto_request(ts_params-
> >>>> valid_devs[0],
> >>> ut_params->op);
> >>>
> >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> >>> - "authentication not failed");
> >>> -
> >>> - ut_params->obuf = ut_params->op->sym->m_src;
> >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> >>> obuf");
> >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> >>>
> >>> return 0;
> >>> }
> >>> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
> >>> rte_crypto_aead_operation op,
> >>> const unsigned int auth_tag_len = tdata->auth_tag.len;
> >>> const unsigned int iv_len = tdata->iv.len;
> >>> unsigned int aad_len = tdata->aad.len;
> >>> + unsigned int aad_len_pad = 0;
> >>>
> >>> /* Generate Crypto op data structure */
> >>> ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
> >>> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
> >>> rte_crypto_aead_operation op,
> >>>
> >>> rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
> >>>
> >>> + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
> >>> +
> >>> sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
> >>> - ut_params->ibuf, aad_len);
> >>> + ut_params->ibuf, aad_len_pad);
> >>> TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
> >>> "no room to prepend aad");
> >>> sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
> >>> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
> >>> rte_crypto_aead_operation op,
> >>> }
> >>>
> >>> sym_op->aead.data.length = tdata->plaintext.len;
> >>> - sym_op->aead.data.offset = aad_len;
> >>> + sym_op->aead.data.offset = aad_len_pad;
> >>>
> >>> return 0;
> >>> }
> >>> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const
> >>> struct
> >>> aead_test_data *tdata,
> >>> int ecx = 0;
> >>> void *digest_mem = NULL;
> >>>
> >>> - uint32_t prepend_len = tdata->aad.len;
> >>> + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
> >>>
> >>> if (tdata->plaintext.len % fragsz != 0) {
> >>> if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@
> >>> -
> >>> 11915,6 +11921,8 @@ static struct unit_test_suite
> >>> cryptodev_qat_testsuite =
> >>> {
> >>>
> >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
> >>> TEST_CASE_ST(ut_setup, ut_teardown,
> >>>
> >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
> >>> + TEST_CASE_ST(ut_setup, ut_teardown,
> >>> +
> >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
> >>> TEST_CASE_ST(ut_setup, ut_teardown,
> >>>
> >>> test_AES_GCM_authenticated_encryption_test_case_1),
> >>> TEST_CASE_ST(ut_setup, ut_teardown,
> >>> --
> >>> 2.20.1
> >>>
> >>> ---
> >>> Diff of the applied patch vs upstream commit (please double-check
> >>> if non-
> >>> empty:
> >>> ---
> >>> --- - 2020-02-11 11:17:39.986002596 +0000
> >>> +++ 0023-test-crypto-fix-missing-operation-status-check.patch
> >>> 2020-02-11
> >>> 11:17:38.332000075 +0000
> >>> @@ -1,8 +1,10 @@
> >>> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17
> 00:00:00
> >>> 2001
> >>> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
> 00:00:00
> >>> 2001
> >>> From: Adam Dybkowski <
> >>> adamx.dybkowski@intel.com
> >>>>
> >>> Date: Fri, 20 Dec 2019 13:58:52 +0100
> >>> Subject: [PATCH] test/crypto: fix missing operation status check
> >>>
> >>> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> >>> +
> >>> This patch adds checking of the symmetric crypto operation
> >>> status that was
> >>> silently skipped before. It fixes the wireless algorithms session
> >>> creation
> >>> (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@
> >>>
> >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> >>> oriented")
> >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> >>> -Cc:
> >>> stable@dpdk.org
> >>>
> >>>
> >>> Signed-off-by: Adam Dybkowski <
> >>> adamx.dybkowski@intel.com
> >>>>
> >>> Acked-by: Fiona Trahe <
> >>> fiona.trahe@intel.com
> >>>>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-12 11:19 ` Dybkowski, AdamX
@ 2020-02-12 11:21 ` Dybkowski, AdamX
2020-02-12 13:43 ` Kevin Traynor
1 sibling, 0 replies; 310+ messages in thread
From: Dybkowski, AdamX @ 2020-02-12 11:21 UTC (permalink / raw)
To: Kevin Traynor; +Cc: dpdk stable
Sorry, the filename for 18.11 fix is test/test/test_cryptodev.c of course.
And I have no issues in applying the patch onto 18.11 branch.
Adam
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Dybkowski,
> AdamX
> Sent: Wednesday, 12 February, 2020 12:20
> To: Kevin Traynor <ktraynor@redhat.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: Re: [dpdk-stable] patch 'test/crypto: fix missing operation status
> check' has been queued to stable release 19.11.1
>
> Hi Kevin.
>
> I made the fix to be applied onto "18.11" branch at:
> Clone URL: git://dpdk.org/dpdk-stable
> Last commits: https://git.dpdk.org/dpdk-stable/log/?h=18.11
> Is this the correct one?
>
> The patch I sent (that updates the file app/test/test_cryptodev.c only) can be
> applied on my side with no issues.
>
> Adam
>
> > -----Original Message-----
> > From: Kevin Traynor [mailto:ktraynor@redhat.com]
> > Sent: Tuesday, 11 February, 2020 13:10
> > To: Luca Boccassi <luca.boccassi@gmail.com>; Dybkowski, AdamX
> > <adamx.dybkowski@intel.com>
> > Cc: Trahe, Fiona <fiona.trahe@intel.com>; Ankur Dwivedi
> > <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; dpdk
> stable
> > <stable@dpdk.org>
> > Subject: Re: patch 'test/crypto: fix missing operation status check'
> > has been queued to stable release 19.11.1
> >
> > On 11/02/2020 11:52, Luca Boccassi wrote:
> > > Hi,
> > >
> > > That's a question for Kevin, the 18.11 maintainer.
> > >
> > > On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote:
> > >> Hi Luca.
> > >>
> > >> I originally targeted this patch for DPDK 18.11. That's good it'll
> > >> go into 19.11, too. But will it be applied to 18.11 as well?
> > >>
> >
> > I tried to apply it on 18.11 branch last week, but it doesn't apply
> > and I have a note to say there was too much churn. So, you'll need to
> > send a rebased version on 18.11 branch. It will be on the list of
> > commits that didn't apply and asking authors for rebase that I'll send out a
> bit later.
> >
> > >> Adam
> > >>
> > >>> -----Original Message-----
> > >>> From:
> > >>> luca.boccassi@gmail.com
> > >>> [mailto:
> > >>> luca.boccassi@gmail.com
> > >>> ]
> > >>> Sent: Tuesday, 11 February, 2020 12:19
> > >>> To: Dybkowski, AdamX <
> > >>> adamx.dybkowski@intel.com
> > >>>>
> > >>> Cc: Trahe, Fiona <
> > >>> fiona.trahe@intel.com
> > >>>> ; Ankur Dwivedi
> > >>> <
> > >>> adwivedi@marvell.com
> > >>>> ; Anoob Joseph <
> > >>> anoobj@marvell.com
> > >>>> ; dpdk
> > >>> stable <
> > >>> stable@dpdk.org
> > >>>>
> > >>> Subject: patch 'test/crypto: fix missing operation status check'
> > >>> has been
> > >>> queued to stable release 19.11.1
> > >>>
> > >>> Hi,
> > >>>
> > >>> FYI, your patch has been queued to stable release 19.11.1
> > >>>
> > >>> Note it hasn't been pushed to
> > >>> http://dpdk.org/browse/dpdk-stable
> > >>> yet.
> > >>> It will be pushed if I get no objections before 02/13/20. So
> > >>> please shout if anyone has objections.
> > >>>
> > >>> Also note that after the patch there's a diff of the upstream
> > >>> commit vs the patch applied to the branch. This will indicate if
> > >>> there was any rebasing needed to apply to the stable branch. If
> > >>> there were code changes for rebasing
> > >>> (ie: not only metadata diffs), please double check that the rebase
> > >>> was correctly done.
> > >>>
> > >>> Thanks.
> > >>>
> > >>> Luca Boccassi
> > >>>
> > >>> ---
> > >>> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
> > 00:00:00
> > >>> 2001
> > >>> From: Adam Dybkowski <
> > >>> adamx.dybkowski@intel.com
> > >>>>
> > >>> Date: Fri, 20 Dec 2019 13:58:52 +0100
> > >>> Subject: [PATCH] test/crypto: fix missing operation status check
> > >>>
> > >>> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> > >>>
> > >>> This patch adds checking of the symmetric crypto operation status
> > >>> that was silently skipped before. It fixes the wireless algorithms
> > >>> session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
> > >>> data for the verification by PMD. Also fixed the missing aad
> > >>> padding issue revealed after op status checking was introduced.
> > >>>
> > >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> > >>> oriented")
> > >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> > >>>
> > >>> Signed-off-by: Adam Dybkowski <
> > >>> adamx.dybkowski@intel.com
> > >>>>
> > >>> Acked-by: Fiona Trahe <
> > >>> fiona.trahe@intel.com
> > >>>>
> > >>> Tested-by: Ankur Dwivedi <
> > >>> adwivedi@marvell.com
> > >>>>
> > >>> Reviewed-by: Anoob Joseph <
> > >>> anoobj@marvell.com
> > >>>>
> > >>> ---
> > >>> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------
> > >>> ------
> > >>> 1 file changed, 52 insertions(+), 44 deletions(-)
> > >>>
> > >>> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> > >>> index 1b561456d7..79ced809de 100644
> > >>> --- a/app/test/test_cryptodev.c
> > >>> +++ b/app/test/test_cryptodev.c
> > >>> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
> > >>> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
> > >>> if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
> > >>> - printf("Error sending packet for encryption");
> > >>> + RTE_LOG(ERR, USER1, "Error sending packet for
> > >>> encryption\n");
> > >>> return NULL;
> > >>> }
> > >>>
> > >>> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
> > >>> rte_crypto_op *op)
> > >>> while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
> > >>> rte_pause();
> > >>>
> > >>> + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
> > >>> + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
> > >>>> status);
> > >>>
> > >>> + return NULL;
> > >>> + }
> > >>> +
> > >>> return op;
> > >>> }
> > >>>
> > >>> @@ -2823,9 +2828,18 @@
> > >>> create_wireless_algo_auth_cipher_session(uint8_t dev_id,
> > >>> ut_params->sess = rte_cryptodev_sym_session_create(
> > >>> ts_params->session_mpool);
> > >>>
> > >>> - status = rte_cryptodev_sym_session_init(dev_id, ut_params-
> > >>>> sess,
> > >>> - &ut_params->auth_xform,
> > >>> - ts_params->session_priv_mpool);
> > >>> + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
> > >>> + ut_params->auth_xform.next = NULL;
> > >>> + ut_params->cipher_xform.next = &ut_params->auth_xform;
> > >>> + status = rte_cryptodev_sym_session_init(dev_id,
> > >>> ut_params-
> > >>>> sess,
> > >>>
> > >>> + &ut_params->cipher_xform,
> > >>> + ts_params->session_priv_mpool);
> > >>> +
> > >>> + } else
> > >>> + status = rte_cryptodev_sym_session_init(dev_id,
> > >>> ut_params-
> > >>>> sess,
> > >>>
> > >>> + &ut_params->auth_xform,
> > >>> + ts_params->session_priv_mpool);
> > >>> +
> > >>> TEST_ASSERT_EQUAL(status, 0, "session init failed");
> > >>> TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
> > >>> failed");
> > >>>
> > >>> @@ -3018,13 +3032,14 @@
> > >>> create_wireless_algo_cipher_hash_operation(const uint8_t
> > >>> *auth_tag, }
> > >>>
> > >>> static int
> > >>> -create_wireless_algo_auth_cipher_operation(unsigned int
> > >>> auth_tag_len,
> > >>> +create_wireless_algo_auth_cipher_operation(
> > >>> + const uint8_t *auth_tag, unsigned int auth_tag_len,
> > >>> const uint8_t *cipher_iv, uint8_t cipher_iv_len,
> > >>> const uint8_t *auth_iv, uint8_t auth_iv_len,
> > >>> unsigned int data_pad_len,
> > >>> unsigned int cipher_len, unsigned int cipher_offset,
> > >>> unsigned int auth_len, unsigned int auth_offset,
> > >>> - uint8_t op_mode, uint8_t do_sgl)
> > >>> + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
> > >>> {
> > >>> struct crypto_testsuite_params *ts_params = &testsuite_params;
> > >>> struct crypto_unittest_params *ut_params = &unittest_params; @@
> > >>> -3081,6 +3096,10 @@
> > >>> create_wireless_algo_auth_cipher_operation(unsigned int
> > >>> auth_tag_len,
> > >>> }
> > >>> }
> > >>>
> > >>> + /* Copy digest for the verification */
> > >>> + if (verify)
> > >>> + memcpy(sym_op->auth.digest.data, auth_tag,
> > >>> auth_tag_len);
> > >>> +
> > >>> /* Copy cipher and auth IVs at the end of the crypto operation
> > >>> */
> > >>> uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
> > >>> ut_params->op, uint8_t *, IV_OFFSET); @@
> > >>> -4643,7
> > >>> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
> > >>> *tdata,
> > >>>
> > >>> /* Create SNOW 3G operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> tdata->auth_iv.data, tdata->auth_iv.len,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
> > >>> snow3g_test_data *tdata,
> > >>> tdata->cipher.offset_bits,
> > >>> tdata->validAuthLenInBits.len,
> > >>> tdata->auth.offset_bits,
> > >>> - op_mode, 0);
> > >>> + op_mode, 0, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
> > >>> snow3g_test_data *tdata,
> > >>>
> > >>> /* Create SNOW 3G operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> tdata->auth_iv.data, tdata->auth_iv.len,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
> > >>> snow3g_test_data *tdata,
> > >>> tdata->cipher.offset_bits,
> > >>> tdata->validAuthLenInBits.len,
> > >>> tdata->auth.offset_bits,
> > >>> - op_mode, 1);
> > >>> + op_mode, 1, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
> > >>> kasumi_test_data *tdata,
> > >>>
> > >>> /* Create KASUMI operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> NULL, 0,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
> > >>> kasumi_test_data *tdata,
> > >>> tdata->validCipherOffsetInBits.len,
> > >>> tdata->validAuthLenInBits.len,
> > >>> 0,
> > >>> - op_mode, 0);
> > >>> + op_mode, 0, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
> > >>> kasumi_test_data *tdata,
> > >>>
> > >>> /* Create KASUMI operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> NULL, 0,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
> > >>> kasumi_test_data *tdata,
> > >>> tdata->validCipherOffsetInBits.len,
> > >>> tdata->validAuthLenInBits.len,
> > >>> 0,
> > >>> - op_mode, 1);
> > >>> + op_mode, 1, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
> > >>> wireless_test_data *tdata,
> > >>>
> > >>> /* Create ZUC operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> tdata->auth_iv.data, tdata->auth_iv.len,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
> > >>> wireless_test_data *tdata,
> > >>> tdata->validCipherOffsetInBits.len,
> > >>> tdata->validAuthLenInBits.len,
> > >>> 0,
> > >>> - op_mode, 0);
> > >>> + op_mode, 0, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
> > >>> wireless_test_data *tdata,
> > >>>
> > >>> /* Create ZUC operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest.len,
> > >>> + tdata->digest.data, tdata->digest.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> NULL, 0,
> > >>> (tdata->digest.offset_bytes == 0 ?
> > >>> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
> > >>> wireless_test_data *tdata,
> > >>> tdata->validCipherOffsetInBits.len,
> > >>> tdata->validAuthLenInBits.len,
> > >>> 0,
> > >>> - op_mode, 1);
> > >>> + op_mode, 1, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
> > >>> mixed_cipher_auth_test_data *tdata,
> > >>>
> > >>> /* Create the operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest_enc.len,
> > >>> + tdata->digest_enc.data, tdata->digest_enc.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> tdata->auth_iv.data, tdata->auth_iv.len,
> > >>> (tdata->digest_enc.offset == 0 ?
> > >>> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
> > >>> mixed_cipher_auth_test_data *tdata,
> > >>> tdata->cipher.offset_bits,
> > >>> tdata->validAuthLen.len_bits,
> > >>> tdata->auth.offset_bits,
> > >>> - op_mode, 0);
> > >>> + op_mode, 0, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
> > >>> mixed_cipher_auth_test_data *tdata,
> > >>>
> > >>> /* Create the operation */
> > >>> retval = create_wireless_algo_auth_cipher_operation(
> > >>> - tdata->digest_enc.len,
> > >>> + tdata->digest_enc.data, tdata->digest_enc.len,
> > >>> tdata->cipher_iv.data, tdata->cipher_iv.len,
> > >>> tdata->auth_iv.data, tdata->auth_iv.len,
> > >>> (tdata->digest_enc.offset == 0 ?
> > >>> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
> > >>> mixed_cipher_auth_test_data *tdata,
> > >>> tdata->cipher.offset_bits,
> > >>> tdata->validAuthLen.len_bits,
> > >>> tdata->auth.offset_bits,
> > >>> - op_mode, 1);
> > >>> + op_mode, 1, verify);
> > >>>
> > >>> if (retval < 0)
> > >>> return retval;
> > >>> @@ -10818,13 +10837,8 @@
> > >>> test_authentication_verify_fail_when_data_corruption(
> > >>>
> > >>> ut_params->op = process_crypto_request(ts_params-
> > >>>> valid_devs[0],
> > >>> ut_params->op);
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > >>> - "authentication not failed");
> > >>>
> > >>> - ut_params->obuf = ut_params->op->sym->m_src;
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > >>> obuf");
> > >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> > >>>
> > >>> return 0;
> > >>> }
> > >>> @@ -10879,13 +10893,8 @@
> > >>> test_authentication_verify_GMAC_fail_when_corruption(
> > >>>
> > >>> ut_params->op = process_crypto_request(ts_params-
> > >>>> valid_devs[0],
> > >>> ut_params->op);
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > >>> - "authentication not failed");
> > >>>
> > >>> - ut_params->obuf = ut_params->op->sym->m_src;
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > >>> obuf");
> > >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> > >>>
> > >>> return 0;
> > >>> }
> > >>> @@ -10940,13 +10949,7 @@
> > >>> test_authenticated_decryption_fail_when_corruption(
> > >>> ut_params->op = process_crypto_request(ts_params-
> > >>>> valid_devs[0],
> > >>> ut_params->op);
> > >>>
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
> > >>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
> > >>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
> > >>> - "authentication not failed");
> > >>> -
> > >>> - ut_params->obuf = ut_params->op->sym->m_src;
> > >>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
> > >>> obuf");
> > >>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
> > >>>
> > >>> return 0;
> > >>> }
> > >>> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
> > >>> rte_crypto_aead_operation op,
> > >>> const unsigned int auth_tag_len = tdata->auth_tag.len;
> > >>> const unsigned int iv_len = tdata->iv.len;
> > >>> unsigned int aad_len = tdata->aad.len;
> > >>> + unsigned int aad_len_pad = 0;
> > >>>
> > >>> /* Generate Crypto op data structure */
> > >>> ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
> > >>> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
> > >>> rte_crypto_aead_operation op,
> > >>>
> > >>> rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
> > >>>
> > >>> + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
> > >>> +
> > >>> sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
> > >>> - ut_params->ibuf, aad_len);
> > >>> + ut_params->ibuf, aad_len_pad);
> > >>> TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
> > >>> "no room to prepend aad");
> > >>> sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
> > >>> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
> > >>> rte_crypto_aead_operation op,
> > >>> }
> > >>>
> > >>> sym_op->aead.data.length = tdata->plaintext.len;
> > >>> - sym_op->aead.data.offset = aad_len;
> > >>> + sym_op->aead.data.offset = aad_len_pad;
> > >>>
> > >>> return 0;
> > >>> }
> > >>> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const
> > >>> struct
> > >>> aead_test_data *tdata,
> > >>> int ecx = 0;
> > >>> void *digest_mem = NULL;
> > >>>
> > >>> - uint32_t prepend_len = tdata->aad.len;
> > >>> + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
> > >>>
> > >>> if (tdata->plaintext.len % fragsz != 0) {
> > >>> if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@
> > >>> -
> > >>> 11915,6 +11921,8 @@ static struct unit_test_suite
> > >>> cryptodev_qat_testsuite = {
> > >>>
> > >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
> > >>> TEST_CASE_ST(ut_setup, ut_teardown,
> > >>>
> > >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
> > >>> + TEST_CASE_ST(ut_setup, ut_teardown,
> > >>> +
> > >>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
> > >>> TEST_CASE_ST(ut_setup, ut_teardown,
> > >>>
> > >>> test_AES_GCM_authenticated_encryption_test_case_1),
> > >>> TEST_CASE_ST(ut_setup, ut_teardown,
> > >>> --
> > >>> 2.20.1
> > >>>
> > >>> ---
> > >>> Diff of the applied patch vs upstream commit (please
> > >>> double-check if non-
> > >>> empty:
> > >>> ---
> > >>> --- - 2020-02-11 11:17:39.986002596 +0000
> > >>> +++ 0023-test-crypto-fix-missing-operation-status-check.patch
> > >>> 2020-02-11
> > >>> 11:17:38.332000075 +0000
> > >>> @@ -1,8 +1,10 @@
> > >>> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17
> > 00:00:00
> > >>> 2001
> > >>> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
> > 00:00:00
> > >>> 2001
> > >>> From: Adam Dybkowski <
> > >>> adamx.dybkowski@intel.com
> > >>>>
> > >>> Date: Fri, 20 Dec 2019 13:58:52 +0100
> > >>> Subject: [PATCH] test/crypto: fix missing operation status check
> > >>>
> > >>> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
> > >>> +
> > >>> This patch adds checking of the symmetric crypto operation status
> > >>> that was silently skipped before. It fixes the wireless algorithms
> > >>> session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
> > >>> @@ -11,7 +13,6 @@
> > >>>
> > >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
> > >>> oriented")
> > >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
> > >>> -Cc:
> > >>> stable@dpdk.org
> > >>>
> > >>>
> > >>> Signed-off-by: Adam Dybkowski <
> > >>> adamx.dybkowski@intel.com
> > >>>>
> > >>> Acked-by: Fiona Trahe <
> > >>> fiona.trahe@intel.com
> > >>>>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1
2020-02-12 11:19 ` Dybkowski, AdamX
2020-02-12 11:21 ` Dybkowski, AdamX
@ 2020-02-12 13:43 ` Kevin Traynor
1 sibling, 0 replies; 310+ messages in thread
From: Kevin Traynor @ 2020-02-12 13:43 UTC (permalink / raw)
To: Dybkowski, AdamX; +Cc: dpdk stable
On 12/02/2020 11:19, Dybkowski, AdamX wrote:
> Hi Kevin.
>
> I made the fix to be applied onto "18.11" branch at:
> Clone URL: git://dpdk.org/dpdk-stable
> Last commits: https://git.dpdk.org/dpdk-stable/log/?h=18.11
> Is this the correct one?
>
Yes
> The patch I sent (that updates the file app/test/test_cryptodev.c only) can be applied on my side with no issues.
>
Ok, I understand it now. I was referring to cherry-picking the original
commit from master. I didn't realise that you sent a separate backport
version. I confirm that it applies cleanly to 18.11.
I missed it because stable list is high volume and the patch was not
having '18.11' in the subject [1]. I'll adjust my email filters to be a
bit more liberal as others could miss that too. Anyway, we would have
caught it a little later when I emailed you to say needed your help with
the backport.
thanks for following up,
Kevin.
[1]
http://doc.dpdk.org/guides/contributing/patches.html#backporting-patches-for-stable-releases
> Adam
>
>> -----Original Message-----
>> From: Kevin Traynor [mailto:ktraynor@redhat.com]
>> Sent: Tuesday, 11 February, 2020 13:10
>> To: Luca Boccassi <luca.boccassi@gmail.com>; Dybkowski, AdamX
>> <adamx.dybkowski@intel.com>
>> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Ankur Dwivedi
>> <adwivedi@marvell.com>; Anoob Joseph <anoobj@marvell.com>; dpdk
>> stable <stable@dpdk.org>
>> Subject: Re: patch 'test/crypto: fix missing operation status check' has been
>> queued to stable release 19.11.1
>>
>> On 11/02/2020 11:52, Luca Boccassi wrote:
>>> Hi,
>>>
>>> That's a question for Kevin, the 18.11 maintainer.
>>>
>>> On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote:
>>>> Hi Luca.
>>>>
>>>> I originally targeted this patch for DPDK 18.11. That's good it'll go
>>>> into 19.11, too. But will it be applied to 18.11 as well?
>>>>
>>
>> I tried to apply it on 18.11 branch last week, but it doesn't apply and I have a
>> note to say there was too much churn. So, you'll need to send a rebased
>> version on 18.11 branch. It will be on the list of commits that didn't apply and
>> asking authors for rebase that I'll send out a bit later.
>>
>>>> Adam
>>>>
>>>>> -----Original Message-----
>>>>> From:
>>>>> luca.boccassi@gmail.com
>>>>> [mailto:
>>>>> luca.boccassi@gmail.com
>>>>> ]
>>>>> Sent: Tuesday, 11 February, 2020 12:19
>>>>> To: Dybkowski, AdamX <
>>>>> adamx.dybkowski@intel.com
>>>>>>
>>>>> Cc: Trahe, Fiona <
>>>>> fiona.trahe@intel.com
>>>>>> ; Ankur Dwivedi
>>>>> <
>>>>> adwivedi@marvell.com
>>>>>> ; Anoob Joseph <
>>>>> anoobj@marvell.com
>>>>>> ; dpdk
>>>>> stable <
>>>>> stable@dpdk.org
>>>>>>
>>>>> Subject: patch 'test/crypto: fix missing operation status check'
>>>>> has been
>>>>> queued to stable release 19.11.1
>>>>>
>>>>> Hi,
>>>>>
>>>>> FYI, your patch has been queued to stable release 19.11.1
>>>>>
>>>>> Note it hasn't been pushed to
>>>>> http://dpdk.org/browse/dpdk-stable
>>>>> yet.
>>>>> It will be pushed if I get no objections before 02/13/20. So please
>>>>> shout if anyone has objections.
>>>>>
>>>>> Also note that after the patch there's a diff of the upstream commit
>>>>> vs the patch applied to the branch. This will indicate if there was
>>>>> any rebasing needed to apply to the stable branch. If there were
>>>>> code changes for rebasing
>>>>> (ie: not only metadata diffs), please double check that the rebase
>>>>> was correctly done.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Luca Boccassi
>>>>>
>>>>> ---
>>>>> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
>> 00:00:00
>>>>> 2001
>>>>> From: Adam Dybkowski <
>>>>> adamx.dybkowski@intel.com
>>>>>>
>>>>> Date: Fri, 20 Dec 2019 13:58:52 +0100
>>>>> Subject: [PATCH] test/crypto: fix missing operation status check
>>>>>
>>>>> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
>>>>>
>>>>> This patch adds checking of the symmetric crypto operation status
>>>>> that was
>>>>> silently skipped before. It fixes the wireless algorithms session
>>>>> creation
>>>>> (SNOW3G, KASUMI, ZUC) and passing of the digest data for the
>>>>> verification
>>>>> by PMD. Also fixed the missing aad padding issue revealed after op
>>>>> status
>>>>> checking was introduced.
>>>>>
>>>>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
>>>>> oriented")
>>>>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
>>>>>
>>>>> Signed-off-by: Adam Dybkowski <
>>>>> adamx.dybkowski@intel.com
>>>>>>
>>>>> Acked-by: Fiona Trahe <
>>>>> fiona.trahe@intel.com
>>>>>>
>>>>> Tested-by: Ankur Dwivedi <
>>>>> adwivedi@marvell.com
>>>>>>
>>>>> Reviewed-by: Anoob Joseph <
>>>>> anoobj@marvell.com
>>>>>>
>>>>> ---
>>>>> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------
>>>>> ------
>>>>> 1 file changed, 52 insertions(+), 44 deletions(-)
>>>>>
>>>>> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
>>>>> index
>>>>> 1b561456d7..79ced809de 100644
>>>>> --- a/app/test/test_cryptodev.c
>>>>> +++ b/app/test/test_cryptodev.c
>>>>> @@ -143,7 +143,7 @@ static struct rte_crypto_op *
>>>>> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) {
>>>>> if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) != 1) {
>>>>> - printf("Error sending packet for encryption");
>>>>> + RTE_LOG(ERR, USER1, "Error sending packet for
>>>>> encryption\n");
>>>>> return NULL;
>>>>> }
>>>>>
>>>>> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct
>>>>> rte_crypto_op *op)
>>>>> while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) == 0)
>>>>> rte_pause();
>>>>>
>>>>> + if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
>>>>> + RTE_LOG(DEBUG, USER1, "Operation status %d\n", op-
>>>>>> status);
>>>>>
>>>>> + return NULL;
>>>>> + }
>>>>> +
>>>>> return op;
>>>>> }
>>>>>
>>>>> @@ -2823,9 +2828,18 @@
>>>>> create_wireless_algo_auth_cipher_session(uint8_t dev_id,
>>>>> ut_params->sess = rte_cryptodev_sym_session_create(
>>>>> ts_params->session_mpool);
>>>>>
>>>>> - status = rte_cryptodev_sym_session_init(dev_id, ut_params-
>>>>>> sess,
>>>>> - &ut_params->auth_xform,
>>>>> - ts_params->session_priv_mpool);
>>>>> + if (cipher_op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
>>>>> + ut_params->auth_xform.next = NULL;
>>>>> + ut_params->cipher_xform.next = &ut_params->auth_xform;
>>>>> + status = rte_cryptodev_sym_session_init(dev_id,
>>>>> ut_params-
>>>>>> sess,
>>>>>
>>>>> + &ut_params->cipher_xform,
>>>>> + ts_params->session_priv_mpool);
>>>>> +
>>>>> + } else
>>>>> + status = rte_cryptodev_sym_session_init(dev_id,
>>>>> ut_params-
>>>>>> sess,
>>>>>
>>>>> + &ut_params->auth_xform,
>>>>> + ts_params->session_priv_mpool);
>>>>> +
>>>>> TEST_ASSERT_EQUAL(status, 0, "session init failed");
>>>>> TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation
>>>>> failed");
>>>>>
>>>>> @@ -3018,13 +3032,14 @@
>>>>> create_wireless_algo_cipher_hash_operation(const uint8_t
>>>>> *auth_tag, }
>>>>>
>>>>> static int
>>>>> -create_wireless_algo_auth_cipher_operation(unsigned int
>>>>> auth_tag_len,
>>>>> +create_wireless_algo_auth_cipher_operation(
>>>>> + const uint8_t *auth_tag, unsigned int auth_tag_len,
>>>>> const uint8_t *cipher_iv, uint8_t cipher_iv_len,
>>>>> const uint8_t *auth_iv, uint8_t auth_iv_len,
>>>>> unsigned int data_pad_len,
>>>>> unsigned int cipher_len, unsigned int cipher_offset,
>>>>> unsigned int auth_len, unsigned int auth_offset,
>>>>> - uint8_t op_mode, uint8_t do_sgl)
>>>>> + uint8_t op_mode, uint8_t do_sgl, uint8_t verify)
>>>>> {
>>>>> struct crypto_testsuite_params *ts_params = &testsuite_params;
>>>>> struct crypto_unittest_params *ut_params = &unittest_params; @@
>>>>> -3081,6 +3096,10 @@
>>>>> create_wireless_algo_auth_cipher_operation(unsigned int
>>>>> auth_tag_len,
>>>>> }
>>>>> }
>>>>>
>>>>> + /* Copy digest for the verification */
>>>>> + if (verify)
>>>>> + memcpy(sym_op->auth.digest.data, auth_tag,
>>>>> auth_tag_len);
>>>>> +
>>>>> /* Copy cipher and auth IVs at the end of the crypto operation
>>>>> */
>>>>> uint8_t *iv_ptr = rte_crypto_op_ctod_offset(
>>>>> ut_params->op, uint8_t *, IV_OFFSET); @@
>>>>> -4643,7
>>>>> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data
>>>>> *tdata,
>>>>>
>>>>> /* Create SNOW 3G operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct
>>>>> snow3g_test_data *tdata,
>>>>> tdata->cipher.offset_bits,
>>>>> tdata->validAuthLenInBits.len,
>>>>> tdata->auth.offset_bits,
>>>>> - op_mode, 0);
>>>>> + op_mode, 0, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct
>>>>> snow3g_test_data *tdata,
>>>>>
>>>>> /* Create SNOW 3G operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct
>>>>> snow3g_test_data *tdata,
>>>>> tdata->cipher.offset_bits,
>>>>> tdata->validAuthLenInBits.len,
>>>>> tdata->auth.offset_bits,
>>>>> - op_mode, 1);
>>>>> + op_mode, 1, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct
>>>>> kasumi_test_data *tdata,
>>>>>
>>>>> /* Create KASUMI operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> NULL, 0,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct
>>>>> kasumi_test_data *tdata,
>>>>> tdata->validCipherOffsetInBits.len,
>>>>> tdata->validAuthLenInBits.len,
>>>>> 0,
>>>>> - op_mode, 0);
>>>>> + op_mode, 0, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct
>>>>> kasumi_test_data *tdata,
>>>>>
>>>>> /* Create KASUMI operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> NULL, 0,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct
>>>>> kasumi_test_data *tdata,
>>>>> tdata->validCipherOffsetInBits.len,
>>>>> tdata->validAuthLenInBits.len,
>>>>> 0,
>>>>> - op_mode, 1);
>>>>> + op_mode, 1, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct
>>>>> wireless_test_data *tdata,
>>>>>
>>>>> /* Create ZUC operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct
>>>>> wireless_test_data *tdata,
>>>>> tdata->validCipherOffsetInBits.len,
>>>>> tdata->validAuthLenInBits.len,
>>>>> 0,
>>>>> - op_mode, 0);
>>>>> + op_mode, 0, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct
>>>>> wireless_test_data *tdata,
>>>>>
>>>>> /* Create ZUC operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest.len,
>>>>> + tdata->digest.data, tdata->digest.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> NULL, 0,
>>>>> (tdata->digest.offset_bytes == 0 ?
>>>>> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct
>>>>> wireless_test_data *tdata,
>>>>> tdata->validCipherOffsetInBits.len,
>>>>> tdata->validAuthLenInBits.len,
>>>>> 0,
>>>>> - op_mode, 1);
>>>>> + op_mode, 1, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct
>>>>> mixed_cipher_auth_test_data *tdata,
>>>>>
>>>>> /* Create the operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest_enc.len,
>>>>> + tdata->digest_enc.data, tdata->digest_enc.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>>>> (tdata->digest_enc.offset == 0 ?
>>>>> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct
>>>>> mixed_cipher_auth_test_data *tdata,
>>>>> tdata->cipher.offset_bits,
>>>>> tdata->validAuthLen.len_bits,
>>>>> tdata->auth.offset_bits,
>>>>> - op_mode, 0);
>>>>> + op_mode, 0, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct
>>>>> mixed_cipher_auth_test_data *tdata,
>>>>>
>>>>> /* Create the operation */
>>>>> retval = create_wireless_algo_auth_cipher_operation(
>>>>> - tdata->digest_enc.len,
>>>>> + tdata->digest_enc.data, tdata->digest_enc.len,
>>>>> tdata->cipher_iv.data, tdata->cipher_iv.len,
>>>>> tdata->auth_iv.data, tdata->auth_iv.len,
>>>>> (tdata->digest_enc.offset == 0 ?
>>>>> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct
>>>>> mixed_cipher_auth_test_data *tdata,
>>>>> tdata->cipher.offset_bits,
>>>>> tdata->validAuthLen.len_bits,
>>>>> tdata->auth.offset_bits,
>>>>> - op_mode, 1);
>>>>> + op_mode, 1, verify);
>>>>>
>>>>> if (retval < 0)
>>>>> return retval;
>>>>> @@ -10818,13 +10837,8 @@
>>>>> test_authentication_verify_fail_when_data_corruption(
>>>>>
>>>>> ut_params->op = process_crypto_request(ts_params-
>>>>>> valid_devs[0],
>>>>> ut_params->op);
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>>>> - "authentication not failed");
>>>>>
>>>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>>>> obuf");
>>>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>>>
>>>>> return 0;
>>>>> }
>>>>> @@ -10879,13 +10893,8 @@
>>>>> test_authentication_verify_GMAC_fail_when_corruption(
>>>>>
>>>>> ut_params->op = process_crypto_request(ts_params-
>>>>>> valid_devs[0],
>>>>> ut_params->op);
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>>>> - "authentication not failed");
>>>>>
>>>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>>>> obuf");
>>>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>>>
>>>>> return 0;
>>>>> }
>>>>> @@ -10940,13 +10949,7 @@
>>>>> test_authenticated_decryption_fail_when_corruption(
>>>>> ut_params->op = process_crypto_request(ts_params-
>>>>>> valid_devs[0],
>>>>> ut_params->op);
>>>>>
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process");
>>>>> - TEST_ASSERT_NOT_EQUAL(ut_params->op->status,
>>>>> - RTE_CRYPTO_OP_STATUS_SUCCESS,
>>>>> - "authentication not failed");
>>>>> -
>>>>> - ut_params->obuf = ut_params->op->sym->m_src;
>>>>> - TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve
>>>>> obuf");
>>>>> + TEST_ASSERT_NULL(ut_params->op, "authentication not failed");
>>>>>
>>>>> return 0;
>>>>> }
>>>>> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum
>>>>> rte_crypto_aead_operation op,
>>>>> const unsigned int auth_tag_len = tdata->auth_tag.len;
>>>>> const unsigned int iv_len = tdata->iv.len;
>>>>> unsigned int aad_len = tdata->aad.len;
>>>>> + unsigned int aad_len_pad = 0;
>>>>>
>>>>> /* Generate Crypto op data structure */
>>>>> ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool,
>>>>> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum
>>>>> rte_crypto_aead_operation op,
>>>>>
>>>>> rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
>>>>>
>>>>> + aad_len_pad = RTE_ALIGN_CEIL(aad_len, 16);
>>>>> +
>>>>> sym_op->aead.aad.data = (uint8_t *)rte_pktmbuf_prepend(
>>>>> - ut_params->ibuf, aad_len);
>>>>> + ut_params->ibuf, aad_len_pad);
>>>>> TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
>>>>> "no room to prepend aad");
>>>>> sym_op->aead.aad.phys_addr = rte_pktmbuf_iova( @@ -
>>>>> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum
>>>>> rte_crypto_aead_operation op,
>>>>> }
>>>>>
>>>>> sym_op->aead.data.length = tdata->plaintext.len;
>>>>> - sym_op->aead.data.offset = aad_len;
>>>>> + sym_op->aead.data.offset = aad_len_pad;
>>>>>
>>>>> return 0;
>>>>> }
>>>>> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const
>>>>> struct
>>>>> aead_test_data *tdata,
>>>>> int ecx = 0;
>>>>> void *digest_mem = NULL;
>>>>>
>>>>> - uint32_t prepend_len = tdata->aad.len;
>>>>> + uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
>>>>>
>>>>> if (tdata->plaintext.len % fragsz != 0) {
>>>>> if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@
>>>>> -
>>>>> 11915,6 +11921,8 @@ static struct unit_test_suite
>>>>> cryptodev_qat_testsuite =
>>>>> {
>>>>>
>>>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B),
>>>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>>>>
>>>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B),
>>>>> + TEST_CASE_ST(ut_setup, ut_teardown,
>>>>> +
>>>>> test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg),
>>>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>>>>
>>>>> test_AES_GCM_authenticated_encryption_test_case_1),
>>>>> TEST_CASE_ST(ut_setup, ut_teardown,
>>>>> --
>>>>> 2.20.1
>>>>>
>>>>> ---
>>>>> Diff of the applied patch vs upstream commit (please double-check
>>>>> if non-
>>>>> empty:
>>>>> ---
>>>>> --- - 2020-02-11 11:17:39.986002596 +0000
>>>>> +++ 0023-test-crypto-fix-missing-operation-status-check.patch
>>>>> 2020-02-11
>>>>> 11:17:38.332000075 +0000
>>>>> @@ -1,8 +1,10 @@
>>>>> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17
>> 00:00:00
>>>>> 2001
>>>>> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17
>> 00:00:00
>>>>> 2001
>>>>> From: Adam Dybkowski <
>>>>> adamx.dybkowski@intel.com
>>>>>>
>>>>> Date: Fri, 20 Dec 2019 13:58:52 +0100
>>>>> Subject: [PATCH] test/crypto: fix missing operation status check
>>>>>
>>>>> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ]
>>>>> +
>>>>> This patch adds checking of the symmetric crypto operation
>>>>> status that was
>>>>> silently skipped before. It fixes the wireless algorithms session
>>>>> creation
>>>>> (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@
>>>>>
>>>>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op
>>>>> oriented")
>>>>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
>>>>> -Cc:
>>>>> stable@dpdk.org
>>>>>
>>>>>
>>>>> Signed-off-by: Adam Dybkowski <
>>>>> adamx.dybkowski@intel.com
>>>>>>
>>>>> Acked-by: Fiona Trahe <
>>>>> fiona.trahe@intel.com
>>>>>>
>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-11 14:22 ` Luca Boccassi
@ 2020-02-13 9:06 ` Bing Zhao
2020-02-13 9:36 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Bing Zhao @ 2020-02-13 9:06 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi Luca,
I checked the patch and it is OK for me.
After this is applied, then patch #65574 is also needed for 19.11.1.
So many thanks for your help.
BR. Bing
> -----Original Message-----
> From: Luca Boccassi <luca.boccassi@gmail.com>
> Sent: Tuesday, February 11, 2020 10:23 PM
> To: Bing Zhao <bingz@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: patch 'net/mlx5: fix modify actions support limitation' has
> been queued to stable release 19.11.1
>
> Hi,
>
> The rebasing is done and you can see the result in the mail you replied
> to.
>
> The new 19.11 branch will be pushed by the end of the week.
>
> On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> > Hi Luca,
> >
> > Many thanks for your help.
> >
> > Yes, this needs to be also applied to the 19.11 stable branch. I want
> > to rebase it but could not find the branch in
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fg
> it.d
> > pdk.org%2Fdpdk-
> stable%2F&data=02%7C01%7Cbingz%40mellanox.com%7C888
> >
> c4fa2d2b242c93ebc08d7aefde4e1%7Ca652971c7d2e4d9ba6a4d149256
> f461b%7C0%7
> >
> C0%7C637170277804566321&sdata=YMTaedRR3Lv7OKd%2FvhEJ
> 5CXOJ9oHU3h%2B
> > ei4qov0x6RA%3D&reserved=0
> > , so would you please share me the
> > branch information then I can try to finish the rebasing today or
> > early tomorrow.
> >
> > BR. Bing
> >
> > > -----Original Message-----
> > > From:
> > > luca.boccassi@gmail.com
> > > <
> > > luca.boccassi@gmail.com
> > > >
> > > Sent: Tuesday, February 11, 2020 7:21 PM
> > > To: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Cc: Ori Kam <
> > > orika@mellanox.com
> > > >; Slava Ovsiienko
> > > <
> > > viacheslavo@mellanox.com
> > > >; dpdk stable <
> > > stable@dpdk.org
> > > >
> > > Subject: patch 'net/mlx5: fix modify actions support limitation'
> > > has
> > > been queued to stable release 19.11.1
> > >
> > > Hi,
> > >
> > > FYI, your patch has been queued to stable release 19.11.1
> > >
> > > Note it hasn't been pushed to
> > >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >
> > > dpdk.org%2Fbrowse%2Fdpdk-
> > >
> stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> > >
> 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> > >
> 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > > It will be pushed if I get no objections before 02/13/20. So please
> > > shout if anyone has objections.
> > >
> > > Also note that after the patch there's a diff of the upstream commit
> > > vs the patch applied to the branch. This will indicate if there was
> > > any rebasing needed to apply to the stable branch. If there were
> > > code changes for rebasing
> > > (ie: not only metadata diffs), please double check that the rebase
> > > was correctly done.
> > >
> > > Thanks.
> > >
> > > Luca Boccassi
> > >
> > > ---
> > > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > > 00:00:00 2001
> > > From: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > Subject: [PATCH] net/mlx5: fix modify actions support limitation
> > >
> > > [ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > >
> > > In the root table, there is some limitation of total number of
> > > header modify actions, 16 or 8 for each. But in other tables, there
> > > is no such strict limitation. In an IPv6 case, the IP fields
> > > modifying will occupy more actions than that in IPv4, so the total
> > > support number should be increased in order to support as many
> > > actions as possible for an
> > > IPv6 +
> > > TCP packet.
> > > And in the meanwhile, the memory consumption should also be
> taken
> > > into consideration because sometimes only several actions are
> > > needed.
> > > The root table checking could also be done in low layer driver and
> > > the error code will be returned if the actions number is over the
> > > maximal supported value.
> > >
> > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > > number")
> > >
> > > Signed-off-by: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Acked-by: Ori Kam <
> > > orika@mellanox.com
> > > >
> > > Acked-by: Viacheslav Ovsiienko <
> > > viacheslavo@mellanox.com
> > > >
> > > ---
> > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++--------
> ---
> > > --
> > > --
> > > 2 files changed, 66 insertions(+), 53 deletions(-)
> > >
> > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > b/drivers/net/mlx5/mlx5_flow.h index db12715ecc..13bed08d75
> > > 100644
> > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > >
> > > /*
> > > * Number of modification commands.
> > > - * If extensive metadata registers are supported
> > > - * the maximal actions amount is 16 and 8 otherwise.
> > > + * If extensive metadata registers are supported, the maximal
> > > actions
> > > + amount is
> > > + * 16 and 8 otherwise on root table. The validation could also be
> > > done
> > > + in the
> > > + * lower driver layer.
> > > + * On non-root table, there is no limitation, but 32 is enough
> > > right
> > > now.
> > > */
> > > -#define MLX5_MODIFY_NUM 16
> > > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > > +#define MLX5_MAX_MODIFY_NUM 32
> > > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
> > >
> > > /* Modify resource structure */
> > > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9
> @@
> > > struct mlx5_flow_dv_modify_hdr_resource {
> > > /**< Verbs modify header action object. */
> > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > uint32_t actions_num; /**< Number of modification actions.
> > > */
> > > - struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM];
> > > + uint64_t flags; /**< Flags for RDMA API. */
> > > + struct mlx5_modification_cmd actions[];
> > > /**< Modification actions. */
> > > - uint64_t flags; /**< Flags for RDMA API. */
> > > };
> > >
> > > /* Jump action resource structure. */ diff --git
> > > a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> > > index 8f77909419..74d1a68e4a
> > > 100644
> > > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > > @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > rte_flow_item *item,
> > > uint32_t mask;
> > > uint32_t data;
> > >
> > > - if (i >= MLX5_MODIFY_NUM)
> > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > return rte_flow_error_set(error, EINVAL,
> > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > NULL,
> > > "too many items to modify");
> > > @@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > > rte_flow_item *item,
> > > ++i;
> > > ++field;
> > > } while (field->size);
> > > - resource->actions_num = i;
> > > - if (!resource->actions_num)
> > > + if (resource->actions_num == i)
> > > return rte_flow_error_set(error, EINVAL,
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "invalid modification flow
> > > item");
> > > + resource->actions_num = i;
> > > return 0;
> > > }
> > >
> > > @@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > struct mlx5_modification_cmd *actions = &resource->actions[i];
> > > struct field_modify_info *field = modify_vlan_out_first_vid;
> > >
> > > - if (i >= MLX5_MODIFY_NUM)
> > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > return rte_flow_error_set(error, EINVAL,
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many items to modify");
> > > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > struct mlx5_modification_cmd *actions = resource->actions;
> > > uint32_t i = resource->actions_num;
> > >
> > > - if (i >= MLX5_MODIFY_NUM)
> > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > return rte_flow_error_set(error, EINVAL,
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many items to modify");
> @@ -914,10 +914,6 @@
> > > flow_dv_convert_action_set_reg
> > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > ++i;
> > > resource->actions_num = i;
> > > - if (!resource->actions_num)
> > > - return rte_flow_error_set(error, EINVAL,
> > > -
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > - "invalid modification flow
> > > item");
> > > return 0;
> > > }
> > >
> > > @@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> > > domain = sh->rx_domain;
> > > else
> > > domain = sh->tx_domain;
> > > -
> > > /* Lookup a matching resource from cache. */
> > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> > > if (resource->reformat_type == cache_resource-
> > > > reformat_type && @@ -3367,21 +3362,27 @@
> > >
> > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > *
> > > * @param dev
> > > * Pointer to rte_eth_dev structure.
> > > + * @param flags
> > > + * Flags bits to check if root level.
> > > *
> > > * @return
> > > * Max number of modify header actions device can support.
> > > */
> > > static unsigned int
> > > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev,
> uint64_t
> > > flags)
> > > {
> > > /*
> > > * There's no way to directly query the max cap. Although it
> has
> > > to be
> > > * acquried by iterative trial, it is a safe assumption that more
> > > * actions are supported by FW if extensive metadata register
> is
> > > - * supported.
> > > + * supported. (Only in the root table)
> > > */
> > > - return mlx5_flow_ext_mreg_supported(dev) ?
> > > MLX5_MODIFY_NUM :
> > > -
> > > MLX5_MODIFY_NUM_NO_MREG;
> > > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > > + return MLX5_MAX_MODIFY_NUM;
> > > + else
> > > + return mlx5_flow_ext_mreg_supported(dev) ?
> > > +
> > > MLX5_ROOT_TBL_MODIFY_NUM :
> > > +
> > > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > > }
> > >
> > > /**
> > > @@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> > > struct mlx5_ibv_shared *sh = priv->sh;
> > > struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> > > struct mlx5dv_dr_domain *ns;
> > > + uint32_t actions_len;
> > >
> > > - if (resource->actions_num >
> > > flow_dv_modify_hdr_action_max(dev))
> > > + resource->flags =
> > > + dev_flow->group ? 0 :
> > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > + if (resource->actions_num >
> > > flow_dv_modify_hdr_action_max(dev,
> > > + resource->flags))
> > > return rte_flow_error_set(error, EOVERFLOW,
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many modify header
> > > items"); @@ -3483,17 +3488,15 @@
> > > flow_dv_modify_hdr_resource_register
> > > ns = sh->tx_domain;
> > > else
> > > ns = sh->rx_domain;
> > > - resource->flags =
> > > - dev_flow->group ? 0 :
> > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > /* Lookup a matching resource from cache. */
> > > + actions_len = resource->actions_num * sizeof(resource-
> > > > actions[0]);
> > >
> > > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> > > if (resource->ft_type == cache_resource->ft_type &&
> > > resource->actions_num == cache_resource-
> > > > actions_num &&
> > >
> > > resource->flags == cache_resource->flags &&
> > > !memcmp((const void *)resource->actions,
> > > (const void *)cache_resource->actions,
> > > - (resource->actions_num *
> > > - sizeof(resource-
> > > > actions[0])))) {
> > >
> > > + actions_len)) {
> > > DRV_LOG(DEBUG, "modify-header
> > > resource %p: refcnt %d++",
> > > (void *)cache_resource,
> > > rte_atomic32_read(&cache_resource-
> > > > refcnt));
> > >
> > > @@ -3503,18 +3506,18 @@
> flow_dv_modify_hdr_resource_register
> > > }
> > > }
> > > /* Register new modify-header resource. */
> > > - cache_resource = rte_calloc(__func__, 1,
> > > sizeof(*cache_resource), 0);
> > > + cache_resource = rte_calloc(__func__, 1,
> > > + sizeof(*cache_resource) +
> > > actions_len, 0);
> > > if (!cache_resource)
> > > return rte_flow_error_set(error, ENOMEM,
> > >
> > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > > "cannot allocate resource
> > > memory");
> > > *cache_resource = *resource;
> > > + rte_memcpy(cache_resource->actions, resource->actions,
> > > actions_len);
> > > cache_resource->verbs_action =
> > > mlx5_glue->dv_create_flow_action_modify_header
> > > - (sh->ctx, cache_resource-
> > > > ft_type,
> > >
> > > - ns, cache_resource->flags,
> > > - cache_resource->actions_num
> > > *
> > > - sizeof(cache_resource-
> > > > actions[0]),
> > >
> > > + (sh->ctx, cache_resource-
> > > > ft_type, ns,
> > >
> > > + cache_resource->flags,
> > > actions_len,
> > > (uint64_t *)cache_resource-
> > > > actions);
> > >
> > > if (!cache_resource->verbs_action) {
> > > rte_free(cache_resource);
> > > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> rte_eth_dev *dev,
> > > };
> > > int actions_n = 0;
> > > bool actions_end = false;
> > > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res = {
> > > - .ft_type = attr->egress ?
> > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > -
> > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > > - };
> > > + union {
> > > + struct mlx5_flow_dv_modify_hdr_resource res;
> > > + uint8_t len[sizeof(struct
> > > mlx5_flow_dv_modify_hdr_resource) +
> > > + sizeof(struct mlx5_modification_cmd) *
> > > + (MLX5_MAX_MODIFY_NUM + 1)];
> > > + } mhdr_dummy;
> > > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res =
> > > &mhdr_dummy.res;
> > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > uint32_t tag_be;
> > > union mlx5_flow_tbl_key tbl_key;
> > > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> rte_eth_dev *dev,
> > > uint32_t table;
> > > int ret = 0;
> > >
> > > + mhdr_res->ft_type = attr->egress ?
> > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > +
> > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > > ret = mlx5_flow_group_to_table(attr, dev_flow->external, attr-
> > > > group,
> > >
> > > &table, error);
> > > if (ret)
> > > return ret;
> > > dev_flow->group = table;
> > > if (attr->transfer)
> > > - mhdr_res.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > + mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > if (priority == MLX5_FLOW_PRIO_RSVD)
> > > priority = dev_conf->flow_prio - 1;
> > > + /* number of actions must be set to 0 in case of dirty stack.
> > > */
> > > + mhdr_res->actions_num = 0;
> > > for (; !actions_end ; actions++) {
> > > const struct rte_flow_action_queue *queue;
> > > const struct rte_flow_action_rss *rss; @@ -6731,7
> > > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > > };
> > >
> > > if (flow_dv_convert_action_mark(dev,
> &mark,
> > > -
> > > &mhdr_res,
> > > +
> > > mhdr_res,
> > > error))
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > actions->conf;
> > >
> > > if (flow_dv_convert_action_mark(dev,
> mark,
> > > -
> > > &mhdr_res,
> > > +
> > > mhdr_res,
> > > error))
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > if (flow_dv_convert_action_set_meta
> > > - (dev, &mhdr_res, attr,
> > > + (dev, mhdr_res, attr,
> > > (const struct
> > > rte_flow_action_set_meta *)
> > > actions->conf, error))
> > > return -rte_errno;
> > > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > if (flow_dv_convert_action_set_tag
> > > - (dev, &mhdr_res,
> > > + (dev, mhdr_res,
> > > (const struct rte_flow_action_set_tag
> > > *)
> > > actions->conf, error))
> > > return -rte_errno;
> > > @@ -6882,7 +6892,7 @@ cnt_err:
> > > mlx5_update_vlan_vid_pcp(actions, &vlan);
> > > /* If no VLAN push - this is a modify header
> action */
> > > if (flow_dv_convert_action_modify_vlan_vid
> > > - (&mhdr_res, actions,
> > > error))
> > > + (mhdr_res, actions,
> > > error))
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > break;
> > > @@ -6981,7 +6991,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > if (flow_dv_convert_action_modify_mac
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > @@ -6991,7 +7001,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > if (flow_dv_convert_action_modify_ipv4
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > @@ -7001,7 +7011,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > if (flow_dv_convert_action_modify_ipv6
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > @@ -7011,7 +7021,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > if (flow_dv_convert_action_modify_tp
> > > - (&mhdr_res, actions, items,
> > > + (mhdr_res, actions, items,
> > > &flow_attr, error))
> > > return -rte_errno;
> > > action_flags |= actions->type == @@ -7021,13
> +7031,13 @@
> > > cnt_err:
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > if (flow_dv_convert_action_modify_dec_ttl
> > > - (&mhdr_res, items, &flow_attr,
> > > error))
> > > + (mhdr_res, items, &flow_attr,
> > > error))
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > > if (flow_dv_convert_action_modify_ttl
> > > - (&mhdr_res, actions, items,
> > > + (mhdr_res, actions, items,
> > > &flow_attr, error))
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> @@ -7035,7 +7045,7 @@
> > > cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > if (flow_dv_convert_action_modify_tcp_seq
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > @@ -7046,7 +7056,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > if (flow_dv_convert_action_modify_tcp_ack
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > @@ -7055,13 +7065,13 @@ cnt_err:
> > > break;
> > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > if (flow_dv_convert_action_set_reg
> > > - (&mhdr_res, actions, error))
> > > + (mhdr_res, actions, error))
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > > break;
> > > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > > if (flow_dv_convert_action_copy_mreg
> > > - (dev, &mhdr_res, actions,
> > > error))
> > > + (dev, mhdr_res, actions,
> > > error))
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > > break;
> > > @@ -7086,10 +7096,10 @@ cnt_err:
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_END:
> > > actions_end = true;
> > > - if (mhdr_res.actions_num) {
> > > + if (mhdr_res->actions_num) {
> > > /* create modify action if needed. */
> > > if
> > > (flow_dv_modify_hdr_resource_register
> > > - (dev, &mhdr_res, dev_flow,
> > > error))
> > > + (dev, mhdr_res, dev_flow,
> > > error))
> > > return -rte_errno;
> > > dev_flow-
> > > > dv.actions[modify_action_position] =
> > >
> > > dev_flow->dv.modify_hdr-
> > > > verbs_action;
> > >
> > > @@ -7098,7 +7108,7 @@ cnt_err:
> > > default:
> > > break;
> > > }
> > > - if (mhdr_res.actions_num &&
> > > + if (mhdr_res->actions_num &&
> > > modify_action_position == UINT32_MAX)
> > > modify_action_position = actions_n++;
> > > }
> > > --
> > > 2.20.1
> > >
> > > ---
> > > Diff of the applied patch vs upstream commit (please double-
> check
> > > if
> > > non-empty:
> > > ---
> > > --- - 2020-02-11 11:17:42.994804790 +0000
> > > +++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch
> > > 2020-
> > > 02-11 11:17:38.612005311 +0000
> > > @@ -1,8 +1,10 @@
> > > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep 17
> > > 00:00:00 2001
> > > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > > 00:00:00 2001
> > > From: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > Subject: [PATCH] net/mlx5: fix modify actions support limitation
> > >
> > > +[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > +
> > > In the root table, there is some limitation of total number of
> > > header modify actions, 16 or 8 for each. But in other tables, there
> > > is no such strict limitation. In an IPv6 case, the IP fields
> > > modifying @@
> > > -16,21
> > > +18,20 @@ maximal supported value.
> > >
> > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > > number")
> > > -Cc:
> > > stable@dpdk.org
> > >
> > >
> > > Signed-off-by: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Acked-by: Ori Kam <
> > > orika@mellanox.com
> > > >
> > > Acked-by: Viacheslav Ovsiienko <
> > > viacheslavo@mellanox.com
> > > >
> > > ---
> > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++-------
> -
> > > ----
> > > ---
> > > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > > + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++------
> --
> > > ---
> > > ----
> > > + 2 files changed, 66 insertions(+), 53 deletions(-)
> > >
> > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > b/drivers/net/mlx5/mlx5_flow.h -index a1c7b67488..9832542328
> > > 100644
> > > +index db12715ecc..13bed08d75 100644
> > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> > > +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > >
> > > /*
> > > * Number of modification commands.
> > > @@ -49,7 +50,7 @@
> > >
> > > /* Modify resource structure */
> > > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9 +410,9
> @@
> > > struct mlx5_flow_dv_modify_hdr_resource {
> > > +@@ -406,9 +409,9 @@ struct
> mlx5_flow_dv_modify_hdr_resource {
> > > /**< Verbs modify header action object. */
> > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > uint32_t actions_num; /**< Number of modification actions.
> > > */ @@ -62,10 +63,10 @@
> > >
> > > /* Jump action resource structure. */ diff --git
> > > a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> > > -index 26dbaaf329..5a1b42698c
> > > 100644
> > > +index 8f77909419..74d1a68e4a 100644
> > > --- a/drivers/net/mlx5/mlx5_flow_dv.c +++
> > > b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -366,7 +366,7 @@
> > > flow_dv_convert_modify_action(struct
> > > rte_flow_item *item,
> > > +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > rte_flow_item
> > > +*item,
> > > uint32_t mask;
> > > uint32_t data;
> > >
> > > @@ -74,7 +75,7 @@
> > > return rte_flow_error_set(error, EINVAL,
> > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > NULL,
> > > "too many items to modify");
> > > -@@ -407,11 +407,11 @@ flow_dv_convert_modify_action(struct
> > > rte_flow_item *item,
> > > +@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > > +rte_flow_item *item,
> > > ++i;
> > > ++field;
> > > } while (field->size);
> > > @@ -88,7 +89,7 @@
> > > return 0;
> > > }
> > >
> > > -@@ -572,7 +572,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > +@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > struct mlx5_modification_cmd *actions = &resource->actions[i];
> > > struct field_modify_info *field = modify_vlan_out_first_vid;
> > >
> > > @@ -97,7 +98,7 @@
> > > return rte_flow_error_set(error, EINVAL,
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many items to modify");
> > > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > struct mlx5_modification_cmd *actions = resource->actions;
> > > uint32_t i = resource->actions_num;
> > >
> > > @@ -106,7 +107,7 @@
> > > return rte_flow_error_set(error, EINVAL,
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many items to modify"); -
> @@ -917,10 +917,6 @@
> > > flow_dv_convert_action_set_reg
> > > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > ++i;
> > > resource->actions_num = i;
> > > @@ -117,7 +118,7 @@
> > > return 0;
> > > }
> > >
> > > -@@ -2385,7 +2381,6 @@
> flow_dv_encap_decap_resource_register
> > > +@@ -2256,7 +2252,6 @@
> flow_dv_encap_decap_resource_register
> > > domain = sh->rx_domain;
> > > else
> > > domain = sh->tx_domain;
> > > @@ -125,7 +126,7 @@
> > > /* Lookup a matching resource from cache. */
> > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next) {
> > > if (resource->reformat_type == cache_resource-
> > > > reformat_type && -@@ -3496,21 +3491,27 @@
> > >
> > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > +@@ -3367,21 +3362,27 @@
> flow_dv_validate_action_port_id(struct
> > > +rte_eth_dev *dev,
> > > *
> > > * @param dev
> > > * Pointer to rte_eth_dev structure.
> > > @@ -157,7 +158,7 @@
> > > }
> > >
> > > /**
> > > -@@ -3669,8 +3670,12 @@
> flow_dv_modify_hdr_resource_register
> > > +@@ -3472,8 +3473,12 @@
> flow_dv_modify_hdr_resource_register
> > > struct mlx5_ibv_shared *sh = priv->sh;
> > > struct mlx5_flow_dv_modify_hdr_resource *cache_resource;
> > > struct mlx5dv_dr_domain *ns;
> > > @@ -171,7 +172,7 @@
> > > return rte_flow_error_set(error, EOVERFLOW,
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > "too many modify header
> > > items"); -@@ -3680,17 +3685,15 @@
> > > flow_dv_modify_hdr_resource_register
> > > +@@ -3483,17 +3488,15 @@
> flow_dv_modify_hdr_resource_register
> > > ns = sh->tx_domain;
> > > else
> > > ns = sh->rx_domain;
> > > @@ -191,7 +192,7 @@
> > > DRV_LOG(DEBUG, "modify-header
> > > resource %p: refcnt %d++",
> > > (void *)cache_resource,
> > > rte_atomic32_read(&cache_resource-
> > > > refcnt));
> > >
> > > -@@ -3700,18 +3703,18 @@
> flow_dv_modify_hdr_resource_register
> > > +@@ -3503,18 +3506,18 @@
> flow_dv_modify_hdr_resource_register
> > > }
> > > }
> > > /* Register new modify-header resource. */ @@ -215,7 +216,7
> @@
> > > (uint64_t *)cache_resource-
> > > > actions);
> > >
> > > if (!cache_resource->verbs_action) {
> > > rte_free(cache_resource);
> > > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > *dev,
> > > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > *dev,
> > > };
> > > int actions_n = 0;
> > > bool actions_end = false;
> > > @@ -233,7 +234,7 @@
> > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > uint32_t tag_be;
> > > union mlx5_flow_tbl_key tbl_key;
> > > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > *dev,
> > > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > *dev,
> > > uint32_t table;
> > > int ret = 0;
> > >
> > > @@ -254,7 +255,7 @@
> > > for (; !actions_end ; actions++) {
> > > const struct rte_flow_action_queue *queue;
> > > const struct rte_flow_action_rss *rss; -@@ -7081,7
> > > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev, @@ -
> 6731,7
> > > ++6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > *dev,
> > > };
> > >
> > > if (flow_dv_convert_action_mark(dev,
> &mark, @@ -263,7 +264,7
> > > @@
> > > error))
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > *dev,
> > > actions->conf;
> > >
> > > if (flow_dv_convert_action_mark(dev,
> mark, @@ -272,7 +273,7 @@
> > > error))
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > *dev,
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > if (flow_dv_convert_action_set_meta @@ -
> > > 281,7 +282,7 @@
> > > (const struct
> > > rte_flow_action_set_meta *)
> > > actions->conf, error))
> > > return -rte_errno;
> > > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct rte_eth_dev
> *dev,
> > > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > *dev,
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > if (flow_dv_convert_action_set_tag @@ -290,7
> +291,7 @@
> > > (const struct rte_flow_action_set_tag
> > > *)
> > > actions->conf, error))
> > > return -rte_errno;
> > > -@@ -7232,7 +7242,7 @@ cnt_err:
> > > +@@ -6882,7 +6892,7 @@ cnt_err:
> > > mlx5_update_vlan_vid_pcp(actions, &vlan);
> > > /* If no VLAN push - this is a modify header
> action */
> > > if (flow_dv_convert_action_modify_vlan_vid
> > > @@ -299,7 +300,7 @@
> > > return -rte_errno;
> > > action_flags |=
> > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > break;
> > > -@@ -7331,7 +7341,7 @@ cnt_err:
> > > +@@ -6981,7 +6991,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > if (flow_dv_convert_action_modify_mac
> > > @@ -308,7 +309,7 @@
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > -@@ -7341,7 +7351,7 @@ cnt_err:
> > > +@@ -6991,7 +7001,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > if (flow_dv_convert_action_modify_ipv4
> > > @@ -317,7 +318,7 @@
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > -@@ -7351,7 +7361,7 @@ cnt_err:
> > > +@@ -7001,7 +7011,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > if (flow_dv_convert_action_modify_ipv6
> > > @@ -326,7 +327,7 @@
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > -@@ -7361,7 +7371,7 @@ cnt_err:
> > > +@@ -7011,7 +7021,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > if (flow_dv_convert_action_modify_tp @@ -
> > > 335,7 +336,7 @@
> > > &flow_attr, error))
> > > return -rte_errno;
> > > action_flags |= actions->type == -@@ -7371,13
> +7381,13 @@
> > > cnt_err:
> > > +@@ -7021,13 +7031,13 @@ cnt_err:
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > if (flow_dv_convert_action_modify_dec_ttl
> > > @@ -351,7 +352,7 @@
> > > &flow_attr, error))
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_SET_TTL;
> -@@ -7385,7 +7395,7
> > > @@ cnt_err:
> > > +@@ -7035,7 +7045,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > if (flow_dv_convert_action_modify_tcp_seq
> > > @@ -360,7 +361,7 @@
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > -@@ -7396,7 +7406,7 @@ cnt_err:
> > > +@@ -7046,7 +7056,7 @@ cnt_err:
> > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > if (flow_dv_convert_action_modify_tcp_ack
> > > @@ -369,7 +370,7 @@
> > > return -rte_errno;
> > > action_flags |= actions->type ==
> > >
> > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > -@@ -7405,13 +7415,13 @@ cnt_err:
> > > +@@ -7055,13 +7065,13 @@ cnt_err:
> > > break;
> > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > if (flow_dv_convert_action_set_reg @@ -
> 385,22 +386,7 @@
> > > return -rte_errno;
> > > action_flags |= MLX5_FLOW_ACTION_SET_TAG;
> > > break;
> > > -@@ -7435,23 +7445,23 @@ cnt_err:
> > > - action_flags |= MLX5_FLOW_ACTION_METER;
> > > - break;
> > > - case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > > -- if
> > > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > > -+ if
> > > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > > - actions,
> > > error))
> > > - return -rte_errno;
> > > - action_flags |=
> > > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > > - break;
> > > - case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > > -- if
> > > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > > -+ if
> > > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > > - actions,
> > > error))
> > > - return -rte_errno;
> > > - action_flags |=
> > > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > > +@@ -7086,10 +7096,10 @@ cnt_err:
> > > break;
> > > case RTE_FLOW_ACTION_TYPE_END:
> > > actions_end = true;
> > > @@ -413,7 +399,7 @@
> > > return -rte_errno;
> > > dev_flow-
> > > > dv.actions[modify_action_position] =
> > >
> > > dev_flow->dv.modify_hdr-
> > > > verbs_action;
> > >
> > > -@@ -7460,7 +7470,7 @@ cnt_err:
> > > +@@ -7098,7 +7108,7 @@ cnt_err:
> > > default:
> > > break;
> > > }
> --
> Kind regards,
> Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-13 9:06 ` Bing Zhao
@ 2020-02-13 9:36 ` Luca Boccassi
2020-02-13 11:23 ` Bing Zhao
0 siblings, 1 reply; 310+ messages in thread
From: Luca Boccassi @ 2020-02-13 9:36 UTC (permalink / raw)
To: Bing Zhao; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi,
Thank you. Sorry, what do you mean by #65574?
On Thu, 2020-02-13 at 09:06 +0000, Bing Zhao wrote:
> Hi Luca,
> I checked the patch and it is OK for me.
> After this is applied, then patch #65574 is also needed for 19.11.1.
>
> So many thanks for your help.
>
> BR. Bing
>
> > -----Original Message-----
> > From: Luca Boccassi <
> > luca.boccassi@gmail.com
> > >
> > Sent: Tuesday, February 11, 2020 10:23 PM
> > To: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Cc: Ori Kam <
> > orika@mellanox.com
> > >; Slava Ovsiienko
> > <
> > viacheslavo@mellanox.com
> > >; dpdk stable <
> > stable@dpdk.org
> > >
> > Subject: Re: patch 'net/mlx5: fix modify actions support
> > limitation' has
> > been queued to stable release 19.11.1
> >
> > Hi,
> >
> > The rebasing is done and you can see the result in the mail you
> > replied
> > to.
> >
> > The new 19.11 branch will be pushed by the end of the week.
> >
> > On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> > > Hi Luca,
> > >
> > > Many thanks for your help.
> > >
> > > Yes, this needs to be also applied to the 19.11 stable branch. I
> > > want
> > > to rebase it but could not find the branch in
> > >
> >
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fg
> >
> > it.d
> > > pdk.org%2Fdpdk-
> >
> > stable%2F&data=02%7C01%7Cbingz%40mellanox.com%7C888
> >
> > c4fa2d2b242c93ebc08d7aefde4e1%7Ca652971c7d2e4d9ba6a4d149256
> > f461b%7C0%7
> >
> > C0%7C637170277804566321&sdata=YMTaedRR3Lv7OKd%2FvhEJ
> > 5CXOJ9oHU3h%2B
> > > ei4qov0x6RA%3D&reserved=0
> > > , so would you please share me the
> > > branch information then I can try to finish the rebasing today or
> > > early tomorrow.
> > >
> > > BR. Bing
> > >
> > > > -----Original Message-----
> > > > From:
> > > > luca.boccassi@gmail.com
> > > >
> > > > <
> > > > luca.boccassi@gmail.com
> > > >
> > > >
> > > > Sent: Tuesday, February 11, 2020 7:21 PM
> > > > To: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Cc: Ori Kam <
> > > > orika@mellanox.com
> > > >
> > > > > ; Slava Ovsiienko
> > > >
> > > > <
> > > > viacheslavo@mellanox.com
> > > >
> > > > > ; dpdk stable <
> > > >
> > > > stable@dpdk.org
> > > >
> > > >
> > > > Subject: patch 'net/mlx5: fix modify actions support
> > > > limitation'
> > > > has
> > > > been queued to stable release 19.11.1
> > > >
> > > > Hi,
> > > >
> > > > FYI, your patch has been queued to stable release 19.11.1
> > > >
> > > > Note it hasn't been pushed to
> > > >
> >
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> >
> > > > dpdk.org%2Fbrowse%2Fdpdk-
> > > >
> >
> > stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> >
> > 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> >
> > 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > > > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > > > It will be pushed if I get no objections before 02/13/20. So
> > > > please
> > > > shout if anyone has objections.
> > > >
> > > > Also note that after the patch there's a diff of the upstream
> > > > commit
> > > > vs the patch applied to the branch. This will indicate if there
> > > > was
> > > > any rebasing needed to apply to the stable branch. If there
> > > > were
> > > > code changes for rebasing
> > > > (ie: not only metadata diffs), please double check that the
> > > > rebase
> > > > was correctly done.
> > > >
> > > > Thanks.
> > > >
> > > > Luca Boccassi
> > > >
> > > > ---
> > > > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > > > 00:00:00 2001
> > > > From: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > limitation
> > > >
> > > > [ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > >
> > > > In the root table, there is some limitation of total number of
> > > > header modify actions, 16 or 8 for each. But in other tables,
> > > > there
> > > > is no such strict limitation. In an IPv6 case, the IP fields
> > > > modifying will occupy more actions than that in IPv4, so the
> > > > total
> > > > support number should be increased in order to support as many
> > > > actions as possible for an
> > > > IPv6 +
> > > > TCP packet.
> > > > And in the meanwhile, the memory consumption should also be
> >
> > taken
> > > > into consideration because sometimes only several actions are
> > > > needed.
> > > > The root table checking could also be done in low layer driver
> > > > and
> > > > the error code will be returned if the actions number is over
> > > > the
> > > > maximal supported value.
> > > >
> > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > > > number")
> > > >
> > > > Signed-off-by: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Acked-by: Ori Kam <
> > > > orika@mellanox.com
> > > >
> > > >
> > > > Acked-by: Viacheslav Ovsiienko <
> > > > viacheslavo@mellanox.com
> > > >
> > > >
> > > > ---
> > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++-------
> > > > -
> >
> > ---
> > > > --
> > > > --
> > > > 2 files changed, 66 insertions(+), 53 deletions(-)
> > > >
> > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > b/drivers/net/mlx5/mlx5_flow.h index db12715ecc..13bed08d75
> > > > 100644
> > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > >
> > > > /*
> > > > * Number of modification commands.
> > > > - * If extensive metadata registers are supported
> > > > - * the maximal actions amount is 16 and 8 otherwise.
> > > > + * If extensive metadata registers are supported, the maximal
> > > > actions
> > > > + amount is
> > > > + * 16 and 8 otherwise on root table. The validation could also
> > > > be
> > > > done
> > > > + in the
> > > > + * lower driver layer.
> > > > + * On non-root table, there is no limitation, but 32 is enough
> > > > right
> > > > now.
> > > > */
> > > > -#define MLX5_MODIFY_NUM 16
> > > > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > > > +#define MLX5_MAX_MODIFY_NUM 32
> > > > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > > > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
> > > >
> > > > /* Modify resource structure */
> > > > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9
> >
> > @@
> > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > /**< Verbs modify header action object. */
> > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > uint32_t actions_num; /**< Number of modification
> > > > actions.
> > > > */
> > > > - struct mlx5_modification_cmd actions[MLX5_MODIFY_NUM];
> > > > + uint64_t flags; /**< Flags for RDMA API. */
> > > > + struct mlx5_modification_cmd actions[];
> > > > /**< Modification actions. */
> > > > - uint64_t flags; /**< Flags for RDMA API. */
> > > > };
> > > >
> > > > /* Jump action resource structure. */ diff --git
> > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> >
> > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > index 8f77909419..74d1a68e4a
> > > > 100644
> > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > rte_flow_item *item,
> > > > uint32_t mask;
> > > > uint32_t data;
> > > >
> > > > - if (i >= MLX5_MODIFY_NUM)
> > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > return rte_flow_error_set(error,
> > > > EINVAL,
> > > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > NULL,
> > > > "too many items to modify");
> > > > @@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > > > rte_flow_item *item,
> > > > ++i;
> > > > ++field;
> > > > } while (field->size);
> > > > - resource->actions_num = i;
> > > > - if (!resource->actions_num)
> > > > + if (resource->actions_num == i)
> > > > return rte_flow_error_set(error, EINVAL,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "invalid modification
> > > > flow
> > > > item");
> > > > + resource->actions_num = i;
> > > > return 0;
> > > > }
> > > >
> > > > @@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > > struct mlx5_modification_cmd *actions = &resource-
> > > > >actions[i];
> > > > struct field_modify_info *field =
> > > > modify_vlan_out_first_vid;
> > > >
> > > > - if (i >= MLX5_MODIFY_NUM)
> > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > return rte_flow_error_set(error, EINVAL,
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many items to modify");
> > > > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > struct mlx5_modification_cmd *actions = resource-
> > > > >actions;
> > > > uint32_t i = resource->actions_num;
> > > >
> > > > - if (i >= MLX5_MODIFY_NUM)
> > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > return rte_flow_error_set(error, EINVAL,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many items to
> > > > modify");
> >
> > @@ -914,10 +914,6 @@
> > > > flow_dv_convert_action_set_reg
> > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > ++i;
> > > > resource->actions_num = i;
> > > > - if (!resource->actions_num)
> > > > - return rte_flow_error_set(error, EINVAL,
> > > > -
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > - "invalid modification
> > > > flow
> > > > item");
> > > > return 0;
> > > > }
> > > >
> > > > @@ -2256,7 +2252,6 @@ flow_dv_encap_decap_resource_register
> > > > domain = sh->rx_domain;
> > > > else
> > > > domain = sh->tx_domain;
> > > > -
> > > > /* Lookup a matching resource from cache. */
> > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next)
> > > > {
> > > > if (resource->reformat_type == cache_resource-
> > > > > reformat_type && @@ -3367,21 +3362,27 @@
> > > >
> > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > *
> > > > * @param dev
> > > > * Pointer to rte_eth_dev structure.
> > > > + * @param flags
> > > > + * Flags bits to check if root level.
> > > > *
> > > > * @return
> > > > * Max number of modify header actions device can support.
> > > > */
> > > > static unsigned int
> > > > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > > > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev,
> >
> > uint64_t
> > > > flags)
> > > > {
> > > > /*
> > > > * There's no way to directly query the max cap.
> > > > Although it
> >
> > has
> > > > to be
> > > > * acquried by iterative trial, it is a safe assumption
> > > > that more
> > > > * actions are supported by FW if extensive metadata
> > > > register
> >
> > is
> > > > - * supported.
> > > > + * supported. (Only in the root table)
> > > > */
> > > > - return mlx5_flow_ext_mreg_supported(dev) ?
> > > > MLX5_MODIFY_NUM :
> > > > -
> > > > MLX5_MODIFY_NUM_NO_MREG;
> > > > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > > > + return MLX5_MAX_MODIFY_NUM;
> > > > + else
> > > > + return mlx5_flow_ext_mreg_supported(dev) ?
> > > > +
> > > > MLX5_ROOT_TBL_MODIFY_NUM :
> > > > +
> > > > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > > > }
> > > >
> > > > /**
> > > > @@ -3472,8 +3473,12 @@ flow_dv_modify_hdr_resource_register
> > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > *cache_resource;
> > > > struct mlx5dv_dr_domain *ns;
> > > > + uint32_t actions_len;
> > > >
> > > > - if (resource->actions_num >
> > > > flow_dv_modify_hdr_action_max(dev))
> > > > + resource->flags =
> > > > + dev_flow->group ? 0 :
> > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > + if (resource->actions_num >
> > > > flow_dv_modify_hdr_action_max(dev,
> > > > + resource->flags))
> > > > return rte_flow_error_set(error, EOVERFLOW,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many modify
> > > > header
> > > > items"); @@ -3483,17 +3488,15 @@
> > > > flow_dv_modify_hdr_resource_register
> > > > ns = sh->tx_domain;
> > > > else
> > > > ns = sh->rx_domain;
> > > > - resource->flags =
> > > > - dev_flow->group ? 0 :
> > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > /* Lookup a matching resource from cache. */
> > > > + actions_len = resource->actions_num * sizeof(resource-
> > > > > actions[0]);
> > > >
> > > > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> > > > if (resource->ft_type == cache_resource-
> > > > >ft_type &&
> > > > resource->actions_num == cache_resource-
> > > > > actions_num &&
> > > >
> > > > resource->flags == cache_resource->flags &&
> > > > !memcmp((const void *)resource->actions,
> > > > (const void *)cache_resource-
> > > > >actions,
> > > > - (resource->actions_num *
> > > > - sizeof(resource-
> > > > > actions[0])))) {
> > > >
> > > > + actions_len)) {
> > > > DRV_LOG(DEBUG, "modify-header
> > > > resource %p: refcnt %d++",
> > > > (void *)cache_resource,
> > > > rte_atomic32_read(&cache_resour
> > > > ce-
> > > > > refcnt));
> > > >
> > > > @@ -3503,18 +3506,18 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > }
> > > > }
> > > > /* Register new modify-header resource. */
> > > > - cache_resource = rte_calloc(__func__, 1,
> > > > sizeof(*cache_resource), 0);
> > > > + cache_resource = rte_calloc(__func__, 1,
> > > > + sizeof(*cache_resource) +
> > > > actions_len, 0);
> > > > if (!cache_resource)
> > > > return rte_flow_error_set(error, ENOMEM,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > > > "cannot allocate
> > > > resource
> > > > memory");
> > > > *cache_resource = *resource;
> > > > + rte_memcpy(cache_resource->actions, resource->actions,
> > > > actions_len);
> > > > cache_resource->verbs_action =
> > > > mlx5_glue->dv_create_flow_action_modify_header
> > > > - (sh->ctx,
> > > > cache_resource-
> > > > > ft_type,
> > > >
> > > > - ns, cache_resource-
> > > > >flags,
> > > > - cache_resource-
> > > > >actions_num
> > > > *
> > > > - sizeof(cache_resource-
> > > > > actions[0]),
> > > >
> > > > + (sh->ctx,
> > > > cache_resource-
> > > > > ft_type, ns,
> > > >
> > > > + cache_resource->flags,
> > > > actions_len,
> > > > (uint64_t
> > > > *)cache_resource-
> > > > > actions);
> > > >
> > > > if (!cache_resource->verbs_action) {
> > > > rte_free(cache_resource);
> > > > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev *dev,
> > > > };
> > > > int actions_n = 0;
> > > > bool actions_end = false;
> > > > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res = {
> > > > - .ft_type = attr->egress ?
> > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > -
> > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > > > - };
> > > > + union {
> > > > + struct mlx5_flow_dv_modify_hdr_resource res;
> > > > + uint8_t len[sizeof(struct
> > > > mlx5_flow_dv_modify_hdr_resource) +
> > > > + sizeof(struct
> > > > mlx5_modification_cmd) *
> > > > + (MLX5_MAX_MODIFY_NUM + 1)];
> > > > + } mhdr_dummy;
> > > > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res =
> > > > &mhdr_dummy.res;
> > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > uint32_t tag_be;
> > > > union mlx5_flow_tbl_key tbl_key;
> > > > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev *dev,
> > > > uint32_t table;
> > > > int ret = 0;
> > > >
> > > > + mhdr_res->ft_type = attr->egress ?
> > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > +
> > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > > > ret = mlx5_flow_group_to_table(attr, dev_flow-
> > > > >external, attr-
> > > > > group,
> > > >
> > > > &table, error);
> > > > if (ret)
> > > > return ret;
> > > > dev_flow->group = table;
> > > > if (attr->transfer)
> > > > - mhdr_res.ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > + mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > if (priority == MLX5_FLOW_PRIO_RSVD)
> > > > priority = dev_conf->flow_prio - 1;
> > > > + /* number of actions must be set to 0 in case of dirty
> > > > stack.
> > > > */
> > > > + mhdr_res->actions_num = 0;
> > > > for (; !actions_end ; actions++) {
> > > > const struct rte_flow_action_queue *queue;
> > > > const struct rte_flow_action_rss *rss; @@
> > > > -6731,7
> > > > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > > > };
> > > >
> > > > if
> > > > (flow_dv_convert_action_mark(dev,
> >
> > &mark,
> > > > -
> > > > &mhdr_res,
> > > > +
> > > > mhdr_res,
> > > >
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > actions->conf;
> > > >
> > > > if
> > > > (flow_dv_convert_action_mark(dev,
> >
> > mark,
> > > > -
> > > > &mhdr_res,
> > > > +
> > > > mhdr_res,
> > > >
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > if (flow_dv_convert_action_set_meta
> > > > - (dev, &mhdr_res, attr,
> > > > + (dev, mhdr_res, attr,
> > > > (const struct
> > > > rte_flow_action_set_meta *)
> > > > actions->conf, error))
> > > > return -rte_errno;
> > > > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> >
> > *dev,
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > if (flow_dv_convert_action_set_tag
> > > > - (dev, &mhdr_res,
> > > > + (dev, mhdr_res,
> > > > (const struct
> > > > rte_flow_action_set_tag
> > > > *)
> > > > actions->conf, error))
> > > > return -rte_errno;
> > > > @@ -6882,7 +6892,7 @@ cnt_err:
> > > > mlx5_update_vlan_vid_pcp(actions,
> > > > &vlan);
> > > > /* If no VLAN push - this is a modify
> > > > header
> >
> > action */
> > > > if
> > > > (flow_dv_convert_action_modify_vlan_vid
> > > > - (&mhdr_res,
> > > > actions,
> > > > error))
> > > > + (mhdr_res,
> > > > actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > break;
> > > > @@ -6981,7 +6991,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > if (flow_dv_convert_action_modify_mac
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > @@ -6991,7 +7001,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > if (flow_dv_convert_action_modify_ipv4
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > @@ -7001,7 +7011,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > if (flow_dv_convert_action_modify_ipv6
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > @@ -7011,7 +7021,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > if (flow_dv_convert_action_modify_tp
> > > > - (&mhdr_res, actions,
> > > > items,
> > > > + (mhdr_res, actions,
> > > > items,
> > > > &flow_attr, error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type == @@
> > > > -7021,13
> >
> > +7031,13 @@
> > > > cnt_err:
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > if
> > > > (flow_dv_convert_action_modify_dec_ttl
> > > > - (&mhdr_res, items,
> > > > &flow_attr,
> > > > error))
> > > > + (mhdr_res, items,
> > > > &flow_attr,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_DEC_TTL;
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > > > if (flow_dv_convert_action_modify_ttl
> > > > - (&mhdr_res, actions,
> > > > items,
> > > > + (mhdr_res, actions,
> > > > items,
> > > > &flow_attr, error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_SET_TTL;
> >
> > @@ -7035,7 +7045,7 @@
> > > > cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > if
> > > > (flow_dv_convert_action_modify_tcp_seq
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > @@ -7046,7 +7056,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > if
> > > > (flow_dv_convert_action_modify_tcp_ack
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > @@ -7055,13 +7065,13 @@ cnt_err:
> > > > break;
> > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > if (flow_dv_convert_action_set_reg
> > > > - (&mhdr_res, actions,
> > > > error))
> > > > + (mhdr_res, actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > break;
> > > > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > > > if (flow_dv_convert_action_copy_mreg
> > > > - (dev, &mhdr_res,
> > > > actions,
> > > > error))
> > > > + (dev, mhdr_res,
> > > > actions,
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > break;
> > > > @@ -7086,10 +7096,10 @@ cnt_err:
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > actions_end = true;
> > > > - if (mhdr_res.actions_num) {
> > > > + if (mhdr_res->actions_num) {
> > > > /* create modify action if
> > > > needed. */
> > > > if
> > > > (flow_dv_modify_hdr_resource_register
> > > > - (dev, &mhdr_res,
> > > > dev_flow,
> > > > error))
> > > > + (dev, mhdr_res,
> > > > dev_flow,
> > > > error))
> > > > return -rte_errno;
> > > > dev_flow-
> > > > > dv.actions[modify_action_position] =
> > > >
> > > > dev_flow-
> > > > >dv.modify_hdr-
> > > > > verbs_action;
> > > >
> > > > @@ -7098,7 +7108,7 @@ cnt_err:
> > > > default:
> > > > break;
> > > > }
> > > > - if (mhdr_res.actions_num &&
> > > > + if (mhdr_res->actions_num &&
> > > > modify_action_position == UINT32_MAX)
> > > > modify_action_position = actions_n++;
> > > > }
> > > > --
> > > > 2.20.1
> > > >
> > > > ---
> > > > Diff of the applied patch vs upstream commit (please double-
> >
> > check
> > > > if
> > > > non-empty:
> > > > ---
> > > > --- - 2020-02-11 11:17:42.994804790 +0000
> > > > +++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch
> > > > 2020-
> > > > 02-11 11:17:38.612005311 +0000
> > > > @@ -1,8 +1,10 @@
> > > > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep 17
> > > > 00:00:00 2001
> > > > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep 17
> > > > 00:00:00 2001
> > > > From: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > limitation
> > > >
> > > > +[ upstream commit 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > +
> > > > In the root table, there is some limitation of total number of
> > > > header modify actions, 16 or 8 for each. But in other tables,
> > > > there
> > > > is no such strict limitation. In an IPv6 case, the IP fields
> > > > modifying @@
> > > > -16,21
> > > > +18,20 @@ maximal supported value.
> > > >
> > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify actions
> > > > number")
> > > > -Cc:
> > > > stable@dpdk.org
> > > >
> > > >
> > > >
> > > > Signed-off-by: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Acked-by: Ori Kam <
> > > > orika@mellanox.com
> > > >
> > > >
> > > > Acked-by: Viacheslav Ovsiienko <
> > > > viacheslavo@mellanox.com
> > > >
> > > >
> > > > ---
> > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++----
> > > > ---
> >
> > -
> > > > ----
> > > > ---
> > > > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > > > + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++------
> >
> > --
> > > > ---
> > > > ----
> > > > + 2 files changed, 66 insertions(+), 53 deletions(-)
> > > >
> > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > b/drivers/net/mlx5/mlx5_flow.h -index a1c7b67488..9832542328
> > > > 100644
> > > > +index db12715ecc..13bed08d75 100644
> > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > >
> > > > /*
> > > > * Number of modification commands.
> > > > @@ -49,7 +50,7 @@
> > > >
> > > > /* Modify resource structure */
> > > > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9 +410,9
> >
> > @@
> > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > +@@ -406,9 +409,9 @@ struct
> >
> > mlx5_flow_dv_modify_hdr_resource {
> > > > /**< Verbs modify header action object. */
> > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > uint32_t actions_num; /**< Number of modification
> > > > actions.
> > > > */ @@ -62,10 +63,10 @@
> > > >
> > > > /* Jump action resource structure. */ diff --git
> > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> >
> > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > -index 26dbaaf329..5a1b42698c
> > > > 100644
> > > > +index 8f77909419..74d1a68e4a 100644
> > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c +++
> > > > b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -366,7 +366,7 @@
> > > > flow_dv_convert_modify_action(struct
> > > > rte_flow_item *item,
> > > > +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > rte_flow_item
> > > > +*item,
> > > > uint32_t mask;
> > > > uint32_t data;
> > > >
> > > > @@ -74,7 +75,7 @@
> > > > return rte_flow_error_set(error,
> > > > EINVAL,
> > > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > NULL,
> > > > "too many items to modify");
> > > > -@@ -407,11 +407,11 @@ flow_dv_convert_modify_action(struct
> > > > rte_flow_item *item,
> > > > +@@ -404,11 +404,11 @@ flow_dv_convert_modify_action(struct
> > > > +rte_flow_item *item,
> > > > ++i;
> > > > ++field;
> > > > } while (field->size);
> > > > @@ -88,7 +89,7 @@
> > > > return 0;
> > > > }
> > > >
> > > > -@@ -572,7 +572,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > > +@@ -569,7 +569,7 @@ flow_dv_convert_action_modify_vlan_vid
> > > > struct mlx5_modification_cmd *actions = &resource-
> > > > >actions[i];
> > > > struct field_modify_info *field =
> > > > modify_vlan_out_first_vid;
> > > >
> > > > @@ -97,7 +98,7 @@
> > > > return rte_flow_error_set(error, EINVAL,
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many items to modify");
> > > > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > > > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > struct mlx5_modification_cmd *actions = resource-
> > > > >actions;
> > > > uint32_t i = resource->actions_num;
> > > >
> > > > @@ -106,7 +107,7 @@
> > > > return rte_flow_error_set(error, EINVAL,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many items to
> > > > modify"); -
> >
> > @@ -917,10 +917,6 @@
> > > > flow_dv_convert_action_set_reg
> > > > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > ++i;
> > > > resource->actions_num = i;
> > > > @@ -117,7 +118,7 @@
> > > > return 0;
> > > > }
> > > >
> > > > -@@ -2385,7 +2381,6 @@
> >
> > flow_dv_encap_decap_resource_register
> > > > +@@ -2256,7 +2252,6 @@
> >
> > flow_dv_encap_decap_resource_register
> > > > domain = sh->rx_domain;
> > > > else
> > > > domain = sh->tx_domain;
> > > > @@ -125,7 +126,7 @@
> > > > /* Lookup a matching resource from cache. */
> > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next)
> > > > {
> > > > if (resource->reformat_type == cache_resource-
> > > > > reformat_type && -@@ -3496,21 +3491,27 @@
> > > >
> > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > +@@ -3367,21 +3362,27 @@
> >
> > flow_dv_validate_action_port_id(struct
> > > > +rte_eth_dev *dev,
> > > > *
> > > > * @param dev
> > > > * Pointer to rte_eth_dev structure.
> > > > @@ -157,7 +158,7 @@
> > > > }
> > > >
> > > > /**
> > > > -@@ -3669,8 +3670,12 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > +@@ -3472,8 +3473,12 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > *cache_resource;
> > > > struct mlx5dv_dr_domain *ns;
> > > > @@ -171,7 +172,7 @@
> > > > return rte_flow_error_set(error, EOVERFLOW,
> > > >
> > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > "too many modify
> > > > header
> > > > items"); -@@ -3680,17 +3685,15 @@
> > > > flow_dv_modify_hdr_resource_register
> > > > +@@ -3483,17 +3488,15 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > ns = sh->tx_domain;
> > > > else
> > > > ns = sh->rx_domain;
> > > > @@ -191,7 +192,7 @@
> > > > DRV_LOG(DEBUG, "modify-header
> > > > resource %p: refcnt %d++",
> > > > (void *)cache_resource,
> > > > rte_atomic32_read(&cache_resour
> > > > ce-
> > > > > refcnt));
> > > >
> > > > -@@ -3700,18 +3703,18 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > +@@ -3503,18 +3506,18 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > }
> > > > }
> > > > /* Register new modify-header resource. */ @@ -215,7
> > > > +216,7
> >
> > @@
> > > > (uint64_t
> > > > *)cache_resource-
> > > > > actions);
> > > >
> > > > if (!cache_resource->verbs_action) {
> > > > rte_free(cache_resource);
> > > > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > };
> > > > int actions_n = 0;
> > > > bool actions_end = false;
> > > > @@ -233,7 +234,7 @@
> > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > uint32_t tag_be;
> > > > union mlx5_flow_tbl_key tbl_key;
> > > > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > uint32_t table;
> > > > int ret = 0;
> > > >
> > > > @@ -254,7 +255,7 @@
> > > > for (; !actions_end ; actions++) {
> > > > const struct rte_flow_action_queue *queue;
> > > > const struct rte_flow_action_rss *rss; -@@
> > > > -7081,7
> > > > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev, @@ -
> >
> > 6731,7
> > > > ++6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > *dev,
> > > > };
> > > >
> > > > if
> > > > (flow_dv_convert_action_mark(dev,
> >
> > &mark, @@ -263,7 +264,7
> > > > @@
> > > >
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > *dev,
> > > > actions->conf;
> > > >
> > > > if
> > > > (flow_dv_convert_action_mark(dev,
> >
> > mark, @@ -272,7 +273,7 @@
> > > >
> > > > error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > *dev,
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > if (flow_dv_convert_action_set_meta @@
> > > > -
> > > > 281,7 +282,7 @@
> > > > (const struct
> > > > rte_flow_action_set_meta *)
> > > > actions->conf, error))
> > > > return -rte_errno;
> > > > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct rte_eth_dev
> >
> > *dev,
> > > > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > *dev,
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > if (flow_dv_convert_action_set_tag @@
> > > > -290,7
> >
> > +291,7 @@
> > > > (const struct
> > > > rte_flow_action_set_tag
> > > > *)
> > > > actions->conf, error))
> > > > return -rte_errno;
> > > > -@@ -7232,7 +7242,7 @@ cnt_err:
> > > > +@@ -6882,7 +6892,7 @@ cnt_err:
> > > > mlx5_update_vlan_vid_pcp(actions,
> > > > &vlan);
> > > > /* If no VLAN push - this is a modify
> > > > header
> >
> > action */
> > > > if
> > > > (flow_dv_convert_action_modify_vlan_vid
> > > > @@ -299,7 +300,7 @@
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > break;
> > > > -@@ -7331,7 +7341,7 @@ cnt_err:
> > > > +@@ -6981,7 +6991,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > if (flow_dv_convert_action_modify_mac
> > > > @@ -308,7 +309,7 @@
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > -@@ -7341,7 +7351,7 @@ cnt_err:
> > > > +@@ -6991,7 +7001,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > if (flow_dv_convert_action_modify_ipv4
> > > > @@ -317,7 +318,7 @@
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > -@@ -7351,7 +7361,7 @@ cnt_err:
> > > > +@@ -7001,7 +7011,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > if (flow_dv_convert_action_modify_ipv6
> > > > @@ -326,7 +327,7 @@
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > -@@ -7361,7 +7371,7 @@ cnt_err:
> > > > +@@ -7011,7 +7021,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > if (flow_dv_convert_action_modify_tp @@
> > > > -
> > > > 335,7 +336,7 @@
> > > > &flow_attr, error))
> > > > return -rte_errno;
> > > > action_flags |= actions->type == -@@
> > > > -7371,13
> >
> > +7381,13 @@
> > > > cnt_err:
> > > > +@@ -7021,13 +7031,13 @@ cnt_err:
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > if
> > > > (flow_dv_convert_action_modify_dec_ttl
> > > > @@ -351,7 +352,7 @@
> > > > &flow_attr, error))
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_SET_TTL;
> >
> > -@@ -7385,7 +7395,7
> > > > @@ cnt_err:
> > > > +@@ -7035,7 +7045,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > if
> > > > (flow_dv_convert_action_modify_tcp_seq
> > > > @@ -360,7 +361,7 @@
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > -@@ -7396,7 +7406,7 @@ cnt_err:
> > > > +@@ -7046,7 +7056,7 @@ cnt_err:
> > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > if
> > > > (flow_dv_convert_action_modify_tcp_ack
> > > > @@ -369,7 +370,7 @@
> > > > return -rte_errno;
> > > > action_flags |= actions->type ==
> > > >
> > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > -@@ -7405,13 +7415,13 @@ cnt_err:
> > > > +@@ -7055,13 +7065,13 @@ cnt_err:
> > > > break;
> > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > if (flow_dv_convert_action_set_reg @@ -
> >
> > 385,22 +386,7 @@
> > > > return -rte_errno;
> > > > action_flags |=
> > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > break;
> > > > -@@ -7435,23 +7445,23 @@ cnt_err:
> > > > - action_flags |= MLX5_FLOW_ACTION_METER;
> > > > - break;
> > > > - case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > > > -- if
> > > > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > > > -+ if
> > > > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > > > - a
> > > > ctions,
> > > > error))
> > > > - return -rte_errno;
> > > > - action_flags |=
> > > > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > > > - break;
> > > > - case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > > > -- if
> > > > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > > > -+ if
> > > > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > > > - a
> > > > ctions,
> > > > error))
> > > > - return -rte_errno;
> > > > - action_flags |=
> > > > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > > > +@@ -7086,10 +7096,10 @@ cnt_err:
> > > > break;
> > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > actions_end = true;
> > > > @@ -413,7 +399,7 @@
> > > > return -rte_errno;
> > > > dev_flow-
> > > > > dv.actions[modify_action_position] =
> > > >
> > > > dev_flow-
> > > > >dv.modify_hdr-
> > > > > verbs_action;
> > > >
> > > > -@@ -7460,7 +7470,7 @@ cnt_err:
> > > > +@@ -7098,7 +7108,7 @@ cnt_err:
> > > > default:
> > > > break;
> > > > }
> >
> > --
> > Kind regards,
> > Luca Boccassi
>
>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-13 9:36 ` Luca Boccassi
@ 2020-02-13 11:23 ` Bing Zhao
2020-02-13 17:45 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Bing Zhao @ 2020-02-13 11:23 UTC (permalink / raw)
To: Luca Boccassi, Dekel Peled; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi Luca,
I mean this patch: http://patches.dpdk.org/patch/65574/
Thank you.
BR. Bing
> -----Original Message-----
> From: Luca Boccassi <luca.boccassi@gmail.com>
> Sent: Thursday, February 13, 2020 5:36 PM
> To: Bing Zhao <bingz@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: patch 'net/mlx5: fix modify actions support limitation' has
> been queued to stable release 19.11.1
>
> Hi,
>
> Thank you. Sorry, what do you mean by #65574?
>
> On Thu, 2020-02-13 at 09:06 +0000, Bing Zhao wrote:
> > Hi Luca,
> > I checked the patch and it is OK for me.
> > After this is applied, then patch #65574 is also needed for 19.11.1.
> >
> > So many thanks for your help.
> >
> > BR. Bing
> >
> > > -----Original Message-----
> > > From: Luca Boccassi <
> > > luca.boccassi@gmail.com
> > > >
> > > Sent: Tuesday, February 11, 2020 10:23 PM
> > > To: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Cc: Ori Kam <
> > > orika@mellanox.com
> > > >; Slava Ovsiienko
> > > <
> > > viacheslavo@mellanox.com
> > > >; dpdk stable <
> > > stable@dpdk.org
> > > >
> > > Subject: Re: patch 'net/mlx5: fix modify actions support limitation'
> > > has been queued to stable release 19.11.1
> > >
> > > Hi,
> > >
> > > The rebasing is done and you can see the result in the mail you
> > > replied to.
> > >
> > > The new 19.11 branch will be pushed by the end of the week.
> > >
> > > On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> > > > Hi Luca,
> > > >
> > > > Many thanks for your help.
> > > >
> > > > Yes, this needs to be also applied to the 19.11 stable branch. I
> > > > want to rebase it but could not find the branch in
> > > >
> > >
> > >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fg
> > >
> > > it.d
> > > > pdk.org%2Fdpdk-
> > >
> > > stable%2F&data=02%7C01%7Cbingz%40mellanox.com%7C888
> > >
> > >
> c4fa2d2b242c93ebc08d7aefde4e1%7Ca652971c7d2e4d9ba6a4d149256
> > > f461b%7C0%7
> > >
> > >
> C0%7C637170277804566321&sdata=YMTaedRR3Lv7OKd%2FvhEJ
> > > 5CXOJ9oHU3h%2B
> > > > ei4qov0x6RA%3D&reserved=0
> > > > , so would you please share me the
> > > > branch information then I can try to finish the rebasing today or
> > > > early tomorrow.
> > > >
> > > > BR. Bing
> > > >
> > > > > -----Original Message-----
> > > > > From:
> > > > > luca.boccassi@gmail.com
> > > > >
> > > > > <
> > > > > luca.boccassi@gmail.com
> > > > >
> > > > >
> > > > > Sent: Tuesday, February 11, 2020 7:21 PM
> > > > > To: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Cc: Ori Kam <
> > > > > orika@mellanox.com
> > > > >
> > > > > > ; Slava Ovsiienko
> > > > >
> > > > > <
> > > > > viacheslavo@mellanox.com
> > > > >
> > > > > > ; dpdk stable <
> > > > >
> > > > > stable@dpdk.org
> > > > >
> > > > >
> > > > > Subject: patch 'net/mlx5: fix modify actions support
> > > > > limitation'
> > > > > has
> > > > > been queued to stable release 19.11.1
> > > > >
> > > > > Hi,
> > > > >
> > > > > FYI, your patch has been queued to stable release 19.11.1
> > > > >
> > > > > Note it hasn't been pushed to
> > > > >
> > >
> > >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >
> > > > > dpdk.org%2Fbrowse%2Fdpdk-
> > > > >
> > >
> > >
> stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> > >
> > >
> 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> > >
> > >
> 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > > > > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > > > > It will be pushed if I get no objections before 02/13/20. So
> > > > > please
> > > > > shout if anyone has objections.
> > > > >
> > > > > Also note that after the patch there's a diff of the upstream
> > > > > commit
> > > > > vs the patch applied to the branch. This will indicate if there
> > > > > was
> > > > > any rebasing needed to apply to the stable branch. If there
> > > > > were
> > > > > code changes for rebasing
> > > > > (ie: not only metadata diffs), please double check that the
> > > > > rebase
> > > > > was correctly done.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Luca Boccassi
> > > > >
> > > > > ---
> > > > > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep
> 17
> > > > > 00:00:00 2001
> > > > > From: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > limitation
> > > > >
> > > > > [ upstream commit
> 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > >
> > > > > In the root table, there is some limitation of total number of
> > > > > header modify actions, 16 or 8 for each. But in other tables,
> > > > > there
> > > > > is no such strict limitation. In an IPv6 case, the IP fields
> > > > > modifying will occupy more actions than that in IPv4, so the
> > > > > total
> > > > > support number should be increased in order to support as
> many
> > > > > actions as possible for an
> > > > > IPv6 +
> > > > > TCP packet.
> > > > > And in the meanwhile, the memory consumption should also
> be
> > >
> > > taken
> > > > > into consideration because sometimes only several actions are
> > > > > needed.
> > > > > The root table checking could also be done in low layer driver
> > > > > and
> > > > > the error code will be returned if the actions number is over
> > > > > the
> > > > > maximal supported value.
> > > > >
> > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> actions
> > > > > number")
> > > > >
> > > > > Signed-off-by: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Acked-by: Ori Kam <
> > > > > orika@mellanox.com
> > > > >
> > > > >
> > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > viacheslavo@mellanox.com
> > > > >
> > > > >
> > > > > ---
> > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++---
> ----
> > > > > -
> > >
> > > ---
> > > > > --
> > > > > --
> > > > > 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > >
> > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > b/drivers/net/mlx5/mlx5_flow.h index
> db12715ecc..13bed08d75
> > > > > 100644
> > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > >
> > > > > /*
> > > > > * Number of modification commands.
> > > > > - * If extensive metadata registers are supported
> > > > > - * the maximal actions amount is 16 and 8 otherwise.
> > > > > + * If extensive metadata registers are supported, the maximal
> > > > > actions
> > > > > + amount is
> > > > > + * 16 and 8 otherwise on root table. The validation could also
> > > > > be
> > > > > done
> > > > > + in the
> > > > > + * lower driver layer.
> > > > > + * On non-root table, there is no limitation, but 32 is enough
> > > > > right
> > > > > now.
> > > > > */
> > > > > -#define MLX5_MODIFY_NUM 16
> > > > > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > > > > +#define MLX5_MAX_MODIFY_NUM 32
> > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
> > > > >
> > > > > /* Modify resource structure */
> > > > > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9
> > >
> > > @@
> > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > /**< Verbs modify header action object. */
> > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > uint32_t actions_num; /**< Number of modification
> > > > > actions.
> > > > > */
> > > > > - struct mlx5_modification_cmd
> actions[MLX5_MODIFY_NUM];
> > > > > + uint64_t flags; /**< Flags for RDMA API. */
> > > > > + struct mlx5_modification_cmd actions[];
> > > > > /**< Modification actions. */
> > > > > - uint64_t flags; /**< Flags for RDMA API. */
> > > > > };
> > > > >
> > > > > /* Jump action resource structure. */ diff --git
> > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > >
> > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > index 8f77909419..74d1a68e4a
> > > > > 100644
> > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > > rte_flow_item *item,
> > > > > uint32_t mask;
> > > > > uint32_t data;
> > > > >
> > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > return rte_flow_error_set(error,
> > > > > EINVAL,
> > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > NULL,
> > > > > "too many items to modify");
> > > > > @@ -404,11 +404,11 @@
> flow_dv_convert_modify_action(struct
> > > > > rte_flow_item *item,
> > > > > ++i;
> > > > > ++field;
> > > > > } while (field->size);
> > > > > - resource->actions_num = i;
> > > > > - if (!resource->actions_num)
> > > > > + if (resource->actions_num == i)
> > > > > return rte_flow_error_set(error, EINVAL,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "invalid modification
> > > > > flow
> > > > > item");
> > > > > + resource->actions_num = i;
> > > > > return 0;
> > > > > }
> > > > >
> > > > > @@ -569,7 +569,7 @@
> flow_dv_convert_action_modify_vlan_vid
> > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > >actions[i];
> > > > > struct field_modify_info *field =
> > > > > modify_vlan_out_first_vid;
> > > > >
> > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > return rte_flow_error_set(error, EINVAL,
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "too many items to modify");
> > > > > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > >actions;
> > > > > uint32_t i = resource->actions_num;
> > > > >
> > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > return rte_flow_error_set(error, EINVAL,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "too many items to
> > > > > modify");
> > >
> > > @@ -914,10 +914,6 @@
> > > > > flow_dv_convert_action_set_reg
> > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > ++i;
> > > > > resource->actions_num = i;
> > > > > - if (!resource->actions_num)
> > > > > - return rte_flow_error_set(error, EINVAL,
> > > > > -
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > - "invalid modification
> > > > > flow
> > > > > item");
> > > > > return 0;
> > > > > }
> > > > >
> > > > > @@ -2256,7 +2252,6 @@
> flow_dv_encap_decap_resource_register
> > > > > domain = sh->rx_domain;
> > > > > else
> > > > > domain = sh->tx_domain;
> > > > > -
> > > > > /* Lookup a matching resource from cache. */
> > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next)
> > > > > {
> > > > > if (resource->reformat_type == cache_resource-
> > > > > > reformat_type && @@ -3367,21 +3362,27 @@
> > > > >
> > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > *
> > > > > * @param dev
> > > > > * Pointer to rte_eth_dev structure.
> > > > > + * @param flags
> > > > > + * Flags bits to check if root level.
> > > > > *
> > > > > * @return
> > > > > * Max number of modify header actions device can support.
> > > > > */
> > > > > static unsigned int
> > > > > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > > > > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev,
> > >
> > > uint64_t
> > > > > flags)
> > > > > {
> > > > > /*
> > > > > * There's no way to directly query the max cap.
> > > > > Although it
> > >
> > > has
> > > > > to be
> > > > > * acquried by iterative trial, it is a safe assumption
> > > > > that more
> > > > > * actions are supported by FW if extensive metadata
> > > > > register
> > >
> > > is
> > > > > - * supported.
> > > > > + * supported. (Only in the root table)
> > > > > */
> > > > > - return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > MLX5_MODIFY_NUM :
> > > > > -
> > > > > MLX5_MODIFY_NUM_NO_MREG;
> > > > > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > > > > + return MLX5_MAX_MODIFY_NUM;
> > > > > + else
> > > > > + return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > +
> > > > > MLX5_ROOT_TBL_MODIFY_NUM :
> > > > > +
> > > > > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > > > > }
> > > > >
> > > > > /**
> > > > > @@ -3472,8 +3473,12 @@
> flow_dv_modify_hdr_resource_register
> > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > *cache_resource;
> > > > > struct mlx5dv_dr_domain *ns;
> > > > > + uint32_t actions_len;
> > > > >
> > > > > - if (resource->actions_num >
> > > > > flow_dv_modify_hdr_action_max(dev))
> > > > > + resource->flags =
> > > > > + dev_flow->group ? 0 :
> > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > + if (resource->actions_num >
> > > > > flow_dv_modify_hdr_action_max(dev,
> > > > > + resource->flags))
> > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "too many modify
> > > > > header
> > > > > items"); @@ -3483,17 +3488,15 @@
> > > > > flow_dv_modify_hdr_resource_register
> > > > > ns = sh->tx_domain;
> > > > > else
> > > > > ns = sh->rx_domain;
> > > > > - resource->flags =
> > > > > - dev_flow->group ? 0 :
> > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > /* Lookup a matching resource from cache. */
> > > > > + actions_len = resource->actions_num *
> sizeof(resource-
> > > > > > actions[0]);
> > > > >
> > > > > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> > > > > if (resource->ft_type == cache_resource-
> > > > > >ft_type &&
> > > > > resource->actions_num == cache_resource-
> > > > > > actions_num &&
> > > > >
> > > > > resource->flags == cache_resource->flags &&
> > > > > !memcmp((const void *)resource->actions,
> > > > > (const void *)cache_resource-
> > > > > >actions,
> > > > > - (resource->actions_num *
> > > > > - sizeof(resource-
> > > > > > actions[0])))) {
> > > > >
> > > > > + actions_len)) {
> > > > > DRV_LOG(DEBUG, "modify-header
> > > > > resource %p: refcnt %d++",
> > > > > (void *)cache_resource,
> > > > > rte_atomic32_read(&cache_resour
> > > > > ce-
> > > > > > refcnt));
> > > > >
> > > > > @@ -3503,18 +3506,18 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > }
> > > > > }
> > > > > /* Register new modify-header resource. */
> > > > > - cache_resource = rte_calloc(__func__, 1,
> > > > > sizeof(*cache_resource), 0);
> > > > > + cache_resource = rte_calloc(__func__, 1,
> > > > > + sizeof(*cache_resource) +
> > > > > actions_len, 0);
> > > > > if (!cache_resource)
> > > > > return rte_flow_error_set(error, ENOMEM,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > > > > "cannot allocate
> > > > > resource
> > > > > memory");
> > > > > *cache_resource = *resource;
> > > > > + rte_memcpy(cache_resource->actions, resource-
> >actions,
> > > > > actions_len);
> > > > > cache_resource->verbs_action =
> > > > > mlx5_glue->dv_create_flow_action_modify_header
> > > > > - (sh->ctx,
> > > > > cache_resource-
> > > > > > ft_type,
> > > > >
> > > > > - ns, cache_resource-
> > > > > >flags,
> > > > > - cache_resource-
> > > > > >actions_num
> > > > > *
> > > > > - sizeof(cache_resource-
> > > > > > actions[0]),
> > > > >
> > > > > + (sh->ctx,
> > > > > cache_resource-
> > > > > > ft_type, ns,
> > > > >
> > > > > + cache_resource->flags,
> > > > > actions_len,
> > > > > (uint64_t
> > > > > *)cache_resource-
> > > > > > actions);
> > > > >
> > > > > if (!cache_resource->verbs_action) {
> > > > > rte_free(cache_resource);
> > > > > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev *dev,
> > > > > };
> > > > > int actions_n = 0;
> > > > > bool actions_end = false;
> > > > > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res =
> {
> > > > > - .ft_type = attr->egress ?
> > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > -
> > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > > > > - };
> > > > > + union {
> > > > > + struct mlx5_flow_dv_modify_hdr_resource res;
> > > > > + uint8_t len[sizeof(struct
> > > > > mlx5_flow_dv_modify_hdr_resource) +
> > > > > + sizeof(struct
> > > > > mlx5_modification_cmd) *
> > > > > + (MLX5_MAX_MODIFY_NUM + 1)];
> > > > > + } mhdr_dummy;
> > > > > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res
> =
> > > > > &mhdr_dummy.res;
> > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > uint32_t tag_be;
> > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev *dev,
> > > > > uint32_t table;
> > > > > int ret = 0;
> > > > >
> > > > > + mhdr_res->ft_type = attr->egress ?
> > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > +
> > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > > > > ret = mlx5_flow_group_to_table(attr, dev_flow-
> > > > > >external, attr-
> > > > > > group,
> > > > >
> > > > > &table, error);
> > > > > if (ret)
> > > > > return ret;
> > > > > dev_flow->group = table;
> > > > > if (attr->transfer)
> > > > > - mhdr_res.ft_type =
> MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > + mhdr_res->ft_type =
> MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > if (priority == MLX5_FLOW_PRIO_RSVD)
> > > > > priority = dev_conf->flow_prio - 1;
> > > > > + /* number of actions must be set to 0 in case of dirty
> > > > > stack.
> > > > > */
> > > > > + mhdr_res->actions_num = 0;
> > > > > for (; !actions_end ; actions++) {
> > > > > const struct rte_flow_action_queue *queue;
> > > > > const struct rte_flow_action_rss *rss; @@
> > > > > -6731,7
> > > > > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > };
> > > > >
> > > > > if
> > > > > (flow_dv_convert_action_mark(dev,
> > >
> > > &mark,
> > > > > -
> > > > > &mhdr_res,
> > > > > +
> > > > > mhdr_res,
> > > > >
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > actions->conf;
> > > > >
> > > > > if
> > > > > (flow_dv_convert_action_mark(dev,
> > >
> > > mark,
> > > > > -
> > > > > &mhdr_res,
> > > > > +
> > > > > mhdr_res,
> > > > >
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > if (flow_dv_convert_action_set_meta
> > > > > - (dev, &mhdr_res, attr,
> > > > > + (dev, mhdr_res, attr,
> > > > > (const struct
> > > > > rte_flow_action_set_meta *)
> > > > > actions->conf, error))
> > > > > return -rte_errno;
> > > > > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> rte_eth_dev
> > >
> > > *dev,
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > if (flow_dv_convert_action_set_tag
> > > > > - (dev, &mhdr_res,
> > > > > + (dev, mhdr_res,
> > > > > (const struct
> > > > > rte_flow_action_set_tag
> > > > > *)
> > > > > actions->conf, error))
> > > > > return -rte_errno;
> > > > > @@ -6882,7 +6892,7 @@ cnt_err:
> > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > &vlan);
> > > > > /* If no VLAN push - this is a modify
> > > > > header
> > >
> > > action */
> > > > > if
> > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > - (&mhdr_res,
> > > > > actions,
> > > > > error))
> > > > > + (mhdr_res,
> > > > > actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > break;
> > > > > @@ -6981,7 +6991,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > if (flow_dv_convert_action_modify_mac
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > @@ -6991,7 +7001,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > if (flow_dv_convert_action_modify_ipv4
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > @@ -7001,7 +7011,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > if (flow_dv_convert_action_modify_ipv6
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > @@ -7011,7 +7021,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > if (flow_dv_convert_action_modify_tp
> > > > > - (&mhdr_res, actions,
> > > > > items,
> > > > > + (mhdr_res, actions,
> > > > > items,
> > > > > &flow_attr, error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type == @@
> > > > > -7021,13
> > >
> > > +7031,13 @@
> > > > > cnt_err:
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > if
> > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > - (&mhdr_res, items,
> > > > > &flow_attr,
> > > > > error))
> > > > > + (mhdr_res, items,
> > > > > &flow_attr,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_DEC_TTL;
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > > > > if (flow_dv_convert_action_modify_ttl
> > > > > - (&mhdr_res, actions,
> > > > > items,
> > > > > + (mhdr_res, actions,
> > > > > items,
> > > > > &flow_attr, error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_TTL;
> > >
> > > @@ -7035,7 +7045,7 @@
> > > > > cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > if
> > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > @@ -7046,7 +7056,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > if
> > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > @@ -7055,13 +7065,13 @@ cnt_err:
> > > > > break;
> > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > if (flow_dv_convert_action_set_reg
> > > > > - (&mhdr_res, actions,
> > > > > error))
> > > > > + (mhdr_res, actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > break;
> > > > > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > > > > if (flow_dv_convert_action_copy_mreg
> > > > > - (dev, &mhdr_res,
> > > > > actions,
> > > > > error))
> > > > > + (dev, mhdr_res,
> > > > > actions,
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > break;
> > > > > @@ -7086,10 +7096,10 @@ cnt_err:
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > actions_end = true;
> > > > > - if (mhdr_res.actions_num) {
> > > > > + if (mhdr_res->actions_num) {
> > > > > /* create modify action if
> > > > > needed. */
> > > > > if
> > > > > (flow_dv_modify_hdr_resource_register
> > > > > - (dev, &mhdr_res,
> > > > > dev_flow,
> > > > > error))
> > > > > + (dev, mhdr_res,
> > > > > dev_flow,
> > > > > error))
> > > > > return -rte_errno;
> > > > > dev_flow-
> > > > > > dv.actions[modify_action_position] =
> > > > >
> > > > > dev_flow-
> > > > > >dv.modify_hdr-
> > > > > > verbs_action;
> > > > >
> > > > > @@ -7098,7 +7108,7 @@ cnt_err:
> > > > > default:
> > > > > break;
> > > > > }
> > > > > - if (mhdr_res.actions_num &&
> > > > > + if (mhdr_res->actions_num &&
> > > > > modify_action_position == UINT32_MAX)
> > > > > modify_action_position = actions_n++;
> > > > > }
> > > > > --
> > > > > 2.20.1
> > > > >
> > > > > ---
> > > > > Diff of the applied patch vs upstream commit (please double-
> > >
> > > check
> > > > > if
> > > > > non-empty:
> > > > > ---
> > > > > --- - 2020-02-11 11:17:42.994804790 +0000
> > > > > +++ 0122-net-mlx5-fix-modify-actions-support-limitation.patch
> > > > > 2020-
> > > > > 02-11 11:17:38.612005311 +0000
> > > > > @@ -1,8 +1,10 @@
> > > > > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep
> 17
> > > > > 00:00:00 2001
> > > > > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon
> Sep 17
> > > > > 00:00:00 2001
> > > > > From: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > limitation
> > > > >
> > > > > +[ upstream commit
> 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > > +
> > > > > In the root table, there is some limitation of total number of
> > > > > header modify actions, 16 or 8 for each. But in other tables,
> > > > > there
> > > > > is no such strict limitation. In an IPv6 case, the IP fields
> > > > > modifying @@
> > > > > -16,21
> > > > > +18,20 @@ maximal supported value.
> > > > >
> > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> actions
> > > > > number")
> > > > > -Cc:
> > > > > stable@dpdk.org
> > > > >
> > > > >
> > > > >
> > > > > Signed-off-by: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Acked-by: Ori Kam <
> > > > > orika@mellanox.com
> > > > >
> > > > >
> > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > viacheslavo@mellanox.com
> > > > >
> > > > >
> > > > > ---
> > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++--
> --
> > > > > ---
> > >
> > > -
> > > > > ----
> > > > > ---
> > > > > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > > > > + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++--
> ----
> > >
> > > --
> > > > > ---
> > > > > ----
> > > > > + 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > >
> > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > b/drivers/net/mlx5/mlx5_flow.h -index
> a1c7b67488..9832542328
> > > > > 100644
> > > > > +index db12715ecc..13bed08d75 100644
> > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > > +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > >
> > > > > /*
> > > > > * Number of modification commands.
> > > > > @@ -49,7 +50,7 @@
> > > > >
> > > > > /* Modify resource structure */
> > > > > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9
> +410,9
> > >
> > > @@
> > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > +@@ -406,9 +409,9 @@ struct
> > >
> > > mlx5_flow_dv_modify_hdr_resource {
> > > > > /**< Verbs modify header action object. */
> > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > uint32_t actions_num; /**< Number of modification
> > > > > actions.
> > > > > */ @@ -62,10 +63,10 @@
> > > > >
> > > > > /* Jump action resource structure. */ diff --git
> > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > >
> > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > -index 26dbaaf329..5a1b42698c
> > > > > 100644
> > > > > +index 8f77909419..74d1a68e4a 100644
> > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c +++
> > > > > b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -366,7 +366,7 @@
> > > > > flow_dv_convert_modify_action(struct
> > > > > rte_flow_item *item,
> > > > > +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > > rte_flow_item
> > > > > +*item,
> > > > > uint32_t mask;
> > > > > uint32_t data;
> > > > >
> > > > > @@ -74,7 +75,7 @@
> > > > > return rte_flow_error_set(error,
> > > > > EINVAL,
> > > > >
> RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > NULL,
> > > > > "too many items to modify");
> > > > > -@@ -407,11 +407,11 @@
> flow_dv_convert_modify_action(struct
> > > > > rte_flow_item *item,
> > > > > +@@ -404,11 +404,11 @@
> flow_dv_convert_modify_action(struct
> > > > > +rte_flow_item *item,
> > > > > ++i;
> > > > > ++field;
> > > > > } while (field->size);
> > > > > @@ -88,7 +89,7 @@
> > > > > return 0;
> > > > > }
> > > > >
> > > > > -@@ -572,7 +572,7 @@
> flow_dv_convert_action_modify_vlan_vid
> > > > > +@@ -569,7 +569,7 @@
> flow_dv_convert_action_modify_vlan_vid
> > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > >actions[i];
> > > > > struct field_modify_info *field =
> > > > > modify_vlan_out_first_vid;
> > > > >
> > > > > @@ -97,7 +98,7 @@
> > > > > return rte_flow_error_set(error, EINVAL,
> > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> > > > > "too many items to modify");
> > > > > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > > > > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > >actions;
> > > > > uint32_t i = resource->actions_num;
> > > > >
> > > > > @@ -106,7 +107,7 @@
> > > > > return rte_flow_error_set(error, EINVAL,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "too many items to
> > > > > modify"); -
> > >
> > > @@ -917,10 +917,6 @@
> > > > > flow_dv_convert_action_set_reg
> > > > > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > ++i;
> > > > > resource->actions_num = i;
> > > > > @@ -117,7 +118,7 @@
> > > > > return 0;
> > > > > }
> > > > >
> > > > > -@@ -2385,7 +2381,6 @@
> > >
> > > flow_dv_encap_decap_resource_register
> > > > > +@@ -2256,7 +2252,6 @@
> > >
> > > flow_dv_encap_decap_resource_register
> > > > > domain = sh->rx_domain;
> > > > > else
> > > > > domain = sh->tx_domain;
> > > > > @@ -125,7 +126,7 @@
> > > > > /* Lookup a matching resource from cache. */
> > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps,
> next)
> > > > > {
> > > > > if (resource->reformat_type ==
> cache_resource-
> > > > > > reformat_type && -@@ -3496,21 +3491,27 @@
> > > > >
> > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > +@@ -3367,21 +3362,27 @@
> > >
> > > flow_dv_validate_action_port_id(struct
> > > > > +rte_eth_dev *dev,
> > > > > *
> > > > > * @param dev
> > > > > * Pointer to rte_eth_dev structure.
> > > > > @@ -157,7 +158,7 @@
> > > > > }
> > > > >
> > > > > /**
> > > > > -@@ -3669,8 +3670,12 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > +@@ -3472,8 +3473,12 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > *cache_resource;
> > > > > struct mlx5dv_dr_domain *ns;
> > > > > @@ -171,7 +172,7 @@
> > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > >
> > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > "too many modify
> > > > > header
> > > > > items"); -@@ -3680,17 +3685,15 @@
> > > > > flow_dv_modify_hdr_resource_register
> > > > > +@@ -3483,17 +3488,15 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > ns = sh->tx_domain;
> > > > > else
> > > > > ns = sh->rx_domain;
> > > > > @@ -191,7 +192,7 @@
> > > > > DRV_LOG(DEBUG, "modify-header
> > > > > resource %p: refcnt %d++",
> > > > > (void *)cache_resource,
> > > > >
> rte_atomic32_read(&cache_resour
> > > > > ce-
> > > > > > refcnt));
> > > > >
> > > > > -@@ -3700,18 +3703,18 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > +@@ -3503,18 +3506,18 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > }
> > > > > }
> > > > > /* Register new modify-header resource. */ @@ -
> 215,7
> > > > > +216,7
> > >
> > > @@
> > > > > (uint64_t
> > > > > *)cache_resource-
> > > > > > actions);
> > > > >
> > > > > if (!cache_resource->verbs_action) {
> > > > > rte_free(cache_resource);
> > > > > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > };
> > > > > int actions_n = 0;
> > > > > bool actions_end = false;
> > > > > @@ -233,7 +234,7 @@
> > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > uint32_t tag_be;
> > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > uint32_t table;
> > > > > int ret = 0;
> > > > >
> > > > > @@ -254,7 +255,7 @@
> > > > > for (; !actions_end ; actions++) {
> > > > > const struct rte_flow_action_queue *queue;
> > > > > const struct rte_flow_action_rss *rss; -@@
> > > > > -7081,7
> > > > > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev, @@
> -
> > >
> > > 6731,7
> > > > > ++6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > > *dev,
> > > > > };
> > > > >
> > > > > if
> > > > > (flow_dv_convert_action_mark(dev,
> > >
> > > &mark, @@ -263,7 +264,7
> > > > > @@
> > > > >
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > > > *dev,
> > > > > actions->conf;
> > > > >
> > > > > if
> > > > > (flow_dv_convert_action_mark(dev,
> > >
> > > mark, @@ -272,7 +273,7 @@
> > > > >
> > > > > error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > > > *dev,
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > if (flow_dv_convert_action_set_meta
> @@
> > > > > -
> > > > > 281,7 +282,7 @@
> > > > > (const struct
> > > > > rte_flow_action_set_meta *)
> > > > > actions->conf, error))
> > > > > return -rte_errno;
> > > > > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct
> rte_eth_dev
> > >
> > > *dev,
> > > > > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> rte_eth_dev
> > > > > *dev,
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > if (flow_dv_convert_action_set_tag
> @@
> > > > > -290,7
> > >
> > > +291,7 @@
> > > > > (const struct
> > > > > rte_flow_action_set_tag
> > > > > *)
> > > > > actions->conf, error))
> > > > > return -rte_errno;
> > > > > -@@ -7232,7 +7242,7 @@ cnt_err:
> > > > > +@@ -6882,7 +6892,7 @@ cnt_err:
> > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > &vlan);
> > > > > /* If no VLAN push - this is a modify
> > > > > header
> > >
> > > action */
> > > > > if
> > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > @@ -299,7 +300,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > break;
> > > > > -@@ -7331,7 +7341,7 @@ cnt_err:
> > > > > +@@ -6981,7 +6991,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > if
> (flow_dv_convert_action_modify_mac
> > > > > @@ -308,7 +309,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > -@@ -7341,7 +7351,7 @@ cnt_err:
> > > > > +@@ -6991,7 +7001,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > if
> (flow_dv_convert_action_modify_ipv4
> > > > > @@ -317,7 +318,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > -@@ -7351,7 +7361,7 @@ cnt_err:
> > > > > +@@ -7001,7 +7011,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > if
> (flow_dv_convert_action_modify_ipv6
> > > > > @@ -326,7 +327,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > -@@ -7361,7 +7371,7 @@ cnt_err:
> > > > > +@@ -7011,7 +7021,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > if (flow_dv_convert_action_modify_tp
> @@
> > > > > -
> > > > > 335,7 +336,7 @@
> > > > > &flow_attr, error))
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type == -@@
> > > > > -7371,13
> > >
> > > +7381,13 @@
> > > > > cnt_err:
> > > > > +@@ -7021,13 +7031,13 @@ cnt_err:
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > if
> > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > @@ -351,7 +352,7 @@
> > > > > &flow_attr, error))
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_TTL;
> > >
> > > -@@ -7385,7 +7395,7
> > > > > @@ cnt_err:
> > > > > +@@ -7035,7 +7045,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > if
> > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > @@ -360,7 +361,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > -@@ -7396,7 +7406,7 @@ cnt_err:
> > > > > +@@ -7046,7 +7056,7 @@ cnt_err:
> > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > if
> > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > @@ -369,7 +370,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |= actions->type ==
> > > > >
> > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > -@@ -7405,13 +7415,13 @@ cnt_err:
> > > > > +@@ -7055,13 +7065,13 @@ cnt_err:
> > > > > break;
> > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > if (flow_dv_convert_action_set_reg
> @@ -
> > >
> > > 385,22 +386,7 @@
> > > > > return -rte_errno;
> > > > > action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > break;
> > > > > -@@ -7435,23 +7445,23 @@ cnt_err:
> > > > > - action_flags |=
> MLX5_FLOW_ACTION_METER;
> > > > > - break;
> > > > > - case
> RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > > > > -- if
> > > > > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > > > > -+ if
> > > > > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > > > > - a
> > > > > ctions,
> > > > > error))
> > > > > - return -rte_errno;
> > > > > - action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > > > > - break;
> > > > > - case
> RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > > > > -- if
> > > > > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > > > > -+ if
> > > > > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > > > > - a
> > > > > ctions,
> > > > > error))
> > > > > - return -rte_errno;
> > > > > - action_flags |=
> > > > > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > > > > +@@ -7086,10 +7096,10 @@ cnt_err:
> > > > > break;
> > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > actions_end = true;
> > > > > @@ -413,7 +399,7 @@
> > > > > return -rte_errno;
> > > > > dev_flow-
> > > > > > dv.actions[modify_action_position] =
> > > > >
> > > > > dev_flow-
> > > > > >dv.modify_hdr-
> > > > > > verbs_action;
> > > > >
> > > > > -@@ -7460,7 +7470,7 @@ cnt_err:
> > > > > +@@ -7098,7 +7108,7 @@ cnt_err:
> > > > > default:
> > > > > break;
> > > > > }
> > >
> > > --
> > > Kind regards,
> > > Luca Boccassi
> >
> >
> --
> Kind regards,
> Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-13 11:23 ` Bing Zhao
@ 2020-02-13 17:45 ` Luca Boccassi
2020-02-14 7:23 ` Bing Zhao
0 siblings, 1 reply; 310+ messages in thread
From: Luca Boccassi @ 2020-02-13 17:45 UTC (permalink / raw)
To: Bing Zhao, Dekel Peled; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi,
That patch is not yet in master. It was CC'ed for stable, so it will be
picked up when it's merged in master.
On Thu, 2020-02-13 at 11:23 +0000, Bing Zhao wrote:
> Hi Luca,
>
> I mean this patch:
> http://patches.dpdk.org/patch/65574/
>
>
> Thank you.
>
> BR. Bing
>
> > -----Original Message-----
> > From: Luca Boccassi <
> > luca.boccassi@gmail.com
> > >
> > Sent: Thursday, February 13, 2020 5:36 PM
> > To: Bing Zhao <
> > bingz@mellanox.com
> > >
> > Cc: Ori Kam <
> > orika@mellanox.com
> > >; Slava Ovsiienko
> > <
> > viacheslavo@mellanox.com
> > >; dpdk stable <
> > stable@dpdk.org
> > >
> > Subject: Re: patch 'net/mlx5: fix modify actions support
> > limitation' has
> > been queued to stable release 19.11.1
> >
> > Hi,
> >
> > Thank you. Sorry, what do you mean by #65574?
> >
> > On Thu, 2020-02-13 at 09:06 +0000, Bing Zhao wrote:
> > > Hi Luca,
> > > I checked the patch and it is OK for me.
> > > After this is applied, then patch #65574 is also needed for
> > > 19.11.1.
> > >
> > > So many thanks for your help.
> > >
> > > BR. Bing
> > >
> > > > -----Original Message-----
> > > > From: Luca Boccassi <
> > > > luca.boccassi@gmail.com
> > > >
> > > >
> > > > Sent: Tuesday, February 11, 2020 10:23 PM
> > > > To: Bing Zhao <
> > > > bingz@mellanox.com
> > > >
> > > >
> > > > Cc: Ori Kam <
> > > > orika@mellanox.com
> > > >
> > > > > ; Slava Ovsiienko
> > > >
> > > > <
> > > > viacheslavo@mellanox.com
> > > >
> > > > > ; dpdk stable <
> > > >
> > > > stable@dpdk.org
> > > >
> > > >
> > > > Subject: Re: patch 'net/mlx5: fix modify actions support
> > > > limitation'
> > > > has been queued to stable release 19.11.1
> > > >
> > > > Hi,
> > > >
> > > > The rebasing is done and you can see the result in the mail you
> > > > replied to.
> > > >
> > > > The new 19.11 branch will be pushed by the end of the week.
> > > >
> > > > On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> > > > > Hi Luca,
> > > > >
> > > > > Many thanks for your help.
> > > > >
> > > > > Yes, this needs to be also applied to the 19.11 stable
> > > > > branch. I
> > > > > want to rebase it but could not find the branch in
> > > > >
> > > >
> > > >
> >
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fg
> >
> > > > it.d
> > > > > pdk.org%2Fdpdk-
> > > >
> > > > stable%2F&data=02%7C01%7Cbingz%40mellanox.com%7C888
> > > >
> > > >
> >
> > c4fa2d2b242c93ebc08d7aefde4e1%7Ca652971c7d2e4d9ba6a4d149256
> > > > f461b%7C0%7
> > > >
> > > >
> >
> > C0%7C637170277804566321&sdata=YMTaedRR3Lv7OKd%2FvhEJ
> > > > 5CXOJ9oHU3h%2B
> > > > > ei4qov0x6RA%3D&reserved=0
> > > > > , so would you please share me the
> > > > > branch information then I can try to finish the rebasing
> > > > > today or
> > > > > early tomorrow.
> > > > >
> > > > > BR. Bing
> > > > >
> > > > > > -----Original Message-----
> > > > > > From:
> > > > > > luca.boccassi@gmail.com
> > > > > >
> > > > > >
> > > > > > <
> > > > > > luca.boccassi@gmail.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Sent: Tuesday, February 11, 2020 7:21 PM
> > > > > > To: Bing Zhao <
> > > > > > bingz@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Cc: Ori Kam <
> > > > > > orika@mellanox.com
> > > > > >
> > > > > >
> > > > > > > ; Slava Ovsiienko
> > > > > >
> > > > > > <
> > > > > > viacheslavo@mellanox.com
> > > > > >
> > > > > >
> > > > > > > ; dpdk stable <
> > > > > >
> > > > > > stable@dpdk.org
> > > > > >
> > > > > >
> > > > > >
> > > > > > Subject: patch 'net/mlx5: fix modify actions support
> > > > > > limitation'
> > > > > > has
> > > > > > been queued to stable release 19.11.1
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > FYI, your patch has been queued to stable release 19.11.1
> > > > > >
> > > > > > Note it hasn't been pushed to
> > > > > >
> > > >
> > > >
> >
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> >
> > > > > > dpdk.org%2Fbrowse%2Fdpdk-
> > > > > >
> > > >
> > > >
> >
> > stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> > > >
> >
> > 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> > > >
> >
> > 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > > > > > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > > > > > It will be pushed if I get no objections before 02/13/20.
> > > > > > So
> > > > > > please
> > > > > > shout if anyone has objections.
> > > > > >
> > > > > > Also note that after the patch there's a diff of the
> > > > > > upstream
> > > > > > commit
> > > > > > vs the patch applied to the branch. This will indicate if
> > > > > > there
> > > > > > was
> > > > > > any rebasing needed to apply to the stable branch. If there
> > > > > > were
> > > > > > code changes for rebasing
> > > > > > (ie: not only metadata diffs), please double check that the
> > > > > > rebase
> > > > > > was correctly done.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > Luca Boccassi
> > > > > >
> > > > > > ---
> > > > > > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon Sep
> >
> > 17
> > > > > > 00:00:00 2001
> > > > > > From: Bing Zhao <
> > > > > > bingz@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > > limitation
> > > > > >
> > > > > > [ upstream commit
> >
> > 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > > > In the root table, there is some limitation of total number
> > > > > > of
> > > > > > header modify actions, 16 or 8 for each. But in other
> > > > > > tables,
> > > > > > there
> > > > > > is no such strict limitation. In an IPv6 case, the IP
> > > > > > fields
> > > > > > modifying will occupy more actions than that in IPv4, so
> > > > > > the
> > > > > > total
> > > > > > support number should be increased in order to support as
> >
> > many
> > > > > > actions as possible for an
> > > > > > IPv6 +
> > > > > > TCP packet.
> > > > > > And in the meanwhile, the memory consumption should also
> >
> > be
> > > > taken
> > > > > > into consideration because sometimes only several actions
> > > > > > are
> > > > > > needed.
> > > > > > The root table checking could also be done in low layer
> > > > > > driver
> > > > > > and
> > > > > > the error code will be returned if the actions number is
> > > > > > over
> > > > > > the
> > > > > > maximal supported value.
> > > > > >
> > > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> >
> > actions
> > > > > > number")
> > > > > >
> > > > > > Signed-off-by: Bing Zhao <
> > > > > > bingz@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Acked-by: Ori Kam <
> > > > > > orika@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > > viacheslavo@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > ---
> > > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > > drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++---
> >
> > ----
> > > > > > -
> > > >
> > > > ---
> > > > > > --
> > > > > > --
> > > > > > 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > > b/drivers/net/mlx5/mlx5_flow.h index
> >
> > db12715ecc..13bed08d75
> > > > > > 100644
> > > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > > @@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > > >
> > > > > > /*
> > > > > > * Number of modification commands.
> > > > > > - * If extensive metadata registers are supported
> > > > > > - * the maximal actions amount is 16 and 8 otherwise.
> > > > > > + * If extensive metadata registers are supported, the
> > > > > > maximal
> > > > > > actions
> > > > > > + amount is
> > > > > > + * 16 and 8 otherwise on root table. The validation could
> > > > > > also
> > > > > > be
> > > > > > done
> > > > > > + in the
> > > > > > + * lower driver layer.
> > > > > > + * On non-root table, there is no limitation, but 32 is
> > > > > > enough
> > > > > > right
> > > > > > now.
> > > > > > */
> > > > > > -#define MLX5_MODIFY_NUM 16
> > > > > > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > > > > > +#define MLX5_MAX_MODIFY_NUM 32
> > > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG 8
> > > > > >
> > > > > > /* Modify resource structure */
> > > > > > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9 +409,9
> > > >
> > > > @@
> > > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > > /**< Verbs modify header action object. */
> > > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > > uint32_t actions_num; /**< Number of modification
> > > > > > actions.
> > > > > > */
> > > > > > - struct mlx5_modification_cmd
> >
> > actions[MLX5_MODIFY_NUM];
> > > > > > + uint64_t flags; /**< Flags for RDMA API. */
> > > > > > + struct mlx5_modification_cmd actions[];
> > > > > > /**< Modification actions. */
> > > > > > - uint64_t flags; /**< Flags for RDMA API. */
> > > > > > };
> > > > > >
> > > > > > /* Jump action resource structure. */ diff --git
> > > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > > >
> > > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > index 8f77909419..74d1a68e4a
> > > > > > 100644
> > > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > @@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > > > rte_flow_item *item,
> > > > > > uint32_t mask;
> > > > > > uint32_t data;
> > > > > >
> > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > return rte_flow_error_set(error,
> > > > > > EINVAL,
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > > NULL,
> > > > > > "too many items to modify");
> > > > > > @@ -404,11 +404,11 @@
> >
> > flow_dv_convert_modify_action(struct
> > > > > > rte_flow_item *item,
> > > > > > ++i;
> > > > > > ++field;
> > > > > > } while (field->size);
> > > > > > - resource->actions_num = i;
> > > > > > - if (!resource->actions_num)
> > > > > > + if (resource->actions_num == i)
> > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "invalid modification
> > > > > > flow
> > > > > > item");
> > > > > > + resource->actions_num = i;
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > @@ -569,7 +569,7 @@
> >
> > flow_dv_convert_action_modify_vlan_vid
> > > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > > > actions[i];
> > > > > >
> > > > > > struct field_modify_info *field =
> > > > > > modify_vlan_out_first_vid;
> > > > > >
> > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "too many items to modify");
> > > > > > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > > > actions;
> > > > > >
> > > > > > uint32_t i = resource->actions_num;
> > > > > >
> > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "too many items to
> > > > > > modify");
> > > >
> > > > @@ -914,10 +914,6 @@
> > > > > > flow_dv_convert_action_set_reg
> > > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > > ++i;
> > > > > > resource->actions_num = i;
> > > > > > - if (!resource->actions_num)
> > > > > > - return rte_flow_error_set(error, EINVAL,
> > > > > > -
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > - "invalid modification
> > > > > > flow
> > > > > > item");
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > @@ -2256,7 +2252,6 @@
> >
> > flow_dv_encap_decap_resource_register
> > > > > > domain = sh->rx_domain;
> > > > > > else
> > > > > > domain = sh->tx_domain;
> > > > > > -
> > > > > > /* Lookup a matching resource from cache. */
> > > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps, next)
> > > > > > {
> > > > > > if (resource->reformat_type == cache_resource-
> > > > > > > reformat_type && @@ -3367,21 +3362,27 @@
> > > > > >
> > > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > > *
> > > > > > * @param dev
> > > > > > * Pointer to rte_eth_dev structure.
> > > > > > + * @param flags
> > > > > > + * Flags bits to check if root level.
> > > > > > *
> > > > > > * @return
> > > > > > * Max number of modify header actions device can
> > > > > > support.
> > > > > > */
> > > > > > static unsigned int
> > > > > > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > > > > > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev,
> > > >
> > > > uint64_t
> > > > > > flags)
> > > > > > {
> > > > > > /*
> > > > > > * There's no way to directly query the max cap.
> > > > > > Although it
> > > >
> > > > has
> > > > > > to be
> > > > > > * acquried by iterative trial, it is a safe assumption
> > > > > > that more
> > > > > > * actions are supported by FW if extensive metadata
> > > > > > register
> > > >
> > > > is
> > > > > > - * supported.
> > > > > > + * supported. (Only in the root table)
> > > > > > */
> > > > > > - return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > > MLX5_MODIFY_NUM :
> > > > > > -
> > > > > > MLX5_MODIFY_NUM_NO_MREG;
> > > > > > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > > > > > + return MLX5_MAX_MODIFY_NUM;
> > > > > > + else
> > > > > > + return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > > +
> > > > > > MLX5_ROOT_TBL_MODIFY_NUM :
> > > > > > +
> > > > > > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > > > > > }
> > > > > >
> > > > > > /**
> > > > > > @@ -3472,8 +3473,12 @@
> >
> > flow_dv_modify_hdr_resource_register
> > > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > > *cache_resource;
> > > > > > struct mlx5dv_dr_domain *ns;
> > > > > > + uint32_t actions_len;
> > > > > >
> > > > > > - if (resource->actions_num >
> > > > > > flow_dv_modify_hdr_action_max(dev))
> > > > > > + resource->flags =
> > > > > > + dev_flow->group ? 0 :
> > > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > > + if (resource->actions_num >
> > > > > > flow_dv_modify_hdr_action_max(dev,
> > > > > > + resource->flags))
> > > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "too many modify
> > > > > > header
> > > > > > items"); @@ -3483,17 +3488,15 @@
> > > > > > flow_dv_modify_hdr_resource_register
> > > > > > ns = sh->tx_domain;
> > > > > > else
> > > > > > ns = sh->rx_domain;
> > > > > > - resource->flags =
> > > > > > - dev_flow->group ? 0 :
> > > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > > /* Lookup a matching resource from cache. */
> > > > > > + actions_len = resource->actions_num *
> >
> > sizeof(resource-
> > > > > > > actions[0]);
> > > > > >
> > > > > > LIST_FOREACH(cache_resource, &sh->modify_cmds, next) {
> > > > > > if (resource->ft_type == cache_resource-
> > > > > > > ft_type &&
> > > > > >
> > > > > > resource->actions_num == cache_resource-
> > > > > > > actions_num &&
> > > > > >
> > > > > > resource->flags == cache_resource->flags &&
> > > > > > !memcmp((const void *)resource->actions,
> > > > > > (const void *)cache_resource-
> > > > > > > actions,
> > > > > >
> > > > > > - (resource->actions_num *
> > > > > > - sizeof(resource-
> > > > > > > actions[0])))) {
> > > > > >
> > > > > > + actions_len)) {
> > > > > > DRV_LOG(DEBUG, "modify-header
> > > > > > resource %p: refcnt %d++",
> > > > > > (void *)cache_resource,
> > > > > > rte_atomic32_read(&cache_resour
> > > > > > ce-
> > > > > > > refcnt));
> > > > > >
> > > > > > @@ -3503,18 +3506,18 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > }
> > > > > > }
> > > > > > /* Register new modify-header resource. */
> > > > > > - cache_resource = rte_calloc(__func__, 1,
> > > > > > sizeof(*cache_resource), 0);
> > > > > > + cache_resource = rte_calloc(__func__, 1,
> > > > > > + sizeof(*cache_resource) +
> > > > > > actions_len, 0);
> > > > > > if (!cache_resource)
> > > > > > return rte_flow_error_set(error, ENOMEM,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > > > > > "cannot allocate
> > > > > > resource
> > > > > > memory");
> > > > > > *cache_resource = *resource;
> > > > > > + rte_memcpy(cache_resource->actions, resource-
> > >
> > > actions,
> > > > > > actions_len);
> > > > > > cache_resource->verbs_action =
> > > > > > mlx5_glue->dv_create_flow_action_modify_header
> > > > > > - (sh->ctx,
> > > > > > cache_resource-
> > > > > > > ft_type,
> > > > > >
> > > > > > - ns, cache_resource-
> > > > > > > flags,
> > > > > >
> > > > > > - cache_resource-
> > > > > > > actions_num
> > > > > >
> > > > > > *
> > > > > > - sizeof(cache_resource-
> > > > > > > actions[0]),
> > > > > >
> > > > > > + (sh->ctx,
> > > > > > cache_resource-
> > > > > > > ft_type, ns,
> > > > > >
> > > > > > + cache_resource->flags,
> > > > > > actions_len,
> > > > > > (uint64_t
> > > > > > *)cache_resource-
> > > > > > > actions);
> > > > > >
> > > > > > if (!cache_resource->verbs_action) {
> > > > > > rte_free(cache_resource);
> > > > > > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev *dev,
> > > > > > };
> > > > > > int actions_n = 0;
> > > > > > bool actions_end = false;
> > > > > > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res =
> >
> > {
> > > > > > - .ft_type = attr->egress ?
> > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > > -
> > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > > > > > - };
> > > > > > + union {
> > > > > > + struct mlx5_flow_dv_modify_hdr_resource res;
> > > > > > + uint8_t len[sizeof(struct
> > > > > > mlx5_flow_dv_modify_hdr_resource) +
> > > > > > + sizeof(struct
> > > > > > mlx5_modification_cmd) *
> > > > > > + (MLX5_MAX_MODIFY_NUM + 1)];
> > > > > > + } mhdr_dummy;
> > > > > > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res
> >
> > =
> > > > > > &mhdr_dummy.res;
> > > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > > uint32_t tag_be;
> > > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev *dev,
> > > > > > uint32_t table;
> > > > > > int ret = 0;
> > > > > >
> > > > > > + mhdr_res->ft_type = attr->egress ?
> > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > > +
> > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > > > > > ret = mlx5_flow_group_to_table(attr, dev_flow-
> > > > > > > external, attr-
> > > > > > > group,
> > > > > >
> > > > > > &table, error);
> > > > > > if (ret)
> > > > > > return ret;
> > > > > > dev_flow->group = table;
> > > > > > if (attr->transfer)
> > > > > > - mhdr_res.ft_type =
> >
> > MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > > + mhdr_res->ft_type =
> >
> > MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > > if (priority == MLX5_FLOW_PRIO_RSVD)
> > > > > > priority = dev_conf->flow_prio - 1;
> > > > > > + /* number of actions must be set to 0 in case of dirty
> > > > > > stack.
> > > > > > */
> > > > > > + mhdr_res->actions_num = 0;
> > > > > > for (; !actions_end ; actions++) {
> > > > > > const struct rte_flow_action_queue *queue;
> > > > > > const struct rte_flow_action_rss *rss; @@
> > > > > > -6731,7
> > > > > > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > };
> > > > > >
> > > > > > if
> > > > > > (flow_dv_convert_action_mark(dev,
> > > >
> > > > &mark,
> > > > > > -
> > > > > > &mhdr_res,
> > > > > > +
> > > > > > mhdr_res,
> > > > > >
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7 @@
> > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > actions->conf;
> > > > > >
> > > > > > if
> > > > > > (flow_dv_convert_action_mark(dev,
> > > >
> > > > mark,
> > > > > > -
> > > > > > &mhdr_res,
> > > > > > +
> > > > > > mhdr_res,
> > > > > >
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7 @@
> > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > > if (flow_dv_convert_action_set_meta
> > > > > > - (dev, &mhdr_res, attr,
> > > > > > + (dev, mhdr_res, attr,
> > > > > > (const struct
> > > > > > rte_flow_action_set_meta *)
> > > > > > actions->conf, error))
> > > > > > return -rte_errno;
> > > > > > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > > if (flow_dv_convert_action_set_tag
> > > > > > - (dev, &mhdr_res,
> > > > > > + (dev, mhdr_res,
> > > > > > (const struct
> > > > > > rte_flow_action_set_tag
> > > > > > *)
> > > > > > actions->conf, error))
> > > > > > return -rte_errno;
> > > > > > @@ -6882,7 +6892,7 @@ cnt_err:
> > > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > > &vlan);
> > > > > > /* If no VLAN push - this is a modify
> > > > > > header
> > > >
> > > > action */
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > > - (&mhdr_res,
> > > > > > actions,
> > > > > > error))
> > > > > > + (mhdr_res,
> > > > > > actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > > break;
> > > > > > @@ -6981,7 +6991,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > > if (flow_dv_convert_action_modify_mac
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > > @@ -6991,7 +7001,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > > if (flow_dv_convert_action_modify_ipv4
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > > @@ -7001,7 +7011,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > > if (flow_dv_convert_action_modify_ipv6
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > > @@ -7011,7 +7021,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > > if (flow_dv_convert_action_modify_tp
> > > > > > - (&mhdr_res, actions,
> > > > > > items,
> > > > > > + (mhdr_res, actions,
> > > > > > items,
> > > > > > &flow_attr, error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type == @@
> > > > > > -7021,13
> > > >
> > > > +7031,13 @@
> > > > > > cnt_err:
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > > - (&mhdr_res, items,
> > > > > > &flow_attr,
> > > > > > error))
> > > > > > + (mhdr_res, items,
> > > > > > &flow_attr,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_DEC_TTL;
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > > > > > if (flow_dv_convert_action_modify_ttl
> > > > > > - (&mhdr_res, actions,
> > > > > > items,
> > > > > > + (mhdr_res, actions,
> > > > > > items,
> > > > > > &flow_attr, error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_TTL;
> > > >
> > > > @@ -7035,7 +7045,7 @@
> > > > > > cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > > @@ -7046,7 +7056,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > > @@ -7055,13 +7065,13 @@ cnt_err:
> > > > > > break;
> > > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > > if (flow_dv_convert_action_set_reg
> > > > > > - (&mhdr_res, actions,
> > > > > > error))
> > > > > > + (mhdr_res, actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > break;
> > > > > > case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > > > > > if (flow_dv_convert_action_copy_mreg
> > > > > > - (dev, &mhdr_res,
> > > > > > actions,
> > > > > > error))
> > > > > > + (dev, mhdr_res,
> > > > > > actions,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > break;
> > > > > > @@ -7086,10 +7096,10 @@ cnt_err:
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > > actions_end = true;
> > > > > > - if (mhdr_res.actions_num) {
> > > > > > + if (mhdr_res->actions_num) {
> > > > > > /* create modify action if
> > > > > > needed. */
> > > > > > if
> > > > > > (flow_dv_modify_hdr_resource_register
> > > > > > - (dev, &mhdr_res,
> > > > > > dev_flow,
> > > > > > error))
> > > > > > + (dev, mhdr_res,
> > > > > > dev_flow,
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > dev_flow-
> > > > > > > dv.actions[modify_action_position] =
> > > > > >
> > > > > > dev_flow-
> > > > > > > dv.modify_hdr-
> > > > > > > verbs_action;
> > > > > >
> > > > > > @@ -7098,7 +7108,7 @@ cnt_err:
> > > > > > default:
> > > > > > break;
> > > > > > }
> > > > > > - if (mhdr_res.actions_num &&
> > > > > > + if (mhdr_res->actions_num &&
> > > > > > modify_action_position == UINT32_MAX)
> > > > > > modify_action_position = actions_n++;
> > > > > > }
> > > > > > --
> > > > > > 2.20.1
> > > > > >
> > > > > > ---
> > > > > > Diff of the applied patch vs upstream commit (please
> > > > > > double-
> > > >
> > > > check
> > > > > > if
> > > > > > non-empty:
> > > > > > ---
> > > > > > --- - 2020-02-11 11:17:42.994804790 +0000
> > > > > > +++ 0122-net-mlx5-fix-modify-actions-support-
> > > > > > limitation.patch
> > > > > > 2020-
> > > > > > 02-11 11:17:38.612005311 +0000
> > > > > > @@ -1,8 +1,10 @@
> > > > > > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon Sep
> >
> > 17
> > > > > > 00:00:00 2001
> > > > > > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon
> >
> > Sep 17
> > > > > > 00:00:00 2001
> > > > > > From: Bing Zhao <
> > > > > > bingz@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > > limitation
> > > > > >
> > > > > > +[ upstream commit
> >
> > 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > > > +
> > > > > > In the root table, there is some limitation of total
> > > > > > number of
> > > > > > header modify actions, 16 or 8 for each. But in other
> > > > > > tables,
> > > > > > there
> > > > > > is no such strict limitation. In an IPv6 case, the IP
> > > > > > fields
> > > > > > modifying @@
> > > > > > -16,21
> > > > > > +18,20 @@ maximal supported value.
> > > > > >
> > > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> >
> > actions
> > > > > > number")
> > > > > > -Cc:
> > > > > > stable@dpdk.org
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Signed-off-by: Bing Zhao <
> > > > > > bingz@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Acked-by: Ori Kam <
> > > > > > orika@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > > viacheslavo@mellanox.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > ---
> > > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > > - drivers/net/mlx5/mlx5_flow_dv.c | 108 +++++++++++++++++--
> >
> > --
> > > > > > ---
> > > >
> > > > -
> > > > > > ----
> > > > > > ---
> > > > > > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > > > > > + drivers/net/mlx5/mlx5_flow_dv.c | 104 +++++++++++++++++--
> >
> > ----
> > > > --
> > > > > > ---
> > > > > > ----
> > > > > > + 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > > b/drivers/net/mlx5/mlx5_flow.h -index
> >
> > a1c7b67488..9832542328
> > > > > > 100644
> > > > > > +index db12715ecc..13bed08d75 100644
> > > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > > -@@ -392,11 +392,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > > > +@@ -391,11 +391,14 @@ struct mlx5_flow_dv_tag_resource {
> > > > > >
> > > > > > /*
> > > > > > * Number of modification commands.
> > > > > > @@ -49,7 +50,7 @@
> > > > > >
> > > > > > /* Modify resource structure */
> > > > > > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9
> >
> > +410,9
> > > > @@
> > > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > > +@@ -406,9 +409,9 @@ struct
> > > >
> > > > mlx5_flow_dv_modify_hdr_resource {
> > > > > > /**< Verbs modify header action object. */
> > > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > > uint32_t actions_num; /**< Number of modification
> > > > > > actions.
> > > > > > */ @@ -62,10 +63,10 @@
> > > > > >
> > > > > > /* Jump action resource structure. */ diff --git
> > > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > > >
> > > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > -index 26dbaaf329..5a1b42698c
> > > > > > 100644
> > > > > > +index 8f77909419..74d1a68e4a 100644
> > > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c +++
> > > > > > b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -366,7 +366,7 @@
> > > > > > flow_dv_convert_modify_action(struct
> > > > > > rte_flow_item *item,
> > > > > > +@@ -363,7 +363,7 @@ flow_dv_convert_modify_action(struct
> > > > > > rte_flow_item
> > > > > > +*item,
> > > > > > uint32_t mask;
> > > > > > uint32_t data;
> > > > > >
> > > > > > @@ -74,7 +75,7 @@
> > > > > > return rte_flow_error_set(error,
> > > > > > EINVAL,
> > > > > >
> >
> > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > > NULL,
> > > > > > "too many items to modify");
> > > > > > -@@ -407,11 +407,11 @@
> >
> > flow_dv_convert_modify_action(struct
> > > > > > rte_flow_item *item,
> > > > > > +@@ -404,11 +404,11 @@
> >
> > flow_dv_convert_modify_action(struct
> > > > > > +rte_flow_item *item,
> > > > > > ++i;
> > > > > > ++field;
> > > > > > } while (field->size);
> > > > > > @@ -88,7 +89,7 @@
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > -@@ -572,7 +572,7 @@
> >
> > flow_dv_convert_action_modify_vlan_vid
> > > > > > +@@ -569,7 +569,7 @@
> >
> > flow_dv_convert_action_modify_vlan_vid
> > > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > > > actions[i];
> > > > > >
> > > > > > struct field_modify_info *field =
> > > > > > modify_vlan_out_first_vid;
> > > > > >
> > > > > > @@ -97,7 +98,7 @@
> > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> >
> > NULL,
> > > > > > "too many items to modify");
> > > > > > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > > > > > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > > > actions;
> > > > > >
> > > > > > uint32_t i = resource->actions_num;
> > > > > >
> > > > > > @@ -106,7 +107,7 @@
> > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "too many items to
> > > > > > modify"); -
> > > >
> > > > @@ -917,10 +917,6 @@
> > > > > > flow_dv_convert_action_set_reg
> > > > > > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > > ++i;
> > > > > > resource->actions_num = i;
> > > > > > @@ -117,7 +118,7 @@
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > > -@@ -2385,7 +2381,6 @@
> > > >
> > > > flow_dv_encap_decap_resource_register
> > > > > > +@@ -2256,7 +2252,6 @@
> > > >
> > > > flow_dv_encap_decap_resource_register
> > > > > > domain = sh->rx_domain;
> > > > > > else
> > > > > > domain = sh->tx_domain;
> > > > > > @@ -125,7 +126,7 @@
> > > > > > /* Lookup a matching resource from cache. */
> > > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps,
> >
> > next)
> > > > > > {
> > > > > > if (resource->reformat_type ==
> >
> > cache_resource-
> > > > > > > reformat_type && -@@ -3496,21 +3491,27 @@
> > > > > >
> > > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > > +@@ -3367,21 +3362,27 @@
> > > >
> > > > flow_dv_validate_action_port_id(struct
> > > > > > +rte_eth_dev *dev,
> > > > > > *
> > > > > > * @param dev
> > > > > > * Pointer to rte_eth_dev structure.
> > > > > > @@ -157,7 +158,7 @@
> > > > > > }
> > > > > >
> > > > > > /**
> > > > > > -@@ -3669,8 +3670,12 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > +@@ -3472,8 +3473,12 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > > *cache_resource;
> > > > > > struct mlx5dv_dr_domain *ns;
> > > > > > @@ -171,7 +172,7 @@
> > > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > > >
> > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > "too many modify
> > > > > > header
> > > > > > items"); -@@ -3680,17 +3685,15 @@
> > > > > > flow_dv_modify_hdr_resource_register
> > > > > > +@@ -3483,17 +3488,15 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > ns = sh->tx_domain;
> > > > > > else
> > > > > > ns = sh->rx_domain;
> > > > > > @@ -191,7 +192,7 @@
> > > > > > DRV_LOG(DEBUG, "modify-header
> > > > > > resource %p: refcnt %d++",
> > > > > > (void *)cache_resource,
> > > > > >
> >
> > rte_atomic32_read(&cache_resour
> > > > > > ce-
> > > > > > > refcnt));
> > > > > >
> > > > > > -@@ -3700,18 +3703,18 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > +@@ -3503,18 +3506,18 @@
> > > >
> > > > flow_dv_modify_hdr_resource_register
> > > > > > }
> > > > > > }
> > > > > > /* Register new modify-header resource. */ @@ -
> >
> > 215,7
> > > > > > +216,7
> > > >
> > > > @@
> > > > > > (uint64_t
> > > > > > *)cache_resource-
> > > > > > > actions);
> > > > > >
> > > > > > if (!cache_resource->verbs_action) {
> > > > > > rte_free(cache_resource);
> > > > > > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev
> > > > > > *dev,
> > > > > > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev
> > > > > > *dev,
> > > > > > };
> > > > > > int actions_n = 0;
> > > > > > bool actions_end = false;
> > > > > > @@ -233,7 +234,7 @@
> > > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > > uint32_t tag_be;
> > > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev
> > > > > > *dev,
> > > > > > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > > >
> > > > rte_eth_dev
> > > > > > *dev,
> > > > > > uint32_t table;
> > > > > > int ret = 0;
> > > > > >
> > > > > > @@ -254,7 +255,7 @@
> > > > > > for (; !actions_end ; actions++) {
> > > > > > const struct rte_flow_action_queue *queue;
> > > > > > const struct rte_flow_action_rss *rss; -@@
> > > > > > -7081,7
> > > > > > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev, @@
> >
> > -
> > > > 6731,7
> > > > > > ++6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > > > *dev,
> > > > > > };
> > > > > >
> > > > > > if
> > > > > > (flow_dv_convert_action_mark(dev,
> > > >
> > > > &mark, @@ -263,7 +264,7
> > > > > > @@
> > > > > >
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7 @@
> > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > > > *dev,
> > > > > > actions->conf;
> > > > > >
> > > > > > if
> > > > > > (flow_dv_convert_action_mark(dev,
> > > >
> > > > mark, @@ -272,7 +273,7 @@
> > > > > > error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7 @@
> > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > > > *dev,
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > > if (flow_dv_convert_action_set_meta
> >
> > @@
> > > > > > -
> > > > > > 281,7 +282,7 @@
> > > > > > (const struct
> > > > > > rte_flow_action_set_meta *)
> > > > > > actions->conf, error))
> > > > > > return -rte_errno;
> > > > > > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > *dev,
> > > > > > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> >
> > rte_eth_dev
> > > > > > *dev,
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > > if (flow_dv_convert_action_set_tag
> >
> > @@
> > > > > > -290,7
> > > >
> > > > +291,7 @@
> > > > > > (const struct
> > > > > > rte_flow_action_set_tag
> > > > > > *)
> > > > > > actions->conf, error))
> > > > > > return -rte_errno;
> > > > > > -@@ -7232,7 +7242,7 @@ cnt_err:
> > > > > > +@@ -6882,7 +6892,7 @@ cnt_err:
> > > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > > &vlan);
> > > > > > /* If no VLAN push - this is a modify
> > > > > > header
> > > >
> > > > action */
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > > @@ -299,7 +300,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > > break;
> > > > > > -@@ -7331,7 +7341,7 @@ cnt_err:
> > > > > > +@@ -6981,7 +6991,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > > if
> >
> > (flow_dv_convert_action_modify_mac
> > > > > > @@ -308,7 +309,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > > -@@ -7341,7 +7351,7 @@ cnt_err:
> > > > > > +@@ -6991,7 +7001,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > > if
> >
> > (flow_dv_convert_action_modify_ipv4
> > > > > > @@ -317,7 +318,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > > -@@ -7351,7 +7361,7 @@ cnt_err:
> > > > > > +@@ -7001,7 +7011,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > > if
> >
> > (flow_dv_convert_action_modify_ipv6
> > > > > > @@ -326,7 +327,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > > -@@ -7361,7 +7371,7 @@ cnt_err:
> > > > > > +@@ -7011,7 +7021,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > > if (flow_dv_convert_action_modify_tp
> >
> > @@
> > > > > > -
> > > > > > 335,7 +336,7 @@
> > > > > > &flow_attr, error))
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type == -@@
> > > > > > -7371,13
> > > >
> > > > +7381,13 @@
> > > > > > cnt_err:
> > > > > > +@@ -7021,13 +7031,13 @@ cnt_err:
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > > @@ -351,7 +352,7 @@
> > > > > > &flow_attr, error))
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_TTL;
> > > >
> > > > -@@ -7385,7 +7395,7
> > > > > > @@ cnt_err:
> > > > > > +@@ -7035,7 +7045,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > > @@ -360,7 +361,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > > -@@ -7396,7 +7406,7 @@ cnt_err:
> > > > > > +@@ -7046,7 +7056,7 @@ cnt_err:
> > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > > if
> > > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > > @@ -369,7 +370,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |= actions->type ==
> > > > > >
> > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > > -@@ -7405,13 +7415,13 @@ cnt_err:
> > > > > > +@@ -7055,13 +7065,13 @@ cnt_err:
> > > > > > break;
> > > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > > if (flow_dv_convert_action_set_reg
> >
> > @@ -
> > > > 385,22 +386,7 @@
> > > > > > return -rte_errno;
> > > > > > action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > break;
> > > > > > -@@ -7435,23 +7445,23 @@ cnt_err:
> > > > > > - action_flags |=
> >
> > MLX5_FLOW_ACTION_METER;
> > > > > > - break;
> > > > > > - case
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > > > > > -- if
> > > > > > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > > > > > -+ if
> > > > > > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > > > > > - a
> > > > > > ctions,
> > > > > > error))
> > > > > > - return -rte_errno;
> > > > > > - action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > > > > > - break;
> > > > > > - case
> >
> > RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > > > > > -- if
> > > > > > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > > > > > -+ if
> > > > > > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > > > > > - a
> > > > > > ctions,
> > > > > > error))
> > > > > > - return -rte_errno;
> > > > > > - action_flags |=
> > > > > > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > > > > > +@@ -7086,10 +7096,10 @@ cnt_err:
> > > > > > break;
> > > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > > actions_end = true;
> > > > > > @@ -413,7 +399,7 @@
> > > > > > return -rte_errno;
> > > > > > dev_flow-
> > > > > > > dv.actions[modify_action_position] =
> > > > > >
> > > > > > dev_flow-
> > > > > > > dv.modify_hdr-
> > > > > > > verbs_action;
> > > > > >
> > > > > > -@@ -7460,7 +7470,7 @@ cnt_err:
> > > > > > +@@ -7098,7 +7108,7 @@ cnt_err:
> > > > > > default:
> > > > > > break;
> > > > > > }
> > > >
> > > > --
> > > > Kind regards,
> > > > Luca Boccassi
> > >
> > >
> >
> > --
> > Kind regards,
> > Luca Boccassi
>
>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' has been queued to stable release 19.11.1
2020-02-13 17:45 ` Luca Boccassi
@ 2020-02-14 7:23 ` Bing Zhao
0 siblings, 0 replies; 310+ messages in thread
From: Bing Zhao @ 2020-02-14 7:23 UTC (permalink / raw)
To: Luca Boccassi, Dekel Peled; +Cc: Ori Kam, Slava Ovsiienko, dpdk stable
Hi Luca,
Thanks a lot~
BR. Bing
> -----Original Message-----
> From: Luca Boccassi <luca.boccassi@gmail.com>
> Sent: Friday, February 14, 2020 1:45 AM
> To: Bing Zhao <bingz@mellanox.com>; Dekel Peled
> <dekelp@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: patch 'net/mlx5: fix modify actions support limitation' has
> been queued to stable release 19.11.1
>
> Hi,
>
> That patch is not yet in master. It was CC'ed for stable, so it will be
> picked up when it's merged in master.
>
> On Thu, 2020-02-13 at 11:23 +0000, Bing Zhao wrote:
> > Hi Luca,
> >
> > I mean this patch:
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> patch
> >
> es.dpdk.org%2Fpatch%2F65574%2F&data=02%7C01%7Cbingz%40
> mellanox.com
> > %7C0d1f93a9ac684973627508d7b0ac79c6%7Ca652971c7d2e4d9ba6
> a4d149256f461b
> > %7C0%7C0%7C637172127152485402&sdata=tyeJEN%2BWiycKa
> 1m6vIeXy6GQIO9O
> > vMPmY9PA2nNx4Tg%3D&reserved=0
> >
> >
> > Thank you.
> >
> > BR. Bing
> >
> > > -----Original Message-----
> > > From: Luca Boccassi <
> > > luca.boccassi@gmail.com
> > > >
> > > Sent: Thursday, February 13, 2020 5:36 PM
> > > To: Bing Zhao <
> > > bingz@mellanox.com
> > > >
> > > Cc: Ori Kam <
> > > orika@mellanox.com
> > > >; Slava Ovsiienko
> > > <
> > > viacheslavo@mellanox.com
> > > >; dpdk stable <
> > > stable@dpdk.org
> > > >
> > > Subject: Re: patch 'net/mlx5: fix modify actions support limitation'
> > > has been queued to stable release 19.11.1
> > >
> > > Hi,
> > >
> > > Thank you. Sorry, what do you mean by #65574?
> > >
> > > On Thu, 2020-02-13 at 09:06 +0000, Bing Zhao wrote:
> > > > Hi Luca,
> > > > I checked the patch and it is OK for me.
> > > > After this is applied, then patch #65574 is also needed for
> > > > 19.11.1.
> > > >
> > > > So many thanks for your help.
> > > >
> > > > BR. Bing
> > > >
> > > > > -----Original Message-----
> > > > > From: Luca Boccassi <
> > > > > luca.boccassi@gmail.com
> > > > >
> > > > >
> > > > > Sent: Tuesday, February 11, 2020 10:23 PM
> > > > > To: Bing Zhao <
> > > > > bingz@mellanox.com
> > > > >
> > > > >
> > > > > Cc: Ori Kam <
> > > > > orika@mellanox.com
> > > > >
> > > > > > ; Slava Ovsiienko
> > > > >
> > > > > <
> > > > > viacheslavo@mellanox.com
> > > > >
> > > > > > ; dpdk stable <
> > > > >
> > > > > stable@dpdk.org
> > > > >
> > > > >
> > > > > Subject: Re: patch 'net/mlx5: fix modify actions support
> > > > > limitation'
> > > > > has been queued to stable release 19.11.1
> > > > >
> > > > > Hi,
> > > > >
> > > > > The rebasing is done and you can see the result in the mail you
> > > > > replied to.
> > > > >
> > > > > The new 19.11 branch will be pushed by the end of the week.
> > > > >
> > > > > On Tue, 2020-02-11 at 13:48 +0000, Bing Zhao wrote:
> > > > > > Hi Luca,
> > > > > >
> > > > > > Many thanks for your help.
> > > > > >
> > > > > > Yes, this needs to be also applied to the 19.11 stable branch.
> > > > > > I want to rebase it but could not find the branch in
> > > > > >
> > > > >
> > > > >
> > >
> > >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fg
> > >
> > > > > it.d
> > > > > > pdk.org%2Fdpdk-
> > > > >
> > > > >
> stable%2F&data=02%7C01%7Cbingz%40mellanox.com%7C888
> > > > >
> > > > >
> > >
> > >
> c4fa2d2b242c93ebc08d7aefde4e1%7Ca652971c7d2e4d9ba6a4d149256
> > > > > f461b%7C0%7
> > > > >
> > > > >
> > >
> > >
> C0%7C637170277804566321&sdata=YMTaedRR3Lv7OKd%2FvhEJ
> > > > > 5CXOJ9oHU3h%2B
> > > > > > ei4qov0x6RA%3D&reserved=0
> > > > > > , so would you please share me the
> > > > > > branch information then I can try to finish the rebasing
> > > > > > today or
> > > > > > early tomorrow.
> > > > > >
> > > > > > BR. Bing
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From:
> > > > > > > luca.boccassi@gmail.com
> > > > > > >
> > > > > > >
> > > > > > > <
> > > > > > > luca.boccassi@gmail.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Sent: Tuesday, February 11, 2020 7:21 PM
> > > > > > > To: Bing Zhao <
> > > > > > > bingz@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Cc: Ori Kam <
> > > > > > > orika@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > > > ; Slava Ovsiienko
> > > > > > >
> > > > > > > <
> > > > > > > viacheslavo@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > > > ; dpdk stable <
> > > > > > >
> > > > > > > stable@dpdk.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Subject: patch 'net/mlx5: fix modify actions support
> > > > > > > limitation'
> > > > > > > has
> > > > > > > been queued to stable release 19.11.1
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > FYI, your patch has been queued to stable release 19.11.1
> > > > > > >
> > > > > > > Note it hasn't been pushed to
> > > > > > >
> > > > >
> > > > >
> > >
> > >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F
> > >
> > > > > > > dpdk.org%2Fbrowse%2Fdpdk-
> > > > > > >
> > > > >
> > > > >
> > >
> > >
> stable&data=02%7C01%7Cbingz%40mellanox.com%7Cf31d20ac8c
> > > > >
> > >
> > >
> 4e427386a108d7aee5e8c2%7Ca652971c7d2e4d9ba6a4d149256f461b%
> > > > >
> > >
> > >
> 7C0%7C0%7C637170174781961835&sdata=no%2BG5nKNzaYL72n
> > > > > > > 3vf5v0ZmfmJLRLNcPfwqgf4YJNU0%3D&reserved=0 yet.
> > > > > > > It will be pushed if I get no objections before 02/13/20.
> > > > > > > So
> > > > > > > please
> > > > > > > shout if anyone has objections.
> > > > > > >
> > > > > > > Also note that after the patch there's a diff of the
> > > > > > > upstream
> > > > > > > commit
> > > > > > > vs the patch applied to the branch. This will indicate if
> > > > > > > there
> > > > > > > was
> > > > > > > any rebasing needed to apply to the stable branch. If there
> > > > > > > were
> > > > > > > code changes for rebasing
> > > > > > > (ie: not only metadata diffs), please double check that the
> > > > > > > rebase
> > > > > > > was correctly done.
> > > > > > >
> > > > > > > Thanks.
> > > > > > >
> > > > > > > Luca Boccassi
> > > > > > >
> > > > > > > ---
> > > > > > > From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon
> Sep
> > >
> > > 17
> > > > > > > 00:00:00 2001
> > > > > > > From: Bing Zhao <
> > > > > > > bingz@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > > > limitation
> > > > > > >
> > > > > > > [ upstream commit
> > >
> > > 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > > > > In the root table, there is some limitation of total number
> > > > > > > of
> > > > > > > header modify actions, 16 or 8 for each. But in other
> > > > > > > tables,
> > > > > > > there
> > > > > > > is no such strict limitation. In an IPv6 case, the IP
> > > > > > > fields
> > > > > > > modifying will occupy more actions than that in IPv4, so
> > > > > > > the
> > > > > > > total
> > > > > > > support number should be increased in order to support as
> > >
> > > many
> > > > > > > actions as possible for an
> > > > > > > IPv6 +
> > > > > > > TCP packet.
> > > > > > > And in the meanwhile, the memory consumption should
> also
> > >
> > > be
> > > > > taken
> > > > > > > into consideration because sometimes only several actions
> > > > > > > are
> > > > > > > needed.
> > > > > > > The root table checking could also be done in low layer
> > > > > > > driver
> > > > > > > and
> > > > > > > the error code will be returned if the actions number is
> > > > > > > over
> > > > > > > the
> > > > > > > maximal supported value.
> > > > > > >
> > > > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> > >
> > > actions
> > > > > > > number")
> > > > > > >
> > > > > > > Signed-off-by: Bing Zhao <
> > > > > > > bingz@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Acked-by: Ori Kam <
> > > > > > > orika@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > > > viacheslavo@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---
> > > > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > > > drivers/net/mlx5/mlx5_flow_dv.c | 104
> +++++++++++++++++---
> > >
> > > ----
> > > > > > > -
> > > > >
> > > > > ---
> > > > > > > --
> > > > > > > --
> > > > > > > 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > > > >
> > > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > > > b/drivers/net/mlx5/mlx5_flow.h index
> > >
> > > db12715ecc..13bed08d75
> > > > > > > 100644
> > > > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > > > @@ -391,11 +391,14 @@ struct
> mlx5_flow_dv_tag_resource {
> > > > > > >
> > > > > > > /*
> > > > > > > * Number of modification commands.
> > > > > > > - * If extensive metadata registers are supported
> > > > > > > - * the maximal actions amount is 16 and 8 otherwise.
> > > > > > > + * If extensive metadata registers are supported, the
> > > > > > > maximal
> > > > > > > actions
> > > > > > > + amount is
> > > > > > > + * 16 and 8 otherwise on root table. The validation could
> > > > > > > also
> > > > > > > be
> > > > > > > done
> > > > > > > + in the
> > > > > > > + * lower driver layer.
> > > > > > > + * On non-root table, there is no limitation, but 32 is
> > > > > > > enough
> > > > > > > right
> > > > > > > now.
> > > > > > > */
> > > > > > > -#define MLX5_MODIFY_NUM 16
> > > > > > > -#define MLX5_MODIFY_NUM_NO_MREG 8
> > > > > > > +#define MLX5_MAX_MODIFY_NUM 32
> > > > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM 16
> > > > > > > +#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG
> 8
> > > > > > >
> > > > > > > /* Modify resource structure */
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource { @@ -406,9
> +409,9
> > > > >
> > > > > @@
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > > > /**< Verbs modify header action object. */
> > > > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > > > uint32_t actions_num; /**< Number of modification
> > > > > > > actions.
> > > > > > > */
> > > > > > > - struct mlx5_modification_cmd
> > >
> > > actions[MLX5_MODIFY_NUM];
> > > > > > > + uint64_t flags; /**< Flags for RDMA API. */
> > > > > > > + struct mlx5_modification_cmd actions[];
> > > > > > > /**< Modification actions. */
> > > > > > > - uint64_t flags; /**< Flags for RDMA API. */
> > > > > > > };
> > > > > > >
> > > > > > > /* Jump action resource structure. */ diff --git
> > > > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > >
> > > > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > > index 8f77909419..74d1a68e4a
> > > > > > > 100644
> > > > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > > @@ -363,7 +363,7 @@
> flow_dv_convert_modify_action(struct
> > > > > > > rte_flow_item *item,
> > > > > > > uint32_t mask;
> > > > > > > uint32_t data;
> > > > > > >
> > > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > > return rte_flow_error_set(error,
> > > > > > > EINVAL,
> > > > > > >
> RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > > > NULL,
> > > > > > > "too many items to modify");
> > > > > > > @@ -404,11 +404,11 @@
> > >
> > > flow_dv_convert_modify_action(struct
> > > > > > > rte_flow_item *item,
> > > > > > > ++i;
> > > > > > > ++field;
> > > > > > > } while (field->size);
> > > > > > > - resource->actions_num = i;
> > > > > > > - if (!resource->actions_num)
> > > > > > > + if (resource->actions_num == i)
> > > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > "invalid modification
> > > > > > > flow
> > > > > > > item");
> > > > > > > + resource->actions_num = i;
> > > > > > > return 0;
> > > > > > > }
> > > > > > >
> > > > > > > @@ -569,7 +569,7 @@
> > >
> > > flow_dv_convert_action_modify_vlan_vid
> > > > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > > > > actions[i];
> > > > > > >
> > > > > > > struct field_modify_info *field =
> > > > > > > modify_vlan_out_first_vid;
> > > > > > >
> > > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> NULL,
> > > > > > > "too many items to modify");
> > > > > > > @@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > > > > actions;
> > > > > > >
> > > > > > > uint32_t i = resource->actions_num;
> > > > > > >
> > > > > > > - if (i >= MLX5_MODIFY_NUM)
> > > > > > > + if (i >= MLX5_MAX_MODIFY_NUM)
> > > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > "too many items to
> > > > > > > modify");
> > > > >
> > > > > @@ -914,10 +914,6 @@
> > > > > > > flow_dv_convert_action_set_reg
> > > > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > > > ++i;
> > > > > > > resource->actions_num = i;
> > > > > > > - if (!resource->actions_num)
> > > > > > > - return rte_flow_error_set(error, EINVAL,
> > > > > > > -
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > - "invalid modification
> > > > > > > flow
> > > > > > > item");
> > > > > > > return 0;
> > > > > > > }
> > > > > > >
> > > > > > > @@ -2256,7 +2252,6 @@
> > >
> > > flow_dv_encap_decap_resource_register
> > > > > > > domain = sh->rx_domain;
> > > > > > > else
> > > > > > > domain = sh->tx_domain;
> > > > > > > -
> > > > > > > /* Lookup a matching resource from cache. */
> > > > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps,
> next)
> > > > > > > {
> > > > > > > if (resource->reformat_type ==
> cache_resource-
> > > > > > > > reformat_type && @@ -3367,21 +3362,27 @@
> > > > > > >
> > > > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > > > *
> > > > > > > * @param dev
> > > > > > > * Pointer to rte_eth_dev structure.
> > > > > > > + * @param flags
> > > > > > > + * Flags bits to check if root level.
> > > > > > > *
> > > > > > > * @return
> > > > > > > * Max number of modify header actions device can
> > > > > > > support.
> > > > > > > */
> > > > > > > static unsigned int
> > > > > > > -flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev)
> > > > > > > +flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev,
> > > > >
> > > > > uint64_t
> > > > > > > flags)
> > > > > > > {
> > > > > > > /*
> > > > > > > * There's no way to directly query the max cap.
> > > > > > > Although it
> > > > >
> > > > > has
> > > > > > > to be
> > > > > > > * acquried by iterative trial, it is a safe assumption
> > > > > > > that more
> > > > > > > * actions are supported by FW if extensive metadata
> > > > > > > register
> > > > >
> > > > > is
> > > > > > > - * supported.
> > > > > > > + * supported. (Only in the root table)
> > > > > > > */
> > > > > > > - return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > > > MLX5_MODIFY_NUM :
> > > > > > > -
> > > > > > > MLX5_MODIFY_NUM_NO_MREG;
> > > > > > > + if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
> > > > > > > + return MLX5_MAX_MODIFY_NUM;
> > > > > > > + else
> > > > > > > + return mlx5_flow_ext_mreg_supported(dev) ?
> > > > > > > +
> > > > > > > MLX5_ROOT_TBL_MODIFY_NUM :
> > > > > > > +
> > > > > > > MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
> > > > > > > }
> > > > > > >
> > > > > > > /**
> > > > > > > @@ -3472,8 +3473,12 @@
> > >
> > > flow_dv_modify_hdr_resource_register
> > > > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > > > *cache_resource;
> > > > > > > struct mlx5dv_dr_domain *ns;
> > > > > > > + uint32_t actions_len;
> > > > > > >
> > > > > > > - if (resource->actions_num >
> > > > > > > flow_dv_modify_hdr_action_max(dev))
> > > > > > > + resource->flags =
> > > > > > > + dev_flow->group ? 0 :
> > > > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > > > + if (resource->actions_num >
> > > > > > > flow_dv_modify_hdr_action_max(dev,
> > > > > > > + resource->flags))
> > > > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > "too many modify
> > > > > > > header
> > > > > > > items"); @@ -3483,17 +3488,15 @@
> > > > > > > flow_dv_modify_hdr_resource_register
> > > > > > > ns = sh->tx_domain;
> > > > > > > else
> > > > > > > ns = sh->rx_domain;
> > > > > > > - resource->flags =
> > > > > > > - dev_flow->group ? 0 :
> > > > > > > MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
> > > > > > > /* Lookup a matching resource from cache. */
> > > > > > > + actions_len = resource->actions_num *
> > >
> > > sizeof(resource-
> > > > > > > > actions[0]);
> > > > > > >
> > > > > > > LIST_FOREACH(cache_resource, &sh->modify_cmds,
> next) {
> > > > > > > if (resource->ft_type == cache_resource-
> > > > > > > > ft_type &&
> > > > > > >
> > > > > > > resource->actions_num == cache_resource-
> > > > > > > > actions_num &&
> > > > > > >
> > > > > > > resource->flags == cache_resource->flags &&
> > > > > > > !memcmp((const void *)resource->actions,
> > > > > > > (const void *)cache_resource-
> > > > > > > > actions,
> > > > > > >
> > > > > > > - (resource->actions_num *
> > > > > > > - sizeof(resource-
> > > > > > > > actions[0])))) {
> > > > > > >
> > > > > > > + actions_len)) {
> > > > > > > DRV_LOG(DEBUG, "modify-header
> > > > > > > resource %p: refcnt %d++",
> > > > > > > (void *)cache_resource,
> > > > > > >
> rte_atomic32_read(&cache_resour
> > > > > > > ce-
> > > > > > > > refcnt));
> > > > > > >
> > > > > > > @@ -3503,18 +3506,18 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > }
> > > > > > > }
> > > > > > > /* Register new modify-header resource. */
> > > > > > > - cache_resource = rte_calloc(__func__, 1,
> > > > > > > sizeof(*cache_resource), 0);
> > > > > > > + cache_resource = rte_calloc(__func__, 1,
> > > > > > > + sizeof(*cache_resource) +
> > > > > > > actions_len, 0);
> > > > > > > if (!cache_resource)
> > > > > > > return rte_flow_error_set(error, ENOMEM,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> > > > > > > "cannot allocate
> > > > > > > resource
> > > > > > > memory");
> > > > > > > *cache_resource = *resource;
> > > > > > > + rte_memcpy(cache_resource->actions, resource-
> > > >
> > > > actions,
> > > > > > > actions_len);
> > > > > > > cache_resource->verbs_action =
> > > > > > > mlx5_glue-
> >dv_create_flow_action_modify_header
> > > > > > > - (sh->ctx,
> > > > > > > cache_resource-
> > > > > > > > ft_type,
> > > > > > >
> > > > > > > - ns, cache_resource-
> > > > > > > > flags,
> > > > > > >
> > > > > > > - cache_resource-
> > > > > > > > actions_num
> > > > > > >
> > > > > > > *
> > > > > > > - sizeof(cache_resource-
> > > > > > > > actions[0]),
> > > > > > >
> > > > > > > + (sh->ctx,
> > > > > > > cache_resource-
> > > > > > > > ft_type, ns,
> > > > > > >
> > > > > > > + cache_resource->flags,
> > > > > > > actions_len,
> > > > > > > (uint64_t
> > > > > > > *)cache_resource-
> > > > > > > > actions);
> > > > > > >
> > > > > > > if (!cache_resource->verbs_action) {
> > > > > > > rte_free(cache_resource);
> > > > > > > @@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev *dev,
> > > > > > > };
> > > > > > > int actions_n = 0;
> > > > > > > bool actions_end = false;
> > > > > > > - struct mlx5_flow_dv_modify_hdr_resource mhdr_res =
> > >
> > > {
> > > > > > > - .ft_type = attr->egress ?
> > > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > > > -
> > > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX
> > > > > > > - };
> > > > > > > + union {
> > > > > > > + struct mlx5_flow_dv_modify_hdr_resource res;
> > > > > > > + uint8_t len[sizeof(struct
> > > > > > > mlx5_flow_dv_modify_hdr_resource) +
> > > > > > > + sizeof(struct
> > > > > > > mlx5_modification_cmd) *
> > > > > > > + (MLX5_MAX_MODIFY_NUM + 1)];
> > > > > > > + } mhdr_dummy;
> > > > > > > + struct mlx5_flow_dv_modify_hdr_resource *mhdr_res
> > >
> > > =
> > > > > > > &mhdr_dummy.res;
> > > > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > > > uint32_t tag_be;
> > > > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > > > @@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev *dev,
> > > > > > > uint32_t table;
> > > > > > > int ret = 0;
> > > > > > >
> > > > > > > + mhdr_res->ft_type = attr->egress ?
> > > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
> > > > > > > +
> > > > > > > MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
> > > > > > > ret = mlx5_flow_group_to_table(attr, dev_flow-
> > > > > > > > external, attr-
> > > > > > > > group,
> > > > > > >
> > > > > > > &table, error);
> > > > > > > if (ret)
> > > > > > > return ret;
> > > > > > > dev_flow->group = table;
> > > > > > > if (attr->transfer)
> > > > > > > - mhdr_res.ft_type =
> > >
> > > MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > > > + mhdr_res->ft_type =
> > >
> > > MLX5DV_FLOW_TABLE_TYPE_FDB;
> > > > > > > if (priority == MLX5_FLOW_PRIO_RSVD)
> > > > > > > priority = dev_conf->flow_prio - 1;
> > > > > > > + /* number of actions must be set to 0 in case of dirty
> > > > > > > stack.
> > > > > > > */
> > > > > > > + mhdr_res->actions_num = 0;
> > > > > > > for (; !actions_end ; actions++) {
> > > > > > > const struct rte_flow_action_queue *queue;
> > > > > > > const struct rte_flow_action_rss *rss; @@
> > > > > > > -6731,7
> > > > > > > +6741,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > > };
> > > > > > >
> > > > > > > if
> > > > > > > (flow_dv_convert_action_mark(dev,
> > > > >
> > > > > &mark,
> > > > > > > -
> > > > > > > &mhdr_res,
> > > > > > > +
> > > > > > > mhdr_res,
> > > > > > >
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6753,7 +6763,7
> @@
> > > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > > actions->conf;
> > > > > > >
> > > > > > > if
> > > > > > > (flow_dv_convert_action_mark(dev,
> > > > >
> > > > > mark,
> > > > > > > -
> > > > > > > &mhdr_res,
> > > > > > > +
> > > > > > > mhdr_res,
> > > > > > >
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_MARK_EXT; @@ -6774,7 +6784,7
> @@
> > > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > > > if (flow_dv_convert_action_set_meta
> > > > > > > - (dev, &mhdr_res, attr,
> > > > > > > + (dev, mhdr_res, attr,
> > > > > > > (const struct
> > > > > > > rte_flow_action_set_meta *)
> > > > > > > actions->conf, error))
> > > > > > > return -rte_errno;
> > > > > > > @@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > > > if (flow_dv_convert_action_set_tag
> > > > > > > - (dev, &mhdr_res,
> > > > > > > + (dev, mhdr_res,
> > > > > > > (const struct
> > > > > > > rte_flow_action_set_tag
> > > > > > > *)
> > > > > > > actions->conf, error))
> > > > > > > return -rte_errno;
> > > > > > > @@ -6882,7 +6892,7 @@ cnt_err:
> > > > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > > > &vlan);
> > > > > > > /* If no VLAN push - this is a modify
> > > > > > > header
> > > > >
> > > > > action */
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > > > - (&mhdr_res,
> > > > > > > actions,
> > > > > > > error))
> > > > > > > + (mhdr_res,
> > > > > > > actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > > > break;
> > > > > > > @@ -6981,7 +6991,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > > > if
> (flow_dv_convert_action_modify_mac
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > > > @@ -6991,7 +7001,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > > > if
> (flow_dv_convert_action_modify_ipv4
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > > > @@ -7001,7 +7011,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > > > if
> (flow_dv_convert_action_modify_ipv6
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > > > @@ -7011,7 +7021,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > > > if (flow_dv_convert_action_modify_tp
> > > > > > > - (&mhdr_res, actions,
> > > > > > > items,
> > > > > > > + (mhdr_res, actions,
> > > > > > > items,
> > > > > > > &flow_attr, error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type == @@
> > > > > > > -7021,13
> > > > >
> > > > > +7031,13 @@
> > > > > > > cnt_err:
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > > > - (&mhdr_res, items,
> > > > > > > &flow_attr,
> > > > > > > error))
> > > > > > > + (mhdr_res, items,
> > > > > > > &flow_attr,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_DEC_TTL;
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TTL:
> > > > > > > if (flow_dv_convert_action_modify_ttl
> > > > > > > - (&mhdr_res, actions,
> > > > > > > items,
> > > > > > > + (mhdr_res, actions,
> > > > > > > items,
> > > > > > > &flow_attr, error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_TTL;
> > > > >
> > > > > @@ -7035,7 +7045,7 @@
> > > > > > > cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > > > @@ -7046,7 +7056,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > > > @@ -7055,13 +7065,13 @@ cnt_err:
> > > > > > > break;
> > > > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > > > if (flow_dv_convert_action_set_reg
> > > > > > > - (&mhdr_res, actions,
> > > > > > > error))
> > > > > > > + (mhdr_res, actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > > break;
> > > > > > > case
> MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
> > > > > > > if (flow_dv_convert_action_copy_mreg
> > > > > > > - (dev, &mhdr_res,
> > > > > > > actions,
> > > > > > > error))
> > > > > > > + (dev, mhdr_res,
> > > > > > > actions,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > > break;
> > > > > > > @@ -7086,10 +7096,10 @@ cnt_err:
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > > > actions_end = true;
> > > > > > > - if (mhdr_res.actions_num) {
> > > > > > > + if (mhdr_res->actions_num) {
> > > > > > > /* create modify action if
> > > > > > > needed. */
> > > > > > > if
> > > > > > > (flow_dv_modify_hdr_resource_register
> > > > > > > - (dev, &mhdr_res,
> > > > > > > dev_flow,
> > > > > > > error))
> > > > > > > + (dev, mhdr_res,
> > > > > > > dev_flow,
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > dev_flow-
> > > > > > > > dv.actions[modify_action_position] =
> > > > > > >
> > > > > > > dev_flow-
> > > > > > > > dv.modify_hdr-
> > > > > > > > verbs_action;
> > > > > > >
> > > > > > > @@ -7098,7 +7108,7 @@ cnt_err:
> > > > > > > default:
> > > > > > > break;
> > > > > > > }
> > > > > > > - if (mhdr_res.actions_num &&
> > > > > > > + if (mhdr_res->actions_num &&
> > > > > > > modify_action_position == UINT32_MAX)
> > > > > > > modify_action_position = actions_n++;
> > > > > > > }
> > > > > > > --
> > > > > > > 2.20.1
> > > > > > >
> > > > > > > ---
> > > > > > > Diff of the applied patch vs upstream commit (please
> > > > > > > double-
> > > > >
> > > > > check
> > > > > > > if
> > > > > > > non-empty:
> > > > > > > ---
> > > > > > > --- - 2020-02-11 11:17:42.994804790 +0000
> > > > > > > +++ 0122-net-mlx5-fix-modify-actions-support-
> > > > > > > limitation.patch
> > > > > > > 2020-
> > > > > > > 02-11 11:17:38.612005311 +0000
> > > > > > > @@ -1,8 +1,10 @@
> > > > > > > -From 024e95759c16c67eee92efffeee34915dc94a9c0 Mon
> Sep
> > >
> > > 17
> > > > > > > 00:00:00 2001
> > > > > > > +From e0de816f945e599a933081c53bb060d5dd4cbf13 Mon
> > >
> > > Sep 17
> > > > > > > 00:00:00 2001
> > > > > > > From: Bing Zhao <
> > > > > > > bingz@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Date: Mon, 20 Jan 2020 11:43:07 +0200
> > > > > > > Subject: [PATCH] net/mlx5: fix modify actions support
> > > > > > > limitation
> > > > > > >
> > > > > > > +[ upstream commit
> > >
> > > 024e95759c16c67eee92efffeee34915dc94a9c0 ]
> > > > > > > +
> > > > > > > In the root table, there is some limitation of total
> > > > > > > number of
> > > > > > > header modify actions, 16 or 8 for each. But in other
> > > > > > > tables,
> > > > > > > there
> > > > > > > is no such strict limitation. In an IPv6 case, the IP
> > > > > > > fields
> > > > > > > modifying @@
> > > > > > > -16,21
> > > > > > > +18,20 @@ maximal supported value.
> > > > > > >
> > > > > > > Fixes: 0e9d00027686 ("net/mlx5: check maximum modify
> > >
> > > actions
> > > > > > > number")
> > > > > > > -Cc:
> > > > > > > stable@dpdk.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Signed-off-by: Bing Zhao <
> > > > > > > bingz@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Acked-by: Ori Kam <
> > > > > > > orika@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Acked-by: Viacheslav Ovsiienko <
> > > > > > > viacheslavo@mellanox.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---
> > > > > > > drivers/net/mlx5/mlx5_flow.h | 15 +++--
> > > > > > > - drivers/net/mlx5/mlx5_flow_dv.c | 108
> +++++++++++++++++--
> > >
> > > --
> > > > > > > ---
> > > > >
> > > > > -
> > > > > > > ----
> > > > > > > ---
> > > > > > > - 2 files changed, 68 insertions(+), 55 deletions(-)
> > > > > > > + drivers/net/mlx5/mlx5_flow_dv.c | 104
> +++++++++++++++++--
> > >
> > > ----
> > > > > --
> > > > > > > ---
> > > > > > > ----
> > > > > > > + 2 files changed, 66 insertions(+), 53 deletions(-)
> > > > > > >
> > > > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h
> > > > > > > b/drivers/net/mlx5/mlx5_flow.h -index
> > >
> > > a1c7b67488..9832542328
> > > > > > > 100644
> > > > > > > +index db12715ecc..13bed08d75 100644
> > > > > > > --- a/drivers/net/mlx5/mlx5_flow.h
> > > > > > > +++ b/drivers/net/mlx5/mlx5_flow.h
> > > > > > > -@@ -392,11 +392,14 @@ struct
> mlx5_flow_dv_tag_resource {
> > > > > > > +@@ -391,11 +391,14 @@ struct
> mlx5_flow_dv_tag_resource {
> > > > > > >
> > > > > > > /*
> > > > > > > * Number of modification commands.
> > > > > > > @@ -49,7 +50,7 @@
> > > > > > >
> > > > > > > /* Modify resource structure */
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource { -@@ -407,9
> > >
> > > +410,9
> > > > > @@
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource {
> > > > > > > +@@ -406,9 +409,9 @@ struct
> > > > >
> > > > > mlx5_flow_dv_modify_hdr_resource {
> > > > > > > /**< Verbs modify header action object. */
> > > > > > > uint8_t ft_type; /**< Flow table type, Rx or Tx. */
> > > > > > > uint32_t actions_num; /**< Number of modification
> > > > > > > actions.
> > > > > > > */ @@ -62,10 +63,10 @@
> > > > > > >
> > > > > > > /* Jump action resource structure. */ diff --git
> > > > > > > a/drivers/net/mlx5/mlx5_flow_dv.c
> > > > >
> > > > > b/drivers/net/mlx5/mlx5_flow_dv.c
> > > > > > > -index 26dbaaf329..5a1b42698c
> > > > > > > 100644
> > > > > > > +index 8f77909419..74d1a68e4a 100644
> > > > > > > --- a/drivers/net/mlx5/mlx5_flow_dv.c +++
> > > > > > > b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -366,7 +366,7
> @@
> > > > > > > flow_dv_convert_modify_action(struct
> > > > > > > rte_flow_item *item,
> > > > > > > +@@ -363,7 +363,7 @@
> flow_dv_convert_modify_action(struct
> > > > > > > rte_flow_item
> > > > > > > +*item,
> > > > > > > uint32_t mask;
> > > > > > > uint32_t data;
> > > > > > >
> > > > > > > @@ -74,7 +75,7 @@
> > > > > > > return rte_flow_error_set(error,
> > > > > > > EINVAL,
> > > > > > >
> > >
> > > RTE_FLOW_ERROR_TYPE_ACTION,
> > > > > > > NULL,
> > > > > > > "too many items to modify");
> > > > > > > -@@ -407,11 +407,11 @@
> > >
> > > flow_dv_convert_modify_action(struct
> > > > > > > rte_flow_item *item,
> > > > > > > +@@ -404,11 +404,11 @@
> > >
> > > flow_dv_convert_modify_action(struct
> > > > > > > +rte_flow_item *item,
> > > > > > > ++i;
> > > > > > > ++field;
> > > > > > > } while (field->size);
> > > > > > > @@ -88,7 +89,7 @@
> > > > > > > return 0;
> > > > > > > }
> > > > > > >
> > > > > > > -@@ -572,7 +572,7 @@
> > >
> > > flow_dv_convert_action_modify_vlan_vid
> > > > > > > +@@ -569,7 +569,7 @@
> > >
> > > flow_dv_convert_action_modify_vlan_vid
> > > > > > > struct mlx5_modification_cmd *actions = &resource-
> > > > > > > > actions[i];
> > > > > > >
> > > > > > > struct field_modify_info *field =
> > > > > > > modify_vlan_out_first_vid;
> > > > > > >
> > > > > > > @@ -97,7 +98,7 @@
> > > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION,
> > >
> > > NULL,
> > > > > > > "too many items to modify");
> > > > > > > -@@ -905,7 +905,7 @@ flow_dv_convert_action_set_reg
> > > > > > > +@@ -902,7 +902,7 @@ flow_dv_convert_action_set_reg
> > > > > > > struct mlx5_modification_cmd *actions = resource-
> > > > > > > > actions;
> > > > > > >
> > > > > > > uint32_t i = resource->actions_num;
> > > > > > >
> > > > > > > @@ -106,7 +107,7 @@
> > > > > > > return rte_flow_error_set(error, EINVAL,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > "too many items to
> > > > > > > modify"); -
> > > > >
> > > > > @@ -917,10 +917,6 @@
> > > > > > > flow_dv_convert_action_set_reg
> > > > > > > +@@ -914,10 +914,6 @@ flow_dv_convert_action_set_reg
> > > > > > > actions[i].data1 = rte_cpu_to_be_32(conf->data);
> > > > > > > ++i;
> > > > > > > resource->actions_num = i;
> > > > > > > @@ -117,7 +118,7 @@
> > > > > > > return 0;
> > > > > > > }
> > > > > > >
> > > > > > > -@@ -2385,7 +2381,6 @@
> > > > >
> > > > > flow_dv_encap_decap_resource_register
> > > > > > > +@@ -2256,7 +2252,6 @@
> > > > >
> > > > > flow_dv_encap_decap_resource_register
> > > > > > > domain = sh->rx_domain;
> > > > > > > else
> > > > > > > domain = sh->tx_domain;
> > > > > > > @@ -125,7 +126,7 @@
> > > > > > > /* Lookup a matching resource from cache. */
> > > > > > > LIST_FOREACH(cache_resource, &sh->encaps_decaps,
> > >
> > > next)
> > > > > > > {
> > > > > > > if (resource->reformat_type ==
> > >
> > > cache_resource-
> > > > > > > > reformat_type && -@@ -3496,21 +3491,27 @@
> > > > > > >
> > > > > > > flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
> > > > > > > +@@ -3367,21 +3362,27 @@
> > > > >
> > > > > flow_dv_validate_action_port_id(struct
> > > > > > > +rte_eth_dev *dev,
> > > > > > > *
> > > > > > > * @param dev
> > > > > > > * Pointer to rte_eth_dev structure.
> > > > > > > @@ -157,7 +158,7 @@
> > > > > > > }
> > > > > > >
> > > > > > > /**
> > > > > > > -@@ -3669,8 +3670,12 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > +@@ -3472,8 +3473,12 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > struct mlx5_ibv_shared *sh = priv->sh;
> > > > > > > struct mlx5_flow_dv_modify_hdr_resource
> > > > > > > *cache_resource;
> > > > > > > struct mlx5dv_dr_domain *ns;
> > > > > > > @@ -171,7 +172,7 @@
> > > > > > > return rte_flow_error_set(error, EOVERFLOW,
> > > > > > >
> > > > > > > RTE_FLOW_ERROR_TYPE_ACTION, NULL,
> > > > > > > "too many modify
> > > > > > > header
> > > > > > > items"); -@@ -3680,17 +3685,15 @@
> > > > > > > flow_dv_modify_hdr_resource_register
> > > > > > > +@@ -3483,17 +3488,15 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > ns = sh->tx_domain;
> > > > > > > else
> > > > > > > ns = sh->rx_domain;
> > > > > > > @@ -191,7 +192,7 @@
> > > > > > > DRV_LOG(DEBUG, "modify-header
> > > > > > > resource %p: refcnt %d++",
> > > > > > > (void *)cache_resource,
> > > > > > >
> > >
> > > rte_atomic32_read(&cache_resour
> > > > > > > ce-
> > > > > > > > refcnt));
> > > > > > >
> > > > > > > -@@ -3700,18 +3703,18 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > +@@ -3503,18 +3506,18 @@
> > > > >
> > > > > flow_dv_modify_hdr_resource_register
> > > > > > > }
> > > > > > > }
> > > > > > > /* Register new modify-header resource. */ @@ -
> > >
> > > 215,7
> > > > > > > +216,7
> > > > >
> > > > > @@
> > > > > > > (uint64_t
> > > > > > > *)cache_resource-
> > > > > > > > actions);
> > > > > > >
> > > > > > > if (!cache_resource->verbs_action) {
> > > > > > > rte_free(cache_resource);
> > > > > > > -@@ -7020,10 +7023,13 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > +@@ -6670,10 +6673,13 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > };
> > > > > > > int actions_n = 0;
> > > > > > > bool actions_end = false;
> > > > > > > @@ -233,7 +234,7 @@
> > > > > > > union flow_dv_attr flow_attr = { .attr = 0 };
> > > > > > > uint32_t tag_be;
> > > > > > > union mlx5_flow_tbl_key tbl_key;
> > > > > > > -@@ -7035,15 +7041,19 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > +@@ -6685,15 +6691,19 @@ __flow_dv_translate(struct
> > > > >
> > > > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > uint32_t table;
> > > > > > > int ret = 0;
> > > > > > >
> > > > > > > @@ -254,7 +255,7 @@
> > > > > > > for (; !actions_end ; actions++) {
> > > > > > > const struct rte_flow_action_queue *queue;
> > > > > > > const struct rte_flow_action_rss *rss; -@@
> > > > > > > -7081,7
> > > > > > > +7091,7 @@ __flow_dv_translate(struct rte_eth_dev *dev,
> @@
> > >
> > > -
> > > > > 6731,7
> > > > > > > ++6741,7 @@ __flow_dv_translate(struct rte_eth_dev
> > > > > > > *dev,
> > > > > > > };
> > > > > > >
> > > > > > > if
> > > > > > > (flow_dv_convert_action_mark(dev,
> > > > >
> > > > > &mark, @@ -263,7 +264,7
> > > > > > > @@
> > > > > > >
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7103,7 +7113,7
> @@
> > > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > > +@@ -6753,7 +6763,7 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > actions->conf;
> > > > > > >
> > > > > > > if
> > > > > > > (flow_dv_convert_action_mark(dev,
> > > > >
> > > > > mark, @@ -272,7 +273,7 @@
> > > > > > > error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_MARK_EXT; -@@ -7124,7 +7134,7
> @@
> > > > > > > __flow_dv_translate(struct rte_eth_dev *dev,
> > > > > > > +@@ -6774,7 +6784,7 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_META:
> > > > > > > if (flow_dv_convert_action_set_meta
> > >
> > > @@
> > > > > > > -
> > > > > > > 281,7 +282,7 @@
> > > > > > > (const struct
> > > > > > > rte_flow_action_set_meta *)
> > > > > > > actions->conf, error))
> > > > > > > return -rte_errno;
> > > > > > > -@@ -7132,7 +7142,7 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > *dev,
> > > > > > > +@@ -6782,7 +6792,7 @@ __flow_dv_translate(struct
> > >
> > > rte_eth_dev
> > > > > > > *dev,
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TAG:
> > > > > > > if (flow_dv_convert_action_set_tag
> > >
> > > @@
> > > > > > > -290,7
> > > > >
> > > > > +291,7 @@
> > > > > > > (const struct
> > > > > > > rte_flow_action_set_tag
> > > > > > > *)
> > > > > > > actions->conf, error))
> > > > > > > return -rte_errno;
> > > > > > > -@@ -7232,7 +7242,7 @@ cnt_err:
> > > > > > > +@@ -6882,7 +6892,7 @@ cnt_err:
> > > > > > > mlx5_update_vlan_vid_pcp(actions,
> > > > > > > &vlan);
> > > > > > > /* If no VLAN push - this is a modify
> > > > > > > header
> > > > >
> > > > > action */
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_vlan_vid
> > > > > > > @@ -299,7 +300,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
> > > > > > > break;
> > > > > > > -@@ -7331,7 +7341,7 @@ cnt_err:
> > > > > > > +@@ -6981,7 +6991,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_MAC_DST:
> > > > > > > if
> > >
> > > (flow_dv_convert_action_modify_mac
> > > > > > > @@ -308,7 +309,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
> > > > > > > -@@ -7341,7 +7351,7 @@ cnt_err:
> > > > > > > +@@ -6991,7 +7001,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> > > > > > > if
> > >
> > > (flow_dv_convert_action_modify_ipv4
> > > > > > > @@ -317,7 +318,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
> > > > > > > -@@ -7351,7 +7361,7 @@ cnt_err:
> > > > > > > +@@ -7001,7 +7011,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> > > > > > > if
> > >
> > > (flow_dv_convert_action_modify_ipv6
> > > > > > > @@ -326,7 +327,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
> > > > > > > -@@ -7361,7 +7371,7 @@ cnt_err:
> > > > > > > +@@ -7011,7 +7021,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> > > > > > > case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
> > > > > > > if (flow_dv_convert_action_modify_tp
> > >
> > > @@
> > > > > > > -
> > > > > > > 335,7 +336,7 @@
> > > > > > > &flow_attr, error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type == -@@
> > > > > > > -7371,13
> > > > >
> > > > > +7381,13 @@
> > > > > > > cnt_err:
> > > > > > > +@@ -7021,13 +7031,13 @@ cnt_err:
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TTL:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_dec_ttl
> > > > > > > @@ -351,7 +352,7 @@
> > > > > > > &flow_attr, error))
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_TTL;
> > > > >
> > > > > -@@ -7385,7 +7395,7
> > > > > > > @@ cnt_err:
> > > > > > > +@@ -7035,7 +7045,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ:
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_tcp_seq
> > > > > > > @@ -360,7 +361,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
> > > > > > > -@@ -7396,7 +7406,7 @@ cnt_err:
> > > > > > > +@@ -7046,7 +7056,7 @@ cnt_err:
> > > > > > > case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
> > > > > > > case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
> > > > > > > if
> > > > > > > (flow_dv_convert_action_modify_tcp_ack
> > > > > > > @@ -369,7 +370,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |= actions->type ==
> > > > > > >
> > > > > > > RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
> > > > > > > -@@ -7405,13 +7415,13 @@ cnt_err:
> > > > > > > +@@ -7055,13 +7065,13 @@ cnt_err:
> > > > > > > break;
> > > > > > > case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
> > > > > > > if (flow_dv_convert_action_set_reg
> > >
> > > @@ -
> > > > > 385,22 +386,7 @@
> > > > > > > return -rte_errno;
> > > > > > > action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_TAG;
> > > > > > > break;
> > > > > > > -@@ -7435,23 +7445,23 @@ cnt_err:
> > > > > > > - action_flags |=
> > >
> > > MLX5_FLOW_ACTION_METER;
> > > > > > > - break;
> > > > > > > - case
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
> > > > > > > -- if
> > > > > > > (flow_dv_convert_action_modify_ipv4_dscp(&mhdr_res,
> > > > > > > -+ if
> > > > > > > (flow_dv_convert_action_modify_ipv4_dscp(mhdr_res,
> > > > > > > - a
> > > > > > > ctions,
> > > > > > > error))
> > > > > > > - return -rte_errno;
> > > > > > > - action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_IPV4_DSCP;
> > > > > > > - break;
> > > > > > > - case
> > >
> > > RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
> > > > > > > -- if
> > > > > > > (flow_dv_convert_action_modify_ipv6_dscp(&mhdr_res,
> > > > > > > -+ if
> > > > > > > (flow_dv_convert_action_modify_ipv6_dscp(mhdr_res,
> > > > > > > - a
> > > > > > > ctions,
> > > > > > > error))
> > > > > > > - return -rte_errno;
> > > > > > > - action_flags |=
> > > > > > > MLX5_FLOW_ACTION_SET_IPV6_DSCP;
> > > > > > > +@@ -7086,10 +7096,10 @@ cnt_err:
> > > > > > > break;
> > > > > > > case RTE_FLOW_ACTION_TYPE_END:
> > > > > > > actions_end = true;
> > > > > > > @@ -413,7 +399,7 @@
> > > > > > > return -rte_errno;
> > > > > > > dev_flow-
> > > > > > > > dv.actions[modify_action_position] =
> > > > > > >
> > > > > > > dev_flow-
> > > > > > > > dv.modify_hdr-
> > > > > > > > verbs_action;
> > > > > > >
> > > > > > > -@@ -7460,7 +7470,7 @@ cnt_err:
> > > > > > > +@@ -7098,7 +7108,7 @@ cnt_err:
> > > > > > > default:
> > > > > > > break;
> > > > > > > }
> > > > >
> > > > > --
> > > > > Kind regards,
> > > > > Luca Boccassi
> > > >
> > > >
> > >
> > > --
> > > Kind regards,
> > > Luca Boccassi
> >
> >
> --
> Kind regards,
> Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'acl: fix 32-bit match for range field' has been queued to stable release 19.11.1
2020-02-11 11:22 ` [dpdk-stable] patch 'fib: fix possible integer overflow' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " luca.boccassi
` (52 more replies)
0 siblings, 53 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Ido Goshen, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e0cdc3a98194320ad576a0b6516158ab3275ebdd Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 12 Feb 2020 13:47:44 +0000
Subject: [PATCH] acl: fix 32-bit match for range field
[ upstream commit dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd ]
ACL build phase for range fields that are bigger then
16 bits might generate wrong trie.
For more details please refer to:
https://bugs.dpdk.org/show_bug.cgi?id=307
Bugzilla ID: 307
Fixes: dc276b5780c2 ("acl: new library")
Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/librte_acl/acl_bld.c | 148 ++++++++++++++++++++++++++++-----------
1 file changed, 106 insertions(+), 42 deletions(-)
diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c
index b06bbe9207..d1f920b09c 100644
--- a/lib/librte_acl/acl_bld.c
+++ b/lib/librte_acl/acl_bld.c
@@ -778,9 +778,8 @@ acl_build_reset(struct rte_acl_ctx *ctx)
}
static void
-acl_gen_range(struct acl_build_context *context,
- const uint8_t *hi, const uint8_t *lo, int size, int level,
- struct rte_acl_node *root, struct rte_acl_node *end)
+acl_gen_full_range(struct acl_build_context *context, struct rte_acl_node *root,
+ struct rte_acl_node *end, int size, int level)
{
struct rte_acl_node *node, *prev;
uint32_t n;
@@ -788,10 +787,71 @@ acl_gen_range(struct acl_build_context *context,
prev = root;
for (n = size - 1; n > 0; n--) {
node = acl_alloc_node(context, level++);
- acl_add_ptr_range(context, prev, node, lo[n], hi[n]);
+ acl_add_ptr_range(context, prev, node, 0, UINT8_MAX);
prev = node;
}
- acl_add_ptr_range(context, prev, end, lo[0], hi[0]);
+ acl_add_ptr_range(context, prev, end, 0, UINT8_MAX);
+}
+
+static void
+acl_gen_range_mdl(struct acl_build_context *context, struct rte_acl_node *root,
+ struct rte_acl_node *end, uint8_t lo, uint8_t hi, int size, int level)
+{
+ struct rte_acl_node *node;
+
+ node = acl_alloc_node(context, level++);
+ acl_add_ptr_range(context, root, node, lo, hi);
+ acl_gen_full_range(context, node, end, size - 1, level);
+}
+
+static void
+acl_gen_range_low(struct acl_build_context *context, struct rte_acl_node *root,
+ struct rte_acl_node *end, const uint8_t *lo, int size, int level)
+{
+ struct rte_acl_node *node;
+ uint32_t n;
+
+ n = size - 1;
+ if (n == 0) {
+ acl_add_ptr_range(context, root, end, lo[0], UINT8_MAX);
+ return;
+ }
+
+ node = acl_alloc_node(context, level++);
+ acl_add_ptr_range(context, root, node, lo[n], lo[n]);
+
+ /* generate lower-bound sub-trie */
+ acl_gen_range_low(context, node, end, lo, n, level);
+
+ /* generate middle sub-trie */
+ if (n > 1 && lo[n - 1] != UINT8_MAX)
+ acl_gen_range_mdl(context, node, end, lo[n - 1] + 1, UINT8_MAX,
+ n, level);
+}
+
+static void
+acl_gen_range_high(struct acl_build_context *context, struct rte_acl_node *root,
+ struct rte_acl_node *end, const uint8_t *hi, int size, int level)
+{
+ struct rte_acl_node *node;
+ uint32_t n;
+
+ n = size - 1;
+ if (n == 0) {
+ acl_add_ptr_range(context, root, end, 0, hi[0]);
+ return;
+ }
+
+ node = acl_alloc_node(context, level++);
+ acl_add_ptr_range(context, root, node, hi[n], hi[n]);
+
+ /* generate upper-bound sub-trie */
+ acl_gen_range_high(context, node, end, hi, n, level);
+
+ /* generate middle sub-trie */
+ if (n > 1 && hi[n - 1] != 0)
+ acl_gen_range_mdl(context, node, end, 0, hi[n - 1] - 1,
+ n, level);
}
static struct rte_acl_node *
@@ -799,52 +859,56 @@ acl_gen_range_trie(struct acl_build_context *context,
const void *min, const void *max,
int size, int level, struct rte_acl_node **pend)
{
- int32_t n;
- struct rte_acl_node *root;
- const uint8_t *lo = min;
- const uint8_t *hi = max;
+ int32_t k, n;
+ uint8_t hi_ff, lo_00;
+ struct rte_acl_node *node, *prev, *root;
+ const uint8_t *lo;
+ const uint8_t *hi;
- *pend = acl_alloc_node(context, level+size);
+ lo = min;
+ hi = max;
+
+ *pend = acl_alloc_node(context, level + size);
root = acl_alloc_node(context, level++);
+ prev = root;
- if (lo[size - 1] == hi[size - 1]) {
- acl_gen_range(context, hi, lo, size, level, root, *pend);
- } else {
- uint8_t limit_lo[64];
- uint8_t limit_hi[64];
- uint8_t hi_ff = UINT8_MAX;
- uint8_t lo_00 = 0;
+ /* build common sub-trie till possible */
+ for (n = size - 1; n > 0 && lo[n] == hi[n]; n--) {
+ node = acl_alloc_node(context, level++);
+ acl_add_ptr_range(context, prev, node, lo[n], hi[n]);
+ prev = node;
+ }
- memset(limit_lo, 0, RTE_DIM(limit_lo));
- memset(limit_hi, UINT8_MAX, RTE_DIM(limit_hi));
+ /* no branch needed, just one sub-trie */
+ if (n == 0) {
+ acl_add_ptr_range(context, prev, *pend, lo[0], hi[0]);
+ return root;
+ }
- for (n = size - 2; n >= 0; n--) {
- hi_ff = (uint8_t)(hi_ff & hi[n]);
- lo_00 = (uint8_t)(lo_00 | lo[n]);
- }
+ /* gather information about divirgent paths */
+ lo_00 = 0;
+ hi_ff = UINT8_MAX;
+ for (k = n - 1; k >= 0; k--) {
+ hi_ff &= hi[k];
+ lo_00 |= lo[k];
+ }
- if (hi_ff != UINT8_MAX) {
- limit_lo[size - 1] = hi[size - 1];
- acl_gen_range(context, hi, limit_lo, size, level,
- root, *pend);
- }
+ /* generate left (lower-bound) sub-trie */
+ if (lo_00 != 0)
+ acl_gen_range_low(context, prev, *pend, lo, n + 1, level);
- if (lo_00 != 0) {
- limit_hi[size - 1] = lo[size - 1];
- acl_gen_range(context, limit_hi, lo, size, level,
- root, *pend);
- }
+ /* generate right (upper-bound) sub-trie */
+ if (hi_ff != UINT8_MAX)
+ acl_gen_range_high(context, prev, *pend, hi, n + 1, level);
- if (hi[size - 1] - lo[size - 1] > 1 ||
- lo_00 == 0 ||
- hi_ff == UINT8_MAX) {
- limit_lo[size-1] = (uint8_t)(lo[size-1] + (lo_00 != 0));
- limit_hi[size-1] = (uint8_t)(hi[size-1] -
- (hi_ff != UINT8_MAX));
- acl_gen_range(context, limit_hi, limit_lo, size,
- level, root, *pend);
- }
+ /* generate sub-trie in the middle */
+ if (lo[n] + 1 != hi[n] || lo_00 == 0 || hi_ff == UINT8_MAX) {
+ lo_00 = lo[n] + (lo_00 != 0);
+ hi_ff = hi[n] - (hi_ff != UINT8_MAX);
+ acl_gen_range_mdl(context, prev, *pend, lo_00, hi_ff,
+ n + 1, level);
}
+
return root;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.406309624 +0000
+++ 0001-acl-fix-32-bit-match-for-range-field.patch 2020-02-17 17:00:15.259949775 +0000
@@ -1,8 +1,10 @@
-From dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd Mon Sep 17 00:00:00 2001
+From e0cdc3a98194320ad576a0b6516158ab3275ebdd Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 12 Feb 2020 13:47:44 +0000
Subject: [PATCH] acl: fix 32-bit match for range field
+[ upstream commit dbed2c9ef8d3e0c99d026c5bd401c9e2c3d0bdcd ]
+
ACL build phase for range fields that are bigger then
16 bits might generate wrong trie.
For more details please refer to:
@@ -10,7 +12,6 @@
Bugzilla ID: 307
Fixes: dc276b5780c2 ("acl: new library")
-Cc: stable@dpdk.org
Reported-by: Ido Goshen <ido@cgstowernetworks.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: " luca.boccassi
` (51 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Gargi Sau; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ae4b345b73efc36b7f587104a7b5c09bbe395cc4 Mon Sep 17 00:00:00 2001
From: Gargi Sau <gargi.sau@intel.com>
Date: Mon, 9 Dec 2019 06:37:56 +0000
Subject: [PATCH] examples/ethtool: fix unchecked return value
[ upstream commit 899f6de24bb6504d56369aef5f55bb370d58784d ]
This checks the return value from the function
rte_eth_dev_set_vlan_offload.
Coverity issue: 350358
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Gargi Sau <gargi.sau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/ethtool/lib/rte_ethtool.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index 667d7eaf27..db8150efd5 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -402,7 +402,9 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
}
/* Enable Rx vlan filter, VF unspport status is discard */
- rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+ ret = rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+ if (ret != 0)
+ return ret;
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.430059538 +0000
+++ 0002-examples-ethtool-fix-unchecked-return-value.patch 2020-02-17 17:00:15.263949832 +0000
@@ -1,14 +1,15 @@
-From 899f6de24bb6504d56369aef5f55bb370d58784d Mon Sep 17 00:00:00 2001
+From ae4b345b73efc36b7f587104a7b5c09bbe395cc4 Mon Sep 17 00:00:00 2001
From: Gargi Sau <gargi.sau@intel.com>
Date: Mon, 9 Dec 2019 06:37:56 +0000
Subject: [PATCH] examples/ethtool: fix unchecked return value
+[ upstream commit 899f6de24bb6504d56369aef5f55bb370d58784d ]
+
This checks the return value from the function
rte_eth_dev_set_vlan_offload.
Coverity issue: 350358
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
-Cc: stable@dpdk.org
Signed-off-by: Gargi Sau <gargi.sau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ioat: fix unchecked return value' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix failure check for ioat dequeue' " luca.boccassi
` (50 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Praveen Shetty; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 727dfdf6df993015225cce1be5e66019ee8db288 Mon Sep 17 00:00:00 2001
From: Praveen Shetty <praveen.shetty@intel.com>
Date: Thu, 28 Nov 2019 11:27:14 +0000
Subject: [PATCH] examples/ioat: fix unchecked return value
[ upstream commit 4c2af82e542c51175781aebf8f1a9ccfef823a11 ]
patch checks the return value of function rte_eth_dev_info_get,
if return value is negative error message printed on the console.
Coverity issue: 350361
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/ioat/ioatfwd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index e9117718fe..b39a098ec0 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -824,7 +824,11 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
/* Init port */
printf("Initializing port %u... ", portid);
fflush(stdout);
- rte_eth_dev_info_get(portid, &dev_info);
+ ret = rte_eth_dev_info_get(portid, &dev_info);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE, "Cannot get device info: %s, port=%u\n",
+ rte_strerror(-ret), portid);
+
local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
dev_info.flow_type_rss_offloads;
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.454061289 +0000
+++ 0003-examples-ioat-fix-unchecked-return-value.patch 2020-02-17 17:00:15.263949832 +0000
@@ -1,14 +1,15 @@
-From 4c2af82e542c51175781aebf8f1a9ccfef823a11 Mon Sep 17 00:00:00 2001
+From 727dfdf6df993015225cce1be5e66019ee8db288 Mon Sep 17 00:00:00 2001
From: Praveen Shetty <praveen.shetty@intel.com>
Date: Thu, 28 Nov 2019 11:27:14 +0000
Subject: [PATCH] examples/ioat: fix unchecked return value
+[ upstream commit 4c2af82e542c51175781aebf8f1a9ccfef823a11 ]
+
patch checks the return value of function rte_eth_dev_info_get,
if return value is negative error message printed on the console.
Coverity issue: 350361
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
-Cc: stable@dpdk.org
Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ioat: fix failure check for ioat dequeue' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix invalid link status check' " luca.boccassi
` (49 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Ciara Power; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b406a83fb4fa4e8223530226e39365094f515508 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 4 Feb 2020 16:00:06 +0000
Subject: [PATCH] examples/ioat: fix failure check for ioat dequeue
[ upstream commit 579fb0b2c33a0946f37d120c4e3837a0a3817a7d ]
The nb_dq return value from the ioat dequeue is negative in failure
cases, however the variable was an unsigned int, causing the condition
where nb_dq <= 0 to never be true. This is now cast to a signed int,
which will successfully reflect the -1 value to be used in this
conditional check.
Coverity issue: 350342
Coverity issue: 350349
Fixes: 92c981637ffc ("examples/ioat: handle failure case for ioat dequeue")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/ioat/ioatfwd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index b39a098ec0..8a6076828d 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -460,7 +460,7 @@ ioat_tx_port(struct rxtx_port_config *tx_config)
MAX_PKT_BURST, NULL);
}
- if (nb_dq <= 0)
+ if ((int32_t) nb_dq <= 0)
return;
if (copy_mode == COPY_MODE_IOAT_NUM)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.478858510 +0000
+++ 0004-examples-ioat-fix-failure-check-for-ioat-dequeue.patch 2020-02-17 17:00:15.267949888 +0000
@@ -1,8 +1,10 @@
-From 579fb0b2c33a0946f37d120c4e3837a0a3817a7d Mon Sep 17 00:00:00 2001
+From b406a83fb4fa4e8223530226e39365094f515508 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 4 Feb 2020 16:00:06 +0000
Subject: [PATCH] examples/ioat: fix failure check for ioat dequeue
+[ upstream commit 579fb0b2c33a0946f37d120c4e3837a0a3817a7d ]
+
The nb_dq return value from the ioat dequeue is negative in failure
cases, however the variable was an unsigned int, causing the condition
where nb_dq <= 0 to never be true. This is now cast to a signed int,
@@ -12,7 +14,6 @@
Coverity issue: 350342
Coverity issue: 350349
Fixes: 92c981637ffc ("examples/ioat: handle failure case for ioat dequeue")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ioat: fix invalid link status check' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (2 preceding siblings ...)
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix failure check for ioat dequeue' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/power: fix ack for enable/disable turbo' " luca.boccassi
` (48 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Ciara Power; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 87eb3209962373df52201e3805f68c5a886b57f4 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 7 Feb 2020 10:24:02 +0000
Subject: [PATCH] examples/ioat: fix invalid link status check
[ upstream commit 2582bb980d287b05f378e5a4a467f217a5d63926 ]
The return value of the get link function call was not checked, and
could return a negative value indicating a failure. This meant the
link_status of the link being checked is invalid, because the link was
not filled with data. The return value is now checked, and if the return
value is not 0 for success, the loop continues with the next port.
To avoid confusion between variable names, the existing retval variable
is renamed to link_status, to better represent its use.
Coverity issue: 350348
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/ioat/ioatfwd.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 8a6076828d..7255ff3c9e 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -697,7 +697,7 @@ check_link_status(uint32_t port_mask)
{
uint16_t portid;
struct rte_eth_link link;
- int retval = 0;
+ int ret, link_status = 0;
printf("\nChecking link status\n");
RTE_ETH_FOREACH_DEV(portid) {
@@ -705,7 +705,12 @@ check_link_status(uint32_t port_mask)
continue;
memset(&link, 0, sizeof(link));
- rte_eth_link_get(portid, &link);
+ ret = rte_eth_link_get(portid, &link);
+ if (ret < 0) {
+ printf("Port %u link get failed: err=%d\n",
+ portid, ret);
+ continue;
+ }
/* Print link status */
if (link.link_status) {
@@ -714,11 +719,11 @@ check_link_status(uint32_t port_mask)
portid, link.link_speed,
(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
("full-duplex") : ("half-duplex\n"));
- retval = 1;
+ link_status = 1;
} else
printf("Port %d Link Down\n", portid);
}
- return retval;
+ return link_status;
}
static void
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.503431407 +0000
+++ 0005-examples-ioat-fix-invalid-link-status-check.patch 2020-02-17 17:00:15.267949888 +0000
@@ -1,8 +1,10 @@
-From 2582bb980d287b05f378e5a4a467f217a5d63926 Mon Sep 17 00:00:00 2001
+From 87eb3209962373df52201e3805f68c5a886b57f4 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 7 Feb 2020 10:24:02 +0000
Subject: [PATCH] examples/ioat: fix invalid link status check
+[ upstream commit 2582bb980d287b05f378e5a4a467f217a5d63926 ]
+
The return value of the get link function call was not checked, and
could return a negative value indicating a failure. This meant the
link_status of the link being checked is invalid, because the link was
@@ -14,7 +16,6 @@
Coverity issue: 350348
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/power: fix ack for enable/disable turbo' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (3 preceding siblings ...)
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix invalid link status check' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " luca.boccassi
` (47 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: David Hunt; +Cc: Lei Yao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 40aaf22e968754c863e9a129fa77578364b16906 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Tue, 11 Feb 2020 10:50:08 +0000
Subject: [PATCH] examples/power: fix ack for enable/disable turbo
[ upstream commit 1e3ec03d8ac118eaf5ef76036c0a24c598589add ]
When a VM sends a command through virtio-serial to enable/disable
turbo, it is successfully enabled or disabled, yet the response to the
VM is NACK. This is because all the library frequency change APIs return
1 for success (change in frequency), 0 for success (no change in
frequency) and -1 for failure. However the turbo enable/disable APIs just
return 0 for success and -1 for failure.
Fix the handling of the return code to treat ">= 0" as success, and
send an ACK. Only send NACK when < 0 (failure).
Fixes: 0de94bcac7fc ("examples/vm_power: send confirmation cmd to guest")
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
---
examples/vm_power_manager/channel_monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 090c2a98b0..1d00a6cf6c 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -868,7 +868,7 @@ process_request(struct channel_packet *pkt, struct channel_info *chan_info)
if (valid_unit) {
ret = send_ack_for_received_cmd(pkt,
chan_info,
- scale_res > 0 ?
+ scale_res >= 0 ?
CPU_POWER_CMD_ACK :
CPU_POWER_CMD_NACK);
if (ret < 0)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.527336179 +0000
+++ 0006-examples-power-fix-ack-for-enable-disable-turbo.patch 2020-02-17 17:00:15.271949945 +0000
@@ -1,8 +1,10 @@
-From 1e3ec03d8ac118eaf5ef76036c0a24c598589add Mon Sep 17 00:00:00 2001
+From 40aaf22e968754c863e9a129fa77578364b16906 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Tue, 11 Feb 2020 10:50:08 +0000
Subject: [PATCH] examples/power: fix ack for enable/disable turbo
+[ upstream commit 1e3ec03d8ac118eaf5ef76036c0a24c598589add ]
+
When a VM sends a command through virtio-serial to enable/disable
turbo, it is successfully enabled or disabled, yet the response to the
VM is NACK. This is because all the library frequency change APIs return
@@ -14,7 +16,6 @@
send an ACK. Only send NACK when < 0 (failure).
Fixes: 0de94bcac7fc ("examples/vm_power: send confirmation cmd to guest")
-Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Lei Yao <lei.a.yao@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'kni: fix build with Linux 5.6' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (4 preceding siblings ...)
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/power: fix ack for enable/disable turbo' " luca.boccassi
@ 2020-02-17 17:44 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " luca.boccassi
` (46 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:44 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c7b6fa38f45d6cd51bdff326e0c473a371af8832 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 12 Feb 2020 17:14:24 +0000
Subject: [PATCH] kni: fix build with Linux 5.6
[ upstream commit 38ad54f3bc7614b53bd6ca3644a471a3842502fc ]
With the following Linux commit a new parameter 'txqueue' has been added
to 'ndo_tx_timeout' ndo:
commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler")
The change reflected to the KNI with version check.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
kernel/linux/kni/compat.h | 4 ++++
kernel/linux/kni/kni_net.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 7109474ec5..9ee45dbf6f 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -130,3 +130,7 @@
#if KERNEL_VERSION(4, 10, 0) <= LINUX_VERSION_CODE
#define HAVE_IOVA_TO_KVA_MAPPING_SUPPORT
#endif
+
+#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
+#define HAVE_TX_TIMEOUT_TXQUEUE
+#endif
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 97fe85be9a..c82c881a2c 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -623,8 +623,13 @@ kni_net_rx(struct kni_dev *kni)
/*
* Deal with a transmit timeout.
*/
+#ifdef HAVE_TX_TIMEOUT_TXQUEUE
+static void
+kni_net_tx_timeout(struct net_device *dev, unsigned int txqueue)
+#else
static void
kni_net_tx_timeout(struct net_device *dev)
+#endif
{
pr_debug("Transmit timeout at %ld, latency %ld\n", jiffies,
jiffies - dev_trans_start(dev));
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.552453554 +0000
+++ 0007-kni-fix-build-with-Linux-5.6.patch 2020-02-17 17:00:15.271949945 +0000
@@ -1,16 +1,16 @@
-From 38ad54f3bc7614b53bd6ca3644a471a3842502fc Mon Sep 17 00:00:00 2001
+From c7b6fa38f45d6cd51bdff326e0c473a371af8832 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 12 Feb 2020 17:14:24 +0000
Subject: [PATCH] kni: fix build with Linux 5.6
+[ upstream commit 38ad54f3bc7614b53bd6ca3644a471a3842502fc ]
+
With the following Linux commit a new parameter 'txqueue' has been added
to 'ndo_tx_timeout' ndo:
commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler")
The change reflected to the KNI with version check.
-Cc: stable@dpdk.org
-
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (5 preceding siblings ...)
2020-02-17 17:44 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " luca.boccassi
` (45 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 69aa29901aefb56c864161744663dfb85fa8b9eb Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sun, 9 Feb 2020 22:14:52 +0100
Subject: [PATCH] fix Mellanox copyright and SPDX tag
[ upstream commit 80139e35493286bce0568cee03f58762b4051120 ]
Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test-pmd/flowgen.c | 34 ++--------------------------------
app/test-pmd/macswap.c | 33 ++-------------------------------
app/test-pmd/util.c | 2 +-
devtools/cocci.sh | 32 ++------------------------------
4 files changed, 7 insertions(+), 94 deletions(-)
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 03b72aaa56..68931fdea6 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -1,35 +1,5 @@
-/*-
- * BSD LICENSE
- *
- * Copyright(c) 2010-2013 Tilera Corporation. All rights reserved.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Tilera Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2014-2020 Mellanox Technologies, Ltd
*/
#include <stdarg.h>
diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c
index 71af916fc3..8428c26d85 100644
--- a/app/test-pmd/macswap.c
+++ b/app/test-pmd/macswap.c
@@ -1,34 +1,5 @@
-/*-
- * BSD LICENSE
- *
- * Copyright(c) 2014 Tilera Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Tilera Corporation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2014-2020 Mellanox Technologies, Ltd
*/
#include <stdarg.h>
diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index b514be5e16..4e4ead3075 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
- * Copyright(c) 2018 Mellanox Technology
+ * Copyright 2018 Mellanox Technologies, Ltd
*/
#include <stdio.h>
diff --git a/devtools/cocci.sh b/devtools/cocci.sh
index 8b17a8ceba..ab9a6efe9a 100755
--- a/devtools/cocci.sh
+++ b/devtools/cocci.sh
@@ -1,34 +1,6 @@
#! /bin/sh
-
-# BSD LICENSE
-#
-# Copyright 2015 EZchip Semiconductor Ltd.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of EZchip Semiconductor nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2015-2020 Mellanox Technologies, Ltd
# Apply coccinelle transforms.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.577232481 +0000
+++ 0008-fix-Mellanox-copyright-and-SPDX-tag.patch 2020-02-17 17:00:15.275950002 +0000
@@ -1,8 +1,10 @@
-From 80139e35493286bce0568cee03f58762b4051120 Mon Sep 17 00:00:00 2001
+From 69aa29901aefb56c864161744663dfb85fa8b9eb Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sun, 9 Feb 2020 22:14:52 +0100
Subject: [PATCH] fix Mellanox copyright and SPDX tag
+[ upstream commit 80139e35493286bce0568cee03f58762b4051120 ]
+
Mellanox owns Tilera and EZchip, so the copyrights can be converted.
At the same time, the license header is switched to SPDX tag format,
and a typo is fixed in another copyright line.
@@ -16,7 +18,7 @@
4 files changed, 7 insertions(+), 94 deletions(-)
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
-index ae50cdc9de..4bd351e675 100644
+index 03b72aaa56..68931fdea6 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -1,35 +1,5 @@
@@ -99,7 +101,7 @@
#include <stdarg.h>
diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
-index 418d74e589..8488fa1a8f 100644
+index b514be5e16..4e4ead3075 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -1,6 +1,6 @@
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'kni: fix not contiguous FIFO' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (6 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " luca.boccassi
` (44 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Scott Wasson; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a0de960f735231c702bfe6d8ff3d1f8f4dbd9c16 Mon Sep 17 00:00:00 2001
From: Scott Wasson <scott_wasson@affirmednetworks.com>
Date: Fri, 14 Feb 2020 10:00:52 +0000
Subject: [PATCH] kni: fix not contiguous FIFO
[ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ]
KNI requires FIFO to be physically contiguous, with existing
'rte_memzone_reserve()' API this is not guaranteed by default and as a
result KNI rings and packet delivery may be broken if reserved memory
is not physically contiguous.
Fixing it by providing 'RTE_MEMZONE_IOVA_CONTIG' flag to ask physically
contiguous memory.
Bugzilla ID: 389
Fixes: 23fa86e529e4 ("memzone: enable IOVA-contiguous reserving")
Signed-off-by: Scott Wasson <scott_wasson@affirmednetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_kni/rte_kni.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index e388751e33..bcf82cc2d5 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -145,31 +145,38 @@ kni_reserve_mz(struct rte_kni *kni)
char mz_name[RTE_MEMZONE_NAMESIZE];
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_TX_Q_MZ_NAME_FMT, kni->name);
- kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_tx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_tx_q == NULL, tx_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RX_Q_MZ_NAME_FMT, kni->name);
- kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_rx_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_rx_q == NULL, rx_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_ALLOC_Q_MZ_NAME_FMT, kni->name);
- kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_alloc_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_alloc_q == NULL, alloc_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_FREE_Q_MZ_NAME_FMT, kni->name);
- kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_free_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_free_q == NULL, free_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_REQ_Q_MZ_NAME_FMT, kni->name);
- kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_req_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_req_q == NULL, req_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_RESP_Q_MZ_NAME_FMT, kni->name);
- kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_resp_q = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_resp_q == NULL, resp_q_fail);
snprintf(mz_name, RTE_MEMZONE_NAMESIZE, KNI_SYNC_ADDR_MZ_NAME_FMT, kni->name);
- kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY, 0);
+ kni->m_sync_addr = rte_memzone_reserve(mz_name, KNI_FIFO_SIZE, SOCKET_ID_ANY,
+ RTE_MEMZONE_IOVA_CONTIG);
KNI_MEM_CHECK(kni->m_sync_addr == NULL, sync_addr_fail);
return 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.602617383 +0000
+++ 0009-kni-fix-not-contiguous-FIFO.patch 2020-02-17 17:00:15.275950002 +0000
@@ -1,8 +1,10 @@
-From eab71b8463c9d3aeeb8c222ff6159b4125d23019 Mon Sep 17 00:00:00 2001
+From a0de960f735231c702bfe6d8ff3d1f8f4dbd9c16 Mon Sep 17 00:00:00 2001
From: Scott Wasson <scott_wasson@affirmednetworks.com>
Date: Fri, 14 Feb 2020 10:00:52 +0000
Subject: [PATCH] kni: fix not contiguous FIFO
+[ upstream commit eab71b8463c9d3aeeb8c222ff6159b4125d23019 ]
+
KNI requires FIFO to be physically contiguous, with existing
'rte_memzone_reserve()' API this is not guaranteed by default and as a
result KNI rings and packet delivery may be broken if reserved memory
@@ -13,7 +15,6 @@
Bugzilla ID: 389
Fixes: 23fa86e529e4 ("memzone: enable IOVA-contiguous reserving")
-Cc: stable@dpdk.org
Signed-off-by: Scott Wasson <scott_wasson@affirmednetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (7 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " luca.boccassi
` (43 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Xiao Wang; +Cc: David Hunt, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 02d4818efec6fc8870fc6b3472344436efb658c1 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:56 -0500
Subject: [PATCH] examples/l3fwd-power: fix a typo
[ upstream commit dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e ]
Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
examples/l3fwd-power/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index d049d8a5dc..ffcc7ecf44 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1338,7 +1338,7 @@ start_rx:
*/
rte_delay_us(lcore_idle_hint);
else {
- /* suspend until rx interrupt trigges */
+ /* suspend until rx interrupt triggers */
if (intr_en) {
turn_on_intr(qconf);
sleep_until_rx_interrupt(
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.626850634 +0000
+++ 0010-examples-l3fwd-power-fix-a-typo.patch 2020-02-17 17:00:15.279950059 +0000
@@ -1,10 +1,11 @@
-From dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e Mon Sep 17 00:00:00 2001
+From 02d4818efec6fc8870fc6b3472344436efb658c1 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:56 -0500
Subject: [PATCH] examples/l3fwd-power: fix a typo
+[ upstream commit dd22d31721b38dd49b7eb7b6c7a3802c9c3cb02e ]
+
Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
-Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
@@ -13,10 +14,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
-index e90d18b24f..e63abb1da8 100644
+index d049d8a5dc..ffcc7ecf44 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
-@@ -1328,7 +1328,7 @@ start_rx:
+@@ -1338,7 +1338,7 @@ start_rx:
*/
rte_delay_us(lcore_idle_hint);
else {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (8 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/fips_validation: fix AES-GCM cipher length parsing' " luca.boccassi
` (42 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Xiao Wang; +Cc: Harman Kalra, Liang Ma, David Hunt, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7c93d05a5051e04ef7f7ab2d4411613f41ed92ce Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:57 -0500
Subject: [PATCH] examples/l3fwd-power: fix interrupt disable
[ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ]
Since all related queues' interrupts are turned on before epoll, we need
to turn off all the interrupts after wakeup. This patch fixes the issue
of only turning off the interrupted queues.
Fixes: b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when waking up")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Liang Ma <liang.j.ma@intel.com>
Tested-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
examples/l3fwd-power/main.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index ffcc7ecf44..e9b2cb5b30 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -880,9 +880,6 @@ sleep_until_rx_interrupt(int num)
port_id = ((uintptr_t)data) >> CHAR_BIT;
queue_id = ((uintptr_t)data) &
RTE_LEN2MASK(CHAR_BIT, uint8_t);
- rte_spinlock_lock(&(locks[port_id]));
- rte_eth_dev_rx_intr_disable(port_id, queue_id);
- rte_spinlock_unlock(&(locks[port_id]));
RTE_LOG(INFO, L3FWD_POWER,
"lcore %u is waked up from rx interrupt on"
" port %d queue %d\n",
@@ -892,7 +889,7 @@ sleep_until_rx_interrupt(int num)
return 0;
}
-static void turn_on_intr(struct lcore_conf *qconf)
+static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
{
int i;
struct lcore_rx_queue *rx_queue;
@@ -905,7 +902,10 @@ static void turn_on_intr(struct lcore_conf *qconf)
queue_id = rx_queue->queue_id;
rte_spinlock_lock(&(locks[port_id]));
- rte_eth_dev_rx_intr_enable(port_id, queue_id);
+ if (on)
+ rte_eth_dev_rx_intr_enable(port_id, queue_id);
+ else
+ rte_eth_dev_rx_intr_disable(port_id, queue_id);
rte_spinlock_unlock(&(locks[port_id]));
}
}
@@ -1340,9 +1340,10 @@ start_rx:
else {
/* suspend until rx interrupt triggers */
if (intr_en) {
- turn_on_intr(qconf);
+ turn_on_off_intr(qconf, 1);
sleep_until_rx_interrupt(
qconf->n_rx_queue);
+ turn_on_off_intr(qconf, 0);
/**
* start receiving packets immediately
*/
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.651713311 +0000
+++ 0011-examples-l3fwd-power-fix-interrupt-disable.patch 2020-02-17 17:00:15.279950059 +0000
@@ -1,14 +1,15 @@
-From 49dcf7b98e87a5d2880693da4c09af11e58f3447 Mon Sep 17 00:00:00 2001
+From 7c93d05a5051e04ef7f7ab2d4411613f41ed92ce Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 20 Jan 2020 22:06:57 -0500
Subject: [PATCH] examples/l3fwd-power: fix interrupt disable
+[ upstream commit 49dcf7b98e87a5d2880693da4c09af11e58f3447 ]
+
Since all related queues' interrupts are turned on before epoll, we need
to turn off all the interrupts after wakeup. This patch fixes the issue
of only turning off the interrupted queues.
Fixes: b736d64787fc ("examples/l3fwd-power: disable Rx interrupt when waking up")
-Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
@@ -20,10 +21,10 @@
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
-index e63abb1da8..c7fe0ec034 100644
+index ffcc7ecf44..e9b2cb5b30 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
-@@ -870,9 +870,6 @@ sleep_until_rx_interrupt(int num)
+@@ -880,9 +880,6 @@ sleep_until_rx_interrupt(int num)
port_id = ((uintptr_t)data) >> CHAR_BIT;
queue_id = ((uintptr_t)data) &
RTE_LEN2MASK(CHAR_BIT, uint8_t);
@@ -33,7 +34,7 @@
RTE_LOG(INFO, L3FWD_POWER,
"lcore %u is waked up from rx interrupt on"
" port %d queue %d\n",
-@@ -882,7 +879,7 @@ sleep_until_rx_interrupt(int num)
+@@ -892,7 +889,7 @@ sleep_until_rx_interrupt(int num)
return 0;
}
@@ -42,7 +43,7 @@
{
int i;
struct lcore_rx_queue *rx_queue;
-@@ -895,7 +892,10 @@ static void turn_on_intr(struct lcore_conf *qconf)
+@@ -905,7 +902,10 @@ static void turn_on_intr(struct lcore_conf *qconf)
queue_id = rx_queue->queue_id;
rte_spinlock_lock(&(locks[port_id]));
@@ -54,7 +55,7 @@
rte_spinlock_unlock(&(locks[port_id]));
}
}
-@@ -1330,9 +1330,10 @@ start_rx:
+@@ -1340,9 +1340,10 @@ start_rx:
else {
/* suspend until rx interrupt triggers */
if (intr_en) {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/fips_validation: fix AES-GCM cipher length parsing' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (9 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " luca.boccassi
` (41 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Fan Zhang; +Cc: Akhil Goyal, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b99ae5f19981d744fc0c8925c24316528c53ae42 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 14 Feb 2020 11:41:18 +0000
Subject: [PATCH] examples/fips_validation: fix AES-GCM cipher length parsing
[ upstream commit 2adb3b4e7e54dcce626560da39b6fb6adfe914bc ]
This patch fixes the cipher len keyword typo.
Fixes: 07f5e4553293 ("examples/fips_validation: fix cipher length for AES-GCM")
Suggested-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
examples/fips_validation/fips_validation_gcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index f295025590..bc2d37dcbf 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -19,7 +19,7 @@
#define PTLEN_STR "PTlen = "
#define AADLEN_STR "AADlen = "
#define TAGLEN_STR "Taglen = "
-#define CTLEN_STR "PTlen = "
+#define CTLEN_STR "CTlen = "
#define COUNT_STR "Count = "
#define KEY_STR "Key = "
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.677262649 +0000
+++ 0012-examples-fips_validation-fix-AES-GCM-cipher-length-p.patch 2020-02-17 17:00:15.279950059 +0000
@@ -1,8 +1,10 @@
-From 2adb3b4e7e54dcce626560da39b6fb6adfe914bc Mon Sep 17 00:00:00 2001
+From b99ae5f19981d744fc0c8925c24316528c53ae42 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 14 Feb 2020 11:41:18 +0000
Subject: [PATCH] examples/fips_validation: fix AES-GCM cipher length parsing
+[ upstream commit 2adb3b4e7e54dcce626560da39b6fb6adfe914bc ]
+
This patch fixes the cipher len keyword typo.
Fixes: 07f5e4553293 ("examples/fips_validation: fix cipher length for AES-GCM")
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'lib: fix unnecessary double negation' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (10 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/fips_validation: fix AES-GCM cipher length parsing' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/octeontx2: add kmod dependency info' " luca.boccassi
` (40 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Ciara Power; +Cc: Ferruh Yigit, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7081fd04ce3e615b815870e40a8a6cba04983c42 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Feb 2020 16:17:25 +0000
Subject: [PATCH] lib: fix unnecessary double negation
[ upstream commit f42c9ac5b6b5fabd3c6bb124914af6704445e853 ]
An equality expression already returns either 0 or 1.
There is no need to use double negation for these cases.
Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Fixes: a0fd91cefcc0 ("mempool: rename functions with confusing names")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_mbuf/rte_mbuf.h | 2 +-
lib/librte_mempool/rte_mempool.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 219b110b76..6d080527f6 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1535,7 +1535,7 @@ static inline int rte_pktmbuf_trim(struct rte_mbuf *m, uint16_t len)
static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)
{
__rte_mbuf_sanity_check(m, 1);
- return !!(m->nb_segs == 1);
+ return m->nb_segs == 1;
}
/**
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 0a1dc6059f..4907c0808e 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -1653,7 +1653,7 @@ rte_mempool_in_use_count(const struct rte_mempool *mp);
static inline int
rte_mempool_full(const struct rte_mempool *mp)
{
- return !!(rte_mempool_avail_count(mp) == mp->size);
+ return rte_mempool_avail_count(mp) == mp->size;
}
/**
@@ -1672,7 +1672,7 @@ rte_mempool_full(const struct rte_mempool *mp)
static inline int
rte_mempool_empty(const struct rte_mempool *mp)
{
- return !!(rte_mempool_avail_count(mp) == 0);
+ return rte_mempool_avail_count(mp) == 0;
}
/**
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.701318588 +0000
+++ 0013-lib-fix-unnecessary-double-negation.patch 2020-02-17 17:00:15.283950115 +0000
@@ -1,14 +1,15 @@
-From f42c9ac5b6b5fabd3c6bb124914af6704445e853 Mon Sep 17 00:00:00 2001
+From 7081fd04ce3e615b815870e40a8a6cba04983c42 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 14 Feb 2020 16:17:25 +0000
Subject: [PATCH] lib: fix unnecessary double negation
+[ upstream commit f42c9ac5b6b5fabd3c6bb124914af6704445e853 ]
+
An equality expression already returns either 0 or 1.
There is no need to use double negation for these cases.
Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Fixes: a0fd91cefcc0 ("mempool: rename functions with confusing names")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -19,10 +20,10 @@
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
-index 59023893a5..34679e0920 100644
+index 219b110b76..6d080527f6 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
-@@ -1699,7 +1699,7 @@ static inline int rte_pktmbuf_trim(struct rte_mbuf *m, uint16_t len)
+@@ -1535,7 +1535,7 @@ static inline int rte_pktmbuf_trim(struct rte_mbuf *m, uint16_t len)
static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m)
{
__rte_mbuf_sanity_check(m, 1);
@@ -32,10 +33,10 @@
/**
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
-index a2c92727a6..c90cf31467 100644
+index 0a1dc6059f..4907c0808e 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
-@@ -1654,7 +1654,7 @@ rte_mempool_in_use_count(const struct rte_mempool *mp);
+@@ -1653,7 +1653,7 @@ rte_mempool_in_use_count(const struct rte_mempool *mp);
static inline int
rte_mempool_full(const struct rte_mempool *mp)
{
@@ -44,7 +45,7 @@
}
/**
-@@ -1673,7 +1673,7 @@ rte_mempool_full(const struct rte_mempool *mp)
+@@ -1672,7 +1672,7 @@ rte_mempool_full(const struct rte_mempool *mp)
static inline int
rte_mempool_empty(const struct rte_mempool *mp)
{
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'crypto/octeontx2: add kmod dependency info' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (11 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " luca.boccassi
` (39 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 97e6c5c30a2a19850c8a8a225416b6aa7b8e09b9 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 10 Feb 2020 08:35:12 +0100
Subject: [PATCH] crypto/octeontx2: add kmod dependency info
[ upstream commit 02ba37237612f6d9a30b48e232b3dcd2cafe4e60 ]
Like for OCTEON TX, the OCTEON TX2 crypto engines must
first be unbound from their kernel module, then rebound to
vfio-pci, before being used in DPDK.
As this capability is detected at runtime by dpdk-pmdinfo,
add the info in the PMD registering directives.
Then an external script can be used for bind and unbind.
Fixes: 2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
drivers/crypto/octeontx2/otx2_cryptodev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7fd216bb39..7b8add1bfc 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -145,6 +145,7 @@ static struct cryptodev_driver otx2_cryptodev_drv;
RTE_INIT(otx2_cpt_init_log);
RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX2_PMD, otx2_cryptodev_pmd);
RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
+RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
otx2_cryptodev_driver_id);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.727594839 +0000
+++ 0014-crypto-octeontx2-add-kmod-dependency-info.patch 2020-02-17 17:00:15.283950115 +0000
@@ -1,8 +1,10 @@
-From 02ba37237612f6d9a30b48e232b3dcd2cafe4e60 Mon Sep 17 00:00:00 2001
+From 97e6c5c30a2a19850c8a8a225416b6aa7b8e09b9 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 10 Feb 2020 08:35:12 +0100
Subject: [PATCH] crypto/octeontx2: add kmod dependency info
+[ upstream commit 02ba37237612f6d9a30b48e232b3dcd2cafe4e60 ]
+
Like for OCTEON TX, the OCTEON TX2 crypto engines must
first be unbound from their kernel module, then rebound to
vfio-pci, before being used in DPDK.
@@ -13,7 +15,6 @@
Then an external script can be used for bind and unbind.
Fixes: 2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
-Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'crypto/ccp: fix queue alignment' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (12 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/octeontx2: add kmod dependency info' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'test/compress: replace test vector' " luca.boccassi
` (38 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b61416ddb28ac9cf91a251b75657e106fedf4cbc Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 7 Feb 2020 15:06:00 +0100
Subject: [PATCH] crypto/ccp: fix queue alignment
[ upstream commit b3bf2367d0edc11cae26572a7b13133840bf2184 ]
Caught by compiling with -fno-common.
A ____cacheline_aligned symbol can be found in the crypto/ccp driver
object files.
Looking at this driver source, the ____cacheline_aligned (kernel?)
alignment macro is undefined.
The compiler treats this as a symbol definition and generates a global
symbol.
Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/crypto/ccp/ccp_dev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp_dev.h b/drivers/crypto/ccp/ccp_dev.h
index f4ad9eafd5..37e04218ce 100644
--- a/drivers/crypto/ccp/ccp_dev.h
+++ b/drivers/crypto/ccp/ccp_dev.h
@@ -220,7 +220,7 @@ struct ccp_queue {
/**< lsb assigned for sha ctx */
uint32_t sb_hmac;
/**< lsb assigned for hmac ctx */
-} ____cacheline_aligned;
+} __rte_cache_aligned;
/**
* A structure describing a CCP device.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.750834790 +0000
+++ 0015-crypto-ccp-fix-queue-alignment.patch 2020-02-17 17:00:15.283950115 +0000
@@ -1,8 +1,10 @@
-From b3bf2367d0edc11cae26572a7b13133840bf2184 Mon Sep 17 00:00:00 2001
+From b61416ddb28ac9cf91a251b75657e106fedf4cbc Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 7 Feb 2020 15:06:00 +0100
Subject: [PATCH] crypto/ccp: fix queue alignment
+[ upstream commit b3bf2367d0edc11cae26572a7b13133840bf2184 ]
+
Caught by compiling with -fno-common.
A ____cacheline_aligned symbol can be found in the crypto/ccp driver
object files.
@@ -13,7 +15,6 @@
symbol.
Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
-Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/compress: replace test vector' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (13 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " luca.boccassi
` (37 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Artur Trybula; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 91f3813dd0f66b852f48f43c2d503df250f175b0 Mon Sep 17 00:00:00 2001
From: Artur Trybula <arturx.trybula@intel.com>
Date: Thu, 6 Feb 2020 10:37:35 +0100
Subject: [PATCH] test/compress: replace test vector
[ upstream commit 1692bc53df07dcb1ab059ad6433e6273f37f79ab ]
This patch replaces an existing test vector with a new one containing
public domain text only. This is to avoid any potential issues
re-licensing content as BSD-3 which has no clear original license.
Fixes: b06aa643cac4 ("test/compress: add initial unit tests")
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
---
app/test/test_compressdev_test_buffer.h | 182 ++++++++++++------------
1 file changed, 92 insertions(+), 90 deletions(-)
diff --git a/app/test/test_compressdev_test_buffer.h b/app/test/test_compressdev_test_buffer.h
index c0492f89a2..d241602445 100644
--- a/app/test/test_compressdev_test_buffer.h
+++ b/app/test/test_compressdev_test_buffer.h
@@ -1,3 +1,7 @@
+/* SPDX-License-Identifier: (BSD-3-Clause)
+ * Copyright(c) 2018-2020 Intel Corporation
+ */
+
#ifndef TEST_COMPRESSDEV_TEST_BUFFERS_H_
#define TEST_COMPRESSDEV_TEST_BUFFERS_H_
@@ -190,106 +194,104 @@ static const char test_buf_shakespeare[] =
"\n"
"ORLANDO Go apart, Adam, and thou shalt hear how he will\n";
-/* Snippet of source code in Pascal */
-static const char test_buf_pascal[] =
- " Ptr = 1..DMem;\n"
- " Loc = 1..IMem;\n"
- " Loc0 = 0..IMem;\n"
- " EdgeT = (hout,lin,hin,lout); {Warning this order is important in}\n"
- " {predicates such as gtS,geS}\n"
- " CardT = (finite,infinite);\n"
- " ExpT = Minexp..Maxexp;\n"
- " ManT = Mininf..Maxinf; \n"
- " Pflag = (PNull,PSoln,PTrace,PPrint);\n"
- " Sreal = record\n"
- " edge:EdgeT;\n"
- " cardinality:CardT;\n"
- " exp:ExpT; {exponent}\n"
- " mantissa:ManT;\n"
- " end;\n"
- " Int = record\n"
- " hi:Sreal;\n"
- " lo:Sreal;\n"
- " end;\n"
- " Instr = record\n"
- " Code:OpType;\n"
- " Pars: array[0..Par] of 0..DMem;\n"
- " end;\n"
- " DataMem= record\n"
- " D :array [Ptr] of Int;\n"
- " S :array [Loc] of State;\n"
- " LastHalve:Loc;\n"
- " RHalve :array [Loc] of real;\n"
- " end;\n"
- " DataFlags=record\n"
- " PF :array [Ptr] of Pflag;\n"
- " end;\n"
- "var\n"
- " Debug : (none,activity,post,trace,dump);\n"
- " Cut : (once,all);\n"
- " GlobalEnd,Verifiable:boolean;\n"
- " HalveThreshold:real;\n"
- " I : array [Loc] of Instr; {Memory holding instructions}\n"
- " End : Loc; {last instruction in I}\n"
- " ParN : array [OpType] of -1..Par; {number of parameters for each \n"
- " opcode. -1 means no result}\n"
- " ParIntersect : array [OpType] of boolean ;\n"
- " DInit : DataMem; {initial memory which is cleared and \n"
- " used in first call}\n"
- " DF : DataFlags; {hold flags for variables, e.g. print/trace}\n"
- " MaxDMem:0..DMem;\n"
- " Shift : array[0..Digits] of 1..maxint;{array of constant multipliers}\n"
- " {used for alignment etc.}\n"
- " Dummy :Positive;\n"
- " {constant intervals and Sreals}\n"
- " PlusInfS,MinusInfS,PlusSmallS,MinusSmallS,ZeroS,\n"
- " PlusFiniteS,MinusFiniteS:Sreal;\n"
- " Zero,All,AllFinite:Int;\n"
+/* Snippet of Alice's Adventures in Wonderland */
+static const char test_buf_alice2[] =
+ "`Curiouser and curiouser!' cried Alice (she was so much\n"
+ "surprised, that for the moment she quite forgot how to speak good\n"
+ "English); `now I'm opening out like the largest telescope that\n"
+ "ever was! Good-bye, feet!' (for when she looked down at her\n"
+ "feet, they seemed to be almost out of sight, they were getting so\n"
+ "far off). `Oh, my poor little feet, I wonder who will put on\n"
+ "your shoes and stockings for you now, dears? I'm sure _I_ shan't\n"
+ "be able! I shall be a great deal too far off to trouble myself\n"
+ "about you: you must manage the best way you can; --but I must be\n"
+ "kind to them,' thought Alice, `or perhaps they won't walk the\n"
+ "way I want to go! Let me see: I'll give them a new pair of\n"
+ "boots every Christmas.'\n"
"\n"
- "procedure deblank;\n"
- "var Ch:char;\n"
- "begin\n"
- " while (not eof) and (input^ in [' ',' ']) do read(Ch);\n"
- "end;\n"
+ " And she went on planning to herself how she would manage it.\n"
+ "`They must go by the carrier,' she thought; `and how funny it'll\n"
+ "seem, sending presents to one's own feet! And how odd the\n"
+ "directions will look!\n"
"\n"
- "procedure InitialOptions;\n"
+ " ALICE'S RIGHT FOOT, ESQ.\n"
+ " HEARTHRUG,\n"
+ " NEAR THE FENDER,\n"
+ " (WITH ALICE'S LOVE).\n"
"\n"
- "#include '/user/profs/cleary/bin/options.i';\n"
+ "Oh dear, what nonsense I'm talking!'\n"
"\n"
- " procedure Option;\n"
- " begin\n"
- " case Opt of\n"
- " 'a','A':Debug:=activity;\n"
- " 'd','D':Debug:=dump;\n"
- " 'h','H':HalveThreshold:=StringNum/100;\n"
- " 'n','N':Debug:=none;\n"
- " 'p','P':Debug:=post;\n"
- " 't','T':Debug:=trace;\n"
- " 'v','V':Verifiable:=true;\n"
- " end;\n"
- " end;\n"
+ " Just then her head struck against the roof of the hall: in\n"
+ "fact she was now more than nine feet high, and she at once took\n"
+ "up the little golden key and hurried off to the garden door.\n"
"\n"
- "begin\n"
- " Debug:=trace;\n"
- " Verifiable:=false;\n"
- " HalveThreshold:=67/100;\n"
- " Options;\n"
- " writeln(Debug);\n"
- " writeln('Verifiable:',Verifiable);\n"
- " writeln('Halve threshold',HalveThreshold);\n"
- "end;{InitialOptions}\n"
+ " Poor Alice! It was as much as she could do, lying down on one\n"
+ "side, to look through into the garden with one eye; but to get\n"
+ "through was more hopeless than ever: she sat down and began to\n"
+ "cry again.\n"
"\n"
- "procedure NormalizeUp(E,M:integer;var S:Sreal;var Closed:boolean);\n"
- "begin\n"
- "with S do\n"
- "begin\n"
- " if M=0 then S:=ZeroS else\n"
- " if M>0 then\n";
+ " `You ought to be ashamed of yourself,' said Alice, `a great\n"
+ "girl like you,' (she might well say this), `to go on crying in\n"
+ "this way! Stop this moment, I tell you!' But she went on all\n"
+ "the same, shedding gallons of tears, until there was a large pool\n"
+ "all round her, about four inches deep and reaching half down the\n"
+ "hall.\n"
+ "\n"
+ " After a time she heard a little pattering of feet in the\n"
+ "distance, and she hastily dried her eyes to see what was coming.\n"
+ "It was the White Rabbit returning, splendidly dressed, with a\n"
+ "pair of white kid gloves in one hand and a large fan in the\n"
+ "other: he came trotting along in a great hurry, muttering to\n"
+ "himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she\n"
+ "be savage if I've kept her waiting!' Alice felt so desperate\n"
+ "that she was ready to ask help of any one; so, when the Rabbit\n"
+ "came near her, she began, in a low, timid voice, `If you please,\n"
+ "sir--' The Rabbit started violently, dropped the white kid\n"
+ "gloves and the fan, and skurried away into the darkness as hard\n"
+ "as he could go.\n"
+ "\n"
+ " Alice took up the fan and gloves, and, as the hall was very\n"
+ "hot, she kept fanning herself all the time she went on talking:\n"
+ "`Dear, dear! How queer everything is to-day! And yesterday\n"
+ "things went on just as usual. I wonder if I've been changed in\n"
+ "the night? Let me think: was I the same when I got up this\n"
+ "morning? I almost think I can remember feeling a little\n"
+ "different. But if I'm not the same, the next question is, Who in\n"
+ "the world am I? Ah, THAT'S the great puzzle!' And she began\n"
+ "thinking over all the children she knew that were of the same age\n"
+ "as herself, to see if she could have been changed for any of\n"
+ "them.\n"
+ "\n"
+ " `I'm sure I'm not Ada,' she said, `for her hair goes in such\n"
+ "long ringlets, and mine doesn't go in ringlets at all; and I'm\n"
+ "sure I can't be Mabel, for I know all sorts of things, and she,\n"
+ "oh! she knows such a very little! Besides, SHE'S she, and I'm I,\n"
+ "and--oh dear, how puzzling it all is! I'll try if I know all the\n"
+ "things I used to know. Let me see: four times five is twelve,\n"
+ "and four times six is thirteen, and four times seven is--oh dear!\n"
+ "I shall never get to twenty at that rate! However, the\n"
+ "Multiplication Table doesn't signify: let's try Geography.\n"
+ "London is the capital of Paris, and Paris is the capital of Rome,\n"
+ "and Rome--no, THAT'S all wrong, I'm certain! I must have been\n"
+ "changed for Mabel! I'll try and say ''How doth the little--''\n"
+ "and she crossed her hands on her lap as if she were saying lessons,\n"
+ "and began to repeat it, but her voice sounded hoarse and\n"
+ "strange, and the words did not come the same as they used to do:--\n"
+ "\n"
+ " `How doth the little crocodile\n"
+ " Improve his shining tail,\n"
+ " And pour the waters of the Nile\n"
+ " On every golden scale!\n"
+ "\n"
+ " `How cheerfully he seems to grin,\n"
+ " How neatly spread his claws,\n"
+ " And welcome little fishes in\n"
+ " With gently smiling jaws!'\n";
static const char * const compress_test_bufs[] = {
test_buf_alice,
test_buf_shakespeare,
- test_buf_pascal
+ test_buf_alice2
};
#endif /* TEST_COMPRESSDEV_TEST_BUFFERS_H_ */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.774192359 +0000
+++ 0016-test-compress-replace-test-vector.patch 2020-02-17 17:00:15.287950172 +0000
@@ -1,14 +1,15 @@
-From 1692bc53df07dcb1ab059ad6433e6273f37f79ab Mon Sep 17 00:00:00 2001
+From 91f3813dd0f66b852f48f43c2d503df250f175b0 Mon Sep 17 00:00:00 2001
From: Artur Trybula <arturx.trybula@intel.com>
Date: Thu, 6 Feb 2020 10:37:35 +0100
Subject: [PATCH] test/compress: replace test vector
+[ upstream commit 1692bc53df07dcb1ab059ad6433e6273f37f79ab ]
+
This patch replaces an existing test vector with a new one containing
public domain text only. This is to avoid any potential issues
re-licensing content as BSD-3 which has no clear original license.
Fixes: b06aa643cac4 ("test/compress: add initial unit tests")
-Cc: stable@dpdk.org
Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'drivers/crypto: fix session-less mode' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (14 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'test/compress: replace test vector' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary delay in port stop' " luca.boccassi
` (36 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Junxiao Shi; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 042ea295df9722b4d41d8ddc5658863c6c8057fc Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 11:32:11 -0700
Subject: [PATCH] drivers/crypto: fix session-less mode
[ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ]
When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:
CRYPTODEV: set_sym_session_private_data() line 489:
Set private data for driver 0 not allowed
Then, AESNI-MB driver segfaults in post_process_mb_job().
Bugzilla ID: 377
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++--
drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 97d9f81766..33f4167452 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -729,10 +729,10 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
op->sym->session,
cryptodev_driver_id);
} else {
- void *_sess = NULL;
+ void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
void *_sess_private_data = NULL;
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+ if (_sess == NULL)
return NULL;
if (rte_mempool_get(qp->sess_mp_priv,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 91f028308c..199097bf8c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -762,10 +762,10 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
return NULL;
/* provide internal session */
- void *_sess = NULL;
+ void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
void *_sess_private_data = NULL;
- if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+ if (_sess == NULL)
return NULL;
if (rte_mempool_get(qp->sess_mp_priv,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.798058152 +0000
+++ 0017-drivers-crypto-fix-session-less-mode.patch 2020-02-17 17:00:15.287950172 +0000
@@ -1,8 +1,10 @@
-From a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 Mon Sep 17 00:00:00 2001
+From 042ea295df9722b4d41d8ddc5658863c6c8057fc Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 11:32:11 -0700
Subject: [PATCH] drivers/crypto: fix session-less mode
+[ upstream commit a0c2b3d8ee501b90eb11c2a82da0aaca19362bd3 ]
+
When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:
@@ -15,7 +17,6 @@
Bugzilla ID: 377
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
-Cc: stable@dpdk.org
Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix unnecessary delay in port stop' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (15 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix default timeout for getting FW version' " luca.boccassi
` (35 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From dc997c7fc2a0b857c2a6ffea0990a56a05366933 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:08 +0530
Subject: [PATCH] net/bnxt: fix unnecessary delay in port stop
[ upstream commit 967a722be08cacdd05e6a29d2e1790d5747a6217 ]
VFs and multifunction PFs do not have the privilege to change
link configuration. We force the physical link down as a part
of device stop only for single physical function(SPF).
This change also helps in eliminating the logs when a VF port
is stopped:
"Port 0: link state change event"
"bnxt_print_link_info(): Port 0 Link Up - speed 25000 Mbps - full-duplex"
Fixes: 316e412299fd ("net/bnxt: fix crash when closing")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index cfe3ac2c39..778bdf9367 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -934,9 +934,10 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_dev_set_link_down_op(eth_dev);
/* Wait for link to be reset and the async notification to process.
- * During reset recovery, there is no need to wait
+ * During reset recovery, there is no need to wait and
+ * VF/NPAR functions do not have privilege to change PHY config.
*/
- if (!is_bnxt_in_error(bp))
+ if (!is_bnxt_in_error(bp) && BNXT_SINGLE_PF(bp))
bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
/* Clean queue intr-vector mapping */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.824206668 +0000
+++ 0018-net-bnxt-fix-unnecessary-delay-in-port-stop.patch 2020-02-17 17:00:15.291950228 +0000
@@ -1,8 +1,10 @@
-From 967a722be08cacdd05e6a29d2e1790d5747a6217 Mon Sep 17 00:00:00 2001
+From dc997c7fc2a0b857c2a6ffea0990a56a05366933 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:08 +0530
Subject: [PATCH] net/bnxt: fix unnecessary delay in port stop
+[ upstream commit 967a722be08cacdd05e6a29d2e1790d5747a6217 ]
+
VFs and multifunction PFs do not have the privilege to change
link configuration. We force the physical link down as a part
of device stop only for single physical function(SPF).
@@ -14,7 +16,6 @@
"bnxt_print_link_info(): Port 0 Link Up - speed 25000 Mbps - full-duplex"
Fixes: 316e412299fd ("net/bnxt: fix crash when closing")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -24,10 +25,10 @@
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index c1cb40160b..537820960e 100644
+index cfe3ac2c39..778bdf9367 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -948,9 +948,10 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -934,9 +934,10 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_dev_set_link_down_op(eth_dev);
/* Wait for link to be reset and the async notification to process.
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix default timeout for getting FW version' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (16 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary delay in port stop' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix port stop on error recovery failure' " luca.boccassi
` (34 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Rahul Gupta; +Cc: Kalesh AP, Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b4dd49534f61dfe9610e61a626c2422d4ae22144 Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:09 +0530
Subject: [PATCH] net/bnxt: fix default timeout for getting FW version
[ upstream commit 975ff25e7c2d8dfba2c947b5dc23a3bebf51b2d6 ]
Initially when driver is loading, there is no HWRM timeout configured
by FW, the VER_GET command needs use default timeout as 500ms and
while recovering from fatal/non-fatal FW error, it should use timeout
as 50ms.
Fixes: 458f0360e8dc ("net/bnxt: get default HWRM command timeout from FW")
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 6 ++++--
drivers/net/bnxt/bnxt_ethdev.c | 4 ++--
drivers/net/bnxt/bnxt_hwrm.c | 11 ++++-------
drivers/net/bnxt/bnxt_hwrm.h | 2 +-
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 9fba7c022f..6422753a81 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -600,8 +600,10 @@ struct bnxt {
uint16_t max_resp_len;
uint16_t hwrm_max_ext_req_len;
- /* default command timeout value of 50ms */
-#define HWRM_CMD_TIMEOUT 50000
+ /* default command timeout value of 500ms */
+#define DFLT_HWRM_CMD_TIMEOUT 500000
+ /* short command timeout value of 50ms */
+#define SHORT_HWRM_CMD_TIMEOUT 50000
/* default HWRM request timeout value */
uint32_t hwrm_cmd_timeout;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 778bdf9367..f123c823e3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3832,7 +3832,7 @@ static void bnxt_dev_recover(void *arg)
bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
do {
- rc = bnxt_hwrm_ver_get(bp);
+ rc = bnxt_hwrm_ver_get(bp, SHORT_HWRM_CMD_TIMEOUT);
if (rc == 0)
break;
rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
@@ -4511,7 +4511,7 @@ static int bnxt_init_fw(struct bnxt *bp)
bp->fw_cap = 0;
- rc = bnxt_hwrm_ver_get(bp);
+ rc = bnxt_hwrm_ver_get(bp, DFLT_HWRM_CMD_TIMEOUT);
if (rc)
return rc;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 3f603393b5..ad9ca7c6f1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -100,11 +100,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
if (bp->flags & BNXT_FLAG_FATAL_ERROR)
return 0;
- /* For VER_GET command, set timeout as 50ms */
- if (rte_cpu_to_le_16(req->req_type) == HWRM_VER_GET)
- timeout = HWRM_CMD_TIMEOUT;
- else
- timeout = bp->hwrm_cmd_timeout;
+ timeout = bp->hwrm_cmd_timeout;
if (bp->flags & BNXT_FLAG_SHORT_CMD ||
msg_len > bp->max_req_len) {
@@ -948,7 +944,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
return rc;
}
-int bnxt_hwrm_ver_get(struct bnxt *bp)
+int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
{
int rc = 0;
struct hwrm_ver_get_input req = {.req_type = 0 };
@@ -959,6 +955,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
uint32_t dev_caps_cfg;
bp->max_req_len = HWRM_MAX_REQ_LEN;
+ bp->hwrm_cmd_timeout = timeout;
HWRM_PREP(req, VER_GET, BNXT_USE_CHIMP_MB);
req.hwrm_intf_maj = HWRM_VERSION_MAJOR;
@@ -993,7 +990,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
/* convert timeout to usec */
bp->hwrm_cmd_timeout *= 1000;
if (!bp->hwrm_cmd_timeout)
- bp->hwrm_cmd_timeout = HWRM_CMD_TIMEOUT;
+ bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT;
if (resp->hwrm_intf_maj_8b != HWRM_VERSION_MAJOR) {
PMD_DRV_LOG(ERR, "Unsupported firmware API version\n");
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index d8d1360f91..2753720aef 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -120,7 +120,7 @@ int bnxt_hwrm_stat_ctx_free(struct bnxt *bp,
int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
struct rte_eth_stats *stats, uint8_t rx);
-int bnxt_hwrm_ver_get(struct bnxt *bp);
+int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout);
int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.852852104 +0000
+++ 0019-net-bnxt-fix-default-timeout-for-getting-FW-version.patch 2020-02-17 17:00:15.303950399 +0000
@@ -1,15 +1,16 @@
-From 975ff25e7c2d8dfba2c947b5dc23a3bebf51b2d6 Mon Sep 17 00:00:00 2001
+From b4dd49534f61dfe9610e61a626c2422d4ae22144 Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:09 +0530
Subject: [PATCH] net/bnxt: fix default timeout for getting FW version
+[ upstream commit 975ff25e7c2d8dfba2c947b5dc23a3bebf51b2d6 ]
+
Initially when driver is loading, there is no HWRM timeout configured
by FW, the VER_GET command needs use default timeout as 500ms and
while recovering from fatal/non-fatal FW error, it should use timeout
as 50ms.
Fixes: 458f0360e8dc ("net/bnxt: get default HWRM command timeout from FW")
-Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -23,10 +24,10 @@
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 68786a89bf..e8a30fa310 100644
+index 9fba7c022f..6422753a81 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
-@@ -606,8 +606,10 @@ struct bnxt {
+@@ -600,8 +600,10 @@ struct bnxt {
uint16_t max_resp_len;
uint16_t hwrm_max_ext_req_len;
@@ -40,10 +41,10 @@
uint32_t hwrm_cmd_timeout;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 537820960e..7147cc8fe2 100644
+index 778bdf9367..f123c823e3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -3998,7 +3998,7 @@ static void bnxt_dev_recover(void *arg)
+@@ -3832,7 +3832,7 @@ static void bnxt_dev_recover(void *arg)
bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
do {
@@ -52,7 +53,7 @@
if (rc == 0)
break;
rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
-@@ -4688,7 +4688,7 @@ static int bnxt_init_fw(struct bnxt *bp)
+@@ -4511,7 +4511,7 @@ static int bnxt_init_fw(struct bnxt *bp)
bp->fw_cap = 0;
@@ -62,7 +63,7 @@
return rc;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index f325aff828..96b34317b2 100644
+index 3f603393b5..ad9ca7c6f1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -100,11 +100,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
@@ -78,7 +79,7 @@
if (bp->flags & BNXT_FLAG_SHORT_CMD ||
msg_len > bp->max_req_len) {
-@@ -949,7 +945,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
+@@ -948,7 +944,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
return rc;
}
@@ -87,7 +88,7 @@
{
int rc = 0;
struct hwrm_ver_get_input req = {.req_type = 0 };
-@@ -960,6 +956,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
+@@ -959,6 +955,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
uint32_t dev_caps_cfg;
bp->max_req_len = HWRM_MAX_REQ_LEN;
@@ -95,7 +96,7 @@
HWRM_PREP(req, VER_GET, BNXT_USE_CHIMP_MB);
req.hwrm_intf_maj = HWRM_VERSION_MAJOR;
-@@ -994,7 +991,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
+@@ -993,7 +990,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
/* convert timeout to usec */
bp->hwrm_cmd_timeout *= 1000;
if (!bp->hwrm_cmd_timeout)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix port stop on error recovery failure' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (17 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix default timeout for getting FW version' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " luca.boccassi
` (33 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Rahul Gupta, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 403641055b702973adbcecc2c199f12c5428b737 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:12 +0530
Subject: [PATCH] net/bnxt: fix port stop on error recovery failure
[ upstream commit e5acec69294891c3bdd18c2a8177de74fb435c2d ]
During live FW upgrade or error recovery, if restoring the filter
settings fail after port start, driver invokes bnxt_uninit_resources()
only. Fix it to invoke bnxt_dev_stop_op() first before calling
bnxt_uninit_resources().
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f123c823e3..9ac63fd6d1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3856,15 +3856,17 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_dev_start_op(bp->eth_dev);
if (rc) {
PMD_DRV_LOG(ERR, "Failed to start port after reset\n");
- goto err;
+ goto err_start;
}
rc = bnxt_restore_filters(bp);
if (rc)
- goto err;
+ goto err_start;
PMD_DRV_LOG(INFO, "Recovered from FW reset\n");
return;
+err_start:
+ bnxt_dev_stop_op(bp->eth_dev);
err:
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bnxt_uninit_resources(bp, false);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.885606197 +0000
+++ 0020-net-bnxt-fix-port-stop-on-error-recovery-failure.patch 2020-02-17 17:00:15.307950455 +0000
@@ -1,15 +1,16 @@
-From e5acec69294891c3bdd18c2a8177de74fb435c2d Mon Sep 17 00:00:00 2001
+From 403641055b702973adbcecc2c199f12c5428b737 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:12 +0530
Subject: [PATCH] net/bnxt: fix port stop on error recovery failure
+[ upstream commit e5acec69294891c3bdd18c2a8177de74fb435c2d ]
+
During live FW upgrade or error recovery, if restoring the filter
settings fail after port start, driver invokes bnxt_uninit_resources()
only. Fix it to invoke bnxt_dev_stop_op() first before calling
bnxt_uninit_resources().
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -19,10 +20,10 @@
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 7147cc8fe2..3c40f4b599 100644
+index f123c823e3..9ac63fd6d1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -4022,15 +4022,17 @@ static void bnxt_dev_recover(void *arg)
+@@ -3856,15 +3856,17 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_dev_start_op(bp->eth_dev);
if (rc) {
PMD_DRV_LOG(ERR, "Failed to start port after reset\n");
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (18 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix port stop on error recovery failure' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix flow director passthru' " luca.boccassi
` (32 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7f16d7d4c86a42b09cb6bfad2e4a650d2d9f8d49 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:14 +0530
Subject: [PATCH] net/bnxt: fix buffer allocation reattempt
[ upstream commit 01829dea7303bc91063c461a675856dbbbcc6460 ]
In case of a buffer allocation failure, we reattempt buffer allocation
before the Rx handler exits. We were not attempting this when producer
index is greater than the number of buffers to allocate. Fixed it with
correct checks.
Fixes: d9dd0b29ed31 ("net/bnxt: fix Rx handling and buffer allocation logic")
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 3b713c2427..7338a81029 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -678,10 +678,11 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
/* Attempt to alloc Rx buf in case of a previous allocation failure. */
if (rc == -ENOMEM) {
- int i;
+ int i = RING_NEXT(rxr->rx_ring_struct, prod);
+ int cnt = nb_rx_pkts;
- for (i = prod; i <= nb_rx_pkts;
- i = RING_NEXT(rxr->rx_ring_struct, i)) {
+ for (; cnt;
+ i = RING_NEXT(rxr->rx_ring_struct, i), cnt--) {
struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];
/* Buffer already allocated for this index. */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.913570477 +0000
+++ 0021-net-bnxt-fix-buffer-allocation-reattempt.patch 2020-02-17 17:00:15.307950455 +0000
@@ -1,15 +1,16 @@
-From 01829dea7303bc91063c461a675856dbbbcc6460 Mon Sep 17 00:00:00 2001
+From 7f16d7d4c86a42b09cb6bfad2e4a650d2d9f8d49 Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Thu, 6 Feb 2020 22:03:14 +0530
Subject: [PATCH] net/bnxt: fix buffer allocation reattempt
+[ upstream commit 01829dea7303bc91063c461a675856dbbbcc6460 ]
+
In case of a buffer allocation failure, we reattempt buffer allocation
before the Rx handler exits. We were not attempting this when producer
index is greater than the number of buffers to allocate. Fixed it with
correct checks.
Fixes: d9dd0b29ed31 ("net/bnxt: fix Rx handling and buffer allocation logic")
-Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -18,7 +19,7 @@
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
-index 1f47db97ba..bef9720f59 100644
+index 3b713c2427..7338a81029 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -678,10 +678,11 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix flow director passthru' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (19 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " luca.boccassi
` (31 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Yahui Cao; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6a3de06023c9301132cb3fce90ed3725f3c0b4aa Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Tue, 21 Jan 2020 10:25:59 +0800
Subject: [PATCH] net/ice: fix flow director passthru
[ upstream commit 0d14c49b282196f48d63da0e34d1a20cdfc6e3a8 ]
The original PASSTHRU implementation is forwarding to queue 0. The
corrected implementation is forwarding to the next stage filter.
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_fdir.c | 9 ++++++++-
drivers/net/ice/ice_fdir_filter.c | 3 +--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 551c7a6bc6..8e5aef8a38 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -430,6 +430,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
if (input->dest_ctl == ICE_FLTR_PRGM_DESC_DEST_DROP_PKT) {
fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_YES;
fdir_fltr_ctx.qindex = 0;
+ } else if (input->dest_ctl ==
+ ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER) {
+ fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_NO;
+ fdir_fltr_ctx.qindex = 0;
} else {
if (input->dest_ctl ==
ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QGROUP)
@@ -441,7 +445,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
fdir_fltr_ctx.cnt_index = input->cnt_index;
fdir_fltr_ctx.fd_vsi = ice_get_hw_vsi_num(hw, input->dest_vsi);
fdir_fltr_ctx.evict_ena = ICE_FXD_FLTR_QW0_EVICT_ENA_FALSE;
- fdir_fltr_ctx.toq_prio = 3;
+ if (input->dest_ctl == ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER)
+ fdir_fltr_ctx.toq_prio = 0;
+ else
+ fdir_fltr_ctx.toq_prio = 3;
fdir_fltr_ctx.pcmd = (add) ? ICE_FXD_FLTR_QW1_PCMD_ADD :
ICE_FXD_FLTR_QW1_PCMD_REMOVE;
fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 442295e59d..5a791610f8 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1499,8 +1499,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
dest_num++;
filter->input.dest_ctl =
- ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QINDEX;
- filter->input.q_index = 0;
+ ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER;
break;
case RTE_FLOW_ACTION_TYPE_RSS:
dest_num++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.938317194 +0000
+++ 0022-net-ice-fix-flow-director-passthru.patch 2020-02-17 17:00:15.311950512 +0000
@@ -1,13 +1,14 @@
-From 0d14c49b282196f48d63da0e34d1a20cdfc6e3a8 Mon Sep 17 00:00:00 2001
+From 6a3de06023c9301132cb3fce90ed3725f3c0b4aa Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Tue, 21 Jan 2020 10:25:59 +0800
Subject: [PATCH] net/ice: fix flow director passthru
+[ upstream commit 0d14c49b282196f48d63da0e34d1a20cdfc6e3a8 ]
+
The original PASSTHRU implementation is forwarding to queue 0. The
corrected implementation is forwarding to the next stage filter.
Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
-Cc: stable@dpdk.org
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
-index 56c1c1c845..ba002586b6 100644
+index 551c7a6bc6..8e5aef8a38 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
-@@ -401,6 +401,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -430,6 +430,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
if (input->dest_ctl == ICE_FLTR_PRGM_DESC_DEST_DROP_PKT) {
fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_YES;
fdir_fltr_ctx.qindex = 0;
@@ -31,7 +32,7 @@
} else {
if (input->dest_ctl ==
ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QGROUP)
-@@ -412,7 +416,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
+@@ -441,7 +445,10 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
fdir_fltr_ctx.cnt_index = input->cnt_index;
fdir_fltr_ctx.fd_vsi = ice_get_hw_vsi_num(hw, input->dest_vsi);
fdir_fltr_ctx.evict_ena = ICE_FXD_FLTR_QW0_EVICT_ENA_FALSE;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/netvsc: initialize link state' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (20 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix flow director passthru' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix legacy multi-packet write session' " luca.boccassi
` (30 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Mohammed Gamal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 9aa8b8db6e7c15b9056d324019176179db7bc166 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Feb 2020 10:08:16 -0800
Subject: [PATCH] net/netvsc: initialize link state
[ upstream commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891 ]
If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Mohammed Gamal <mgamal@redhat.com>
---
drivers/net/netvsc/hn_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index c79f924379..564620748d 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -823,6 +823,10 @@ hn_dev_start(struct rte_eth_dev *dev)
if (error)
hn_rndis_set_rxfilter(hv, 0);
+ /* Initialize Link state */
+ if (error == 0)
+ hn_dev_link_update(dev, 0);
+
return error;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.963479684 +0000
+++ 0023-net-netvsc-initialize-link-state.patch 2020-02-17 17:00:15.311950512 +0000
@@ -1,14 +1,15 @@
-From 047ad3787a2f5d99277e0d8d756580a1d5ea2891 Mon Sep 17 00:00:00 2001
+From 9aa8b8db6e7c15b9056d324019176179db7bc166 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Feb 2020 10:08:16 -0800
Subject: [PATCH] net/netvsc: initialize link state
+[ upstream commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891 ]
+
If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix legacy multi-packet write session' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (21 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " luca.boccassi
` (29 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2fa4a87b409237f05dfb9586c03e28dcf47f93d3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sun, 9 Feb 2020 22:54:53 +0000
Subject: [PATCH] net/mlx5: fix legacy multi-packet write session
[ upstream commit 7593cf1d3500dfce7c9faacfc01f5797556b6a80 ]
To provide the better PCIe bandwidth utilization the ConnectX-4LX
NIC supports the multi-packet write (MPW) sessions allowing to
pack multiple packets into one descriptor (WQE). This is legacy
feature and it has some limitations on the packets and data
description segments. To provide the best performance all inline
packets must be put into shared data segment and the total length
of MPW session must be limited. The limit is controlled with
txq_inline_mpw devarg.
Fixes: 82e75f8323bf ("net/mlx5: fix legacy multi-packet Tx descriptors")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_prm.h | 2 +-
drivers/net/mlx5/mlx5_rxtx.c | 91 +++++++++++++++++++++++++++++++-----
2 files changed, 81 insertions(+), 12 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index a805363757..9f1d122df0 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -100,7 +100,7 @@
*/
#define MLX5_EMPW_MAX_PACKETS MLX5_TX_COMP_THRESH
#define MLX5_MPW_MAX_PACKETS 6
-#define MLX5_MPW_INLINE_MAX_PACKETS 2
+#define MLX5_MPW_INLINE_MAX_PACKETS 6
/*
* Default packet length threshold to be inlined with
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 67cafd1e2c..a69729f010 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2821,8 +2821,14 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
unsigned int part;
uint8_t *pdst;
- dseg->bcount = rte_cpu_to_be_32(len | MLX5_ETH_WQE_DATA_INLINE);
- pdst = &dseg->inline_data[0];
+ if (!MLX5_TXOFF_CONFIG(MPW)) {
+ /* Store the descriptor byte counter for eMPW sessions. */
+ dseg->bcount = rte_cpu_to_be_32(len | MLX5_ETH_WQE_DATA_INLINE);
+ pdst = &dseg->inline_data[0];
+ } else {
+ /* The entire legacy MPW session counter is stored on close. */
+ pdst = (uint8_t *)dseg;
+ }
/*
* The WQEBB space availability is checked by caller.
* Here we should be aware of WQE ring buffer wraparound only.
@@ -2834,7 +2840,8 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
len -= part;
if (likely(!len)) {
pdst += part;
- pdst = RTE_PTR_ALIGN(pdst, MLX5_WSEG_SIZE);
+ if (!MLX5_TXOFF_CONFIG(MPW))
+ pdst = RTE_PTR_ALIGN(pdst, MLX5_WSEG_SIZE);
/* Note: no final wraparound check here. */
return (struct mlx5_wqe_dseg *)pdst;
}
@@ -2882,9 +2889,16 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
static_assert(MLX5_DSEG_MIN_INLINE_SIZE ==
(2 * RTE_ETHER_ADDR_LEN),
"invalid Data Segment data size");
- dseg->bcount = rte_cpu_to_be_32((len + sizeof(struct rte_vlan_hdr)) |
- MLX5_ETH_WQE_DATA_INLINE);
- pdst = &dseg->inline_data[0];
+ if (!MLX5_TXOFF_CONFIG(MPW)) {
+ /* Store the descriptor byte counter for eMPW sessions. */
+ dseg->bcount = rte_cpu_to_be_32
+ ((len + sizeof(struct rte_vlan_hdr)) |
+ MLX5_ETH_WQE_DATA_INLINE);
+ pdst = &dseg->inline_data[0];
+ } else {
+ /* The entire legacy MPW session counter is stored on close. */
+ pdst = (uint8_t *)dseg;
+ }
memcpy(pdst, buf, MLX5_DSEG_MIN_INLINE_SIZE);
buf += MLX5_DSEG_MIN_INLINE_SIZE;
pdst += MLX5_DSEG_MIN_INLINE_SIZE;
@@ -2907,7 +2921,8 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
len -= part;
if (likely(!len)) {
pdst += part;
- pdst = RTE_PTR_ALIGN(pdst, MLX5_WSEG_SIZE);
+ if (!MLX5_TXOFF_CONFIG(MPW))
+ pdst = RTE_PTR_ALIGN(pdst, MLX5_WSEG_SIZE);
/* Note: no final wraparound check here. */
return (struct mlx5_wqe_dseg *)pdst;
}
@@ -3790,15 +3805,33 @@ mlx5_tx_idone_empw(struct mlx5_txq_data *restrict txq,
unsigned int slen,
unsigned int olx __rte_unused)
{
+ struct mlx5_wqe_dseg *dseg = &loc->wqe_last->dseg[0];
+
assert(MLX5_TXOFF_CONFIG(INLINE));
- assert((len % MLX5_WSEG_SIZE) == 0);
#ifdef MLX5_PMD_SOFT_COUNTERS
/* Update sent data bytes counter. */
txq->stats.obytes += slen;
#else
(void)slen;
#endif
- len = len / MLX5_WSEG_SIZE + 2;
+ if (MLX5_TXOFF_CONFIG(MPW) && dseg->bcount == RTE_BE32(0)) {
+ /*
+ * If the legacy MPW session contains the inline packets
+ * we should set the only inline data segment length
+ * and align the total length to the segment size.
+ */
+ assert(len > sizeof(dseg->bcount));
+ dseg->bcount = rte_cpu_to_be_32((len - sizeof(dseg->bcount)) |
+ MLX5_ETH_WQE_DATA_INLINE);
+ len = (len + MLX5_WSEG_SIZE - 1) / MLX5_WSEG_SIZE + 2;
+ } else {
+ /*
+ * The session is not legacy MPW or contains the
+ * data buffer pointer segments.
+ */
+ assert((len % MLX5_WSEG_SIZE) == 0);
+ len = len / MLX5_WSEG_SIZE + 2;
+ }
loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | len);
txq->wqe_ci += (len + 3) / 4;
loc->wqe_free -= (len + 3) / 4;
@@ -4077,6 +4110,15 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
loc->wqe_free) * MLX5_WQE_SIZE -
MLX5_WQE_CSEG_SIZE -
MLX5_WQE_ESEG_SIZE;
+ /* Limit the room for legacy MPW sessions for performance. */
+ if (MLX5_TXOFF_CONFIG(MPW))
+ room = RTE_MIN(room,
+ RTE_MAX(txq->inlen_empw +
+ sizeof(dseg->bcount) +
+ (MLX5_TXOFF_CONFIG(VLAN) ?
+ sizeof(struct rte_vlan_hdr) : 0),
+ MLX5_MPW_INLINE_MAX_PACKETS *
+ MLX5_WQE_DSEG_SIZE));
/* Build WQE till we have space, packets and resources. */
part = room;
for (;;) {
@@ -4106,8 +4148,26 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
/* Inline or not inline - that's the Question. */
if (dlen > txq->inlen_empw)
goto pointer_empw;
+ if (MLX5_TXOFF_CONFIG(MPW)) {
+ tlen = dlen;
+ if (part == room) {
+ /* Open new inline MPW session. */
+ tlen += sizeof(dseg->bcount);
+ dseg->bcount = RTE_BE32(0);
+ dseg = RTE_PTR_ADD
+ (dseg, sizeof(dseg->bcount));
+ } else {
+ /*
+ * No pointer and inline descriptor
+ * intermix for legacy MPW sessions.
+ */
+ if (loc->wqe_last->dseg[0].bcount)
+ break;
+ }
+ } else {
+ tlen = sizeof(dseg->bcount) + dlen;
+ }
/* Inline entire packet, optional VLAN insertion. */
- tlen = sizeof(dseg->bcount) + dlen;
if (MLX5_TXOFF_CONFIG(VLAN) &&
loc->mbuf->ol_flags & PKT_TX_VLAN_PKT) {
/*
@@ -4132,7 +4192,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
dseg = mlx5_tx_dseg_empw(txq, loc, dseg,
dptr, dlen, olx);
}
- tlen = RTE_ALIGN(tlen, MLX5_WSEG_SIZE);
+ if (!MLX5_TXOFF_CONFIG(MPW))
+ tlen = RTE_ALIGN(tlen, MLX5_WSEG_SIZE);
assert(room >= tlen);
room -= tlen;
/*
@@ -4142,6 +4203,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
rte_pktmbuf_free_seg(loc->mbuf);
goto next_mbuf;
pointer_empw:
+ /*
+ * No pointer and inline descriptor
+ * intermix for legacy MPW sessions.
+ */
+ if (MLX5_TXOFF_CONFIG(MPW) &&
+ part != room &&
+ loc->wqe_last->dseg[0].bcount == RTE_BE32(0))
+ break;
/*
* Not inlinable VLAN packets are
* proceeded outside of this routine.
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:15.988041003 +0000
+++ 0024-net-mlx5-fix-legacy-multi-packet-write-session.patch 2020-02-17 17:00:15.315950569 +0000
@@ -1,8 +1,10 @@
-From 7593cf1d3500dfce7c9faacfc01f5797556b6a80 Mon Sep 17 00:00:00 2001
+From 2fa4a87b409237f05dfb9586c03e28dcf47f93d3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sun, 9 Feb 2020 22:54:53 +0000
Subject: [PATCH] net/mlx5: fix legacy multi-packet write session
+[ upstream commit 7593cf1d3500dfce7c9faacfc01f5797556b6a80 ]
+
To provide the better PCIe bandwidth utilization the ConnectX-4LX
NIC supports the multi-packet write (MPW) sessions allowing to
pack multiple packets into one descriptor (WQE). This is legacy
@@ -13,19 +15,18 @@
txq_inline_mpw devarg.
Fixes: 82e75f8323bf ("net/mlx5: fix legacy multi-packet Tx descriptors")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
- drivers/common/mlx5/mlx5_prm.h | 2 +-
- drivers/net/mlx5/mlx5_rxtx.c | 91 ++++++++++++++++++++++++++++++----
+ drivers/net/mlx5/mlx5_prm.h | 2 +-
+ drivers/net/mlx5/mlx5_rxtx.c | 91 +++++++++++++++++++++++++++++++-----
2 files changed, 81 insertions(+), 12 deletions(-)
-diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
-index 855b37aff1..4ac3d4bd50 100644
---- a/drivers/common/mlx5/mlx5_prm.h
-+++ b/drivers/common/mlx5/mlx5_prm.h
+diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
+index a805363757..9f1d122df0 100644
+--- a/drivers/net/mlx5/mlx5_prm.h
++++ b/drivers/net/mlx5/mlx5_prm.h
@@ -100,7 +100,7 @@
*/
#define MLX5_EMPW_MAX_PACKETS MLX5_TX_COMP_THRESH
@@ -36,10 +37,10 @@
/*
* Default packet length threshold to be inlined with
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 5eea932d44..b55db4fa74 100644
+index 67cafd1e2c..a69729f010 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -2949,8 +2949,14 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
+@@ -2821,8 +2821,14 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
unsigned int part;
uint8_t *pdst;
@@ -56,7 +57,7 @@
/*
* The WQEBB space availability is checked by caller.
* Here we should be aware of WQE ring buffer wraparound only.
-@@ -2962,7 +2968,8 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
+@@ -2834,7 +2840,8 @@ mlx5_tx_dseg_empw(struct mlx5_txq_data *restrict txq,
len -= part;
if (likely(!len)) {
pdst += part;
@@ -66,7 +67,7 @@
/* Note: no final wraparound check here. */
return (struct mlx5_wqe_dseg *)pdst;
}
-@@ -3010,9 +3017,16 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
+@@ -2882,9 +2889,16 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
static_assert(MLX5_DSEG_MIN_INLINE_SIZE ==
(2 * RTE_ETHER_ADDR_LEN),
"invalid Data Segment data size");
@@ -86,7 +87,7 @@
memcpy(pdst, buf, MLX5_DSEG_MIN_INLINE_SIZE);
buf += MLX5_DSEG_MIN_INLINE_SIZE;
pdst += MLX5_DSEG_MIN_INLINE_SIZE;
-@@ -3035,7 +3049,8 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
+@@ -2907,7 +2921,8 @@ mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq,
len -= part;
if (likely(!len)) {
pdst += part;
@@ -96,14 +97,14 @@
/* Note: no final wraparound check here. */
return (struct mlx5_wqe_dseg *)pdst;
}
-@@ -3921,15 +3936,33 @@ mlx5_tx_idone_empw(struct mlx5_txq_data *restrict txq,
+@@ -3790,15 +3805,33 @@ mlx5_tx_idone_empw(struct mlx5_txq_data *restrict txq,
unsigned int slen,
unsigned int olx __rte_unused)
{
+ struct mlx5_wqe_dseg *dseg = &loc->wqe_last->dseg[0];
+
- MLX5_ASSERT(MLX5_TXOFF_CONFIG(INLINE));
-- MLX5_ASSERT((len % MLX5_WSEG_SIZE) == 0);
+ assert(MLX5_TXOFF_CONFIG(INLINE));
+- assert((len % MLX5_WSEG_SIZE) == 0);
#ifdef MLX5_PMD_SOFT_COUNTERS
/* Update sent data bytes counter. */
txq->stats.obytes += slen;
@@ -117,7 +118,7 @@
+ * we should set the only inline data segment length
+ * and align the total length to the segment size.
+ */
-+ MLX5_ASSERT(len > sizeof(dseg->bcount));
++ assert(len > sizeof(dseg->bcount));
+ dseg->bcount = rte_cpu_to_be_32((len - sizeof(dseg->bcount)) |
+ MLX5_ETH_WQE_DATA_INLINE);
+ len = (len + MLX5_WSEG_SIZE - 1) / MLX5_WSEG_SIZE + 2;
@@ -126,13 +127,13 @@
+ * The session is not legacy MPW or contains the
+ * data buffer pointer segments.
+ */
-+ MLX5_ASSERT((len % MLX5_WSEG_SIZE) == 0);
++ assert((len % MLX5_WSEG_SIZE) == 0);
+ len = len / MLX5_WSEG_SIZE + 2;
+ }
loc->wqe_last->cseg.sq_ds = rte_cpu_to_be_32(txq->qp_num_8s | len);
txq->wqe_ci += (len + 3) / 4;
loc->wqe_free -= (len + 3) / 4;
-@@ -4208,6 +4241,15 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
+@@ -4077,6 +4110,15 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
loc->wqe_free) * MLX5_WQE_SIZE -
MLX5_WQE_CSEG_SIZE -
MLX5_WQE_ESEG_SIZE;
@@ -148,9 +149,9 @@
/* Build WQE till we have space, packets and resources. */
part = room;
for (;;) {
-@@ -4238,8 +4280,26 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
- if (dlen > txq->inlen_empw ||
- loc->mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
+@@ -4106,8 +4148,26 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
+ /* Inline or not inline - that's the Question. */
+ if (dlen > txq->inlen_empw)
goto pointer_empw;
+ if (MLX5_TXOFF_CONFIG(MPW)) {
+ tlen = dlen;
@@ -176,17 +177,17 @@
if (MLX5_TXOFF_CONFIG(VLAN) &&
loc->mbuf->ol_flags & PKT_TX_VLAN_PKT) {
/*
-@@ -4265,7 +4325,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
+@@ -4132,7 +4192,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
dseg = mlx5_tx_dseg_empw(txq, loc, dseg,
dptr, dlen, olx);
}
- tlen = RTE_ALIGN(tlen, MLX5_WSEG_SIZE);
+ if (!MLX5_TXOFF_CONFIG(MPW))
+ tlen = RTE_ALIGN(tlen, MLX5_WSEG_SIZE);
- MLX5_ASSERT(room >= tlen);
+ assert(room >= tlen);
room -= tlen;
/*
-@@ -4275,6 +4336,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
+@@ -4142,6 +4203,14 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
rte_pktmbuf_free_seg(loc->mbuf);
goto next_mbuf;
pointer_empw:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: remove dead code' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (22 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix legacy multi-packet write session' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: fix txonly flow generation entropy' " luca.boccassi
` (28 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Shougang Wang; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6cb0c7297fb01dc1fcf5d2910875b8986c0ee912 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 11 Feb 2020 09:26:22 +0000
Subject: [PATCH] net/ixgbe: remove dead code
[ upstream commit e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a ]
This patch fixes (Logically dead code) coverity issue.
Coverity issue: 353624
Fixes: ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD")
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b2f723f0b6..1646b217a1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4125,12 +4125,9 @@ static int
ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
{
#ifdef RTE_EXEC_ENV_FREEBSD
- const int nb_iter = 25;
-#else
- const int nb_iter = 0;
-#endif
int err, i, link_up = 0;
uint32_t speed = 0;
+ const int nb_iter = 25;
for (i = 0; i < nb_iter; i++) {
err = ixgbe_check_link(hw, &speed, &link_up, 0);
@@ -4140,7 +4137,12 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
return 0;
msec_delay(200);
}
+
return 0;
+#else
+ RTE_SET_USED(hw);
+ return 0;
+#endif
}
/* return 0 means link status changed, -1 means not changed */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.019010063 +0000
+++ 0025-net-ixgbe-remove-dead-code.patch 2020-02-17 17:00:15.323950682 +0000
@@ -1,13 +1,14 @@
-From e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a Mon Sep 17 00:00:00 2001
+From 6cb0c7297fb01dc1fcf5d2910875b8986c0ee912 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 11 Feb 2020 09:26:22 +0000
Subject: [PATCH] net/ixgbe: remove dead code
+[ upstream commit e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a ]
+
This patch fixes (Logically dead code) coverity issue.
Coverity issue: 353624
Fixes: ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD")
-Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -16,10 +17,10 @@
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 7ea1962f60..2a248a3f27 100644
+index b2f723f0b6..1646b217a1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4128,13 +4128,10 @@ static int
+@@ -4125,12 +4125,9 @@ static int
ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
{
#ifdef RTE_EXEC_ENV_FREEBSD
@@ -27,14 +28,13 @@
-#else
- const int nb_iter = 0;
-#endif
- int err, i;
- bool link_up = false;
+ int err, i, link_up = 0;
uint32_t speed = 0;
+ const int nb_iter = 25;
for (i = 0; i < nb_iter; i++) {
err = ixgbe_check_link(hw, &speed, &link_up, 0);
-@@ -4144,7 +4141,12 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
+@@ -4140,7 +4137,12 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw)
return 0;
msec_delay(200);
}
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix txonly flow generation entropy' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (23 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix blocker for push VLAN on Rx' " luca.boccassi
` (27 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7b6cf048069f44735326a74cdc56d43e86d2ad84 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sun, 9 Feb 2020 17:02:39 +0000
Subject: [PATCH] app/testpmd: fix txonly flow generation entropy
[ upstream commit 0eb89ba9f49f3f5979a974b9208100eed36c382e ]
The testpmd application in txonly forwarding mode has an option
to generate the packet flows by varying the destination IP address.
The patch increments the IP for each packet sent, this improves
the entropy and RSS distribution on the peer receiving size
is getting more uniform.
Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/txonly.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index d42a157f8f..8ed436def5 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -153,7 +153,6 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
const uint16_t vlan_tci_outer, const uint64_t ol_flags)
{
struct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT];
- uint8_t ip_var = RTE_PER_LCORE(_ip_var);
struct rte_mbuf *pkt_seg;
uint32_t nb_segs, pkt_len;
uint8_t i;
@@ -192,6 +191,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt,
sizeof(struct rte_ether_hdr));
if (txonly_multi_flow) {
+ uint8_t ip_var = RTE_PER_LCORE(_ip_var);
struct rte_ipv4_hdr *ip_hdr;
uint32_t addr;
@@ -207,6 +207,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
*/
addr = (tx_ip_dst_addr | (ip_var++ << 8)) + rte_lcore_id();
ip_hdr->src_addr = rte_cpu_to_be_32(addr);
+ RTE_PER_LCORE(_ip_var) = ip_var;
}
copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
sizeof(struct rte_ether_hdr) +
@@ -314,7 +315,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
fs->tx_packets += nb_tx;
if (txonly_multi_flow)
- RTE_PER_LCORE(_ip_var) += nb_tx;
+ RTE_PER_LCORE(_ip_var) -= nb_pkt - nb_tx;
#ifdef RTE_TEST_PMD_RECORD_BURST_STATS
fs->tx_burst_stats.pkt_burst_spread[nb_tx]++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.051158752 +0000
+++ 0026-app-testpmd-fix-txonly-flow-generation-entropy.patch 2020-02-17 17:00:15.323950682 +0000
@@ -1,8 +1,10 @@
-From 0eb89ba9f49f3f5979a974b9208100eed36c382e Mon Sep 17 00:00:00 2001
+From 7b6cf048069f44735326a74cdc56d43e86d2ad84 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Sun, 9 Feb 2020 17:02:39 +0000
Subject: [PATCH] app/testpmd: fix txonly flow generation entropy
+[ upstream commit 0eb89ba9f49f3f5979a974b9208100eed36c382e ]
+
The testpmd application in txonly forwarding mode has an option
to generate the packet flows by varying the destination IP address.
The patch increments the IP for each packet sent, this improves
@@ -10,7 +12,6 @@
is getting more uniform.
Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -19,7 +20,7 @@
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
-index 4b5bec443b..8a1989fc96 100644
+index d42a157f8f..8ed436def5 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -153,7 +153,6 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
@@ -30,7 +31,7 @@
struct rte_mbuf *pkt_seg;
uint32_t nb_segs, pkt_len;
uint8_t i;
-@@ -193,6 +192,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
+@@ -192,6 +191,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt,
sizeof(struct rte_ether_hdr));
if (txonly_multi_flow) {
@@ -38,7 +39,7 @@
struct rte_ipv4_hdr *ip_hdr;
uint32_t addr;
-@@ -208,6 +208,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
+@@ -207,6 +207,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
*/
addr = (tx_ip_dst_addr | (ip_var++ << 8)) + rte_lcore_id();
ip_hdr->src_addr = rte_cpu_to_be_32(addr);
@@ -46,7 +47,7 @@
}
copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
sizeof(struct rte_ether_hdr) +
-@@ -315,7 +316,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
+@@ -314,7 +315,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
fs->tx_packets += nb_tx;
if (txonly_multi_flow)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix blocker for push VLAN on Rx' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (24 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: fix txonly flow generation entropy' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " luca.boccassi
` (26 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Wisam Jaddo; +Cc: Raslan Darawsheh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From fb0f14db3a4b2d83992e974abc2e9c9c6df7cba5 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Tue, 11 Feb 2020 15:20:06 +0200
Subject: [PATCH] net/mlx5: fix blocker for push VLAN on Rx
[ upstream commit a262726ed482f3c9fba493d0bfc3b4bd53d4c432 ]
The blocker should take FDB into consideration, since FDB all directions
have transfer ingress in it.
Fixes: 55060e62e4d2 ("net/mlx5: block push VLAN action on Rx")
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index df5e279ff4..f2c5f87fde 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1617,7 +1617,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
{
const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
- if (attr->ingress)
+ if (!attr->transfer && attr->ingress)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
NULL,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.075988013 +0000
+++ 0027-net-mlx5-fix-blocker-for-push-VLAN-on-Rx.patch 2020-02-17 17:00:15.331950795 +0000
@@ -1,13 +1,14 @@
-From a262726ed482f3c9fba493d0bfc3b4bd53d4c432 Mon Sep 17 00:00:00 2001
+From fb0f14db3a4b2d83992e974abc2e9c9c6df7cba5 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Tue, 11 Feb 2020 15:20:06 +0200
Subject: [PATCH] net/mlx5: fix blocker for push VLAN on Rx
+[ upstream commit a262726ed482f3c9fba493d0bfc3b4bd53d4c432 ]
+
The blocker should take FDB into consideration, since FDB all directions
have transfer ingress in it.
Fixes: 55060e62e4d2 ("net/mlx5: block push VLAN action on Rx")
-Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
@@ -16,10 +17,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index ba88325730..d88daeccbc 100644
+index df5e279ff4..f2c5f87fde 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1746,7 +1746,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
+@@ -1617,7 +1617,7 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
{
const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (25 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix blocker for push VLAN on Rx' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix meter header modify before decap' " luca.boccassi
` (25 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Dekel Peled; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 10fb6382b1f886e6ac81125705f1f1583f42b95d Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 11 Feb 2020 13:05:11 +0200
Subject: [PATCH] net/mlx5: fix VLAN match for DV mode
[ upstream commit 00f75a40576b28aa5633d2cadd86f23c30c7d220 ]
Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
and untagged.
The solution is to use cvlan_tag bit.
If mask=1 and value=0 it matches on untagged traffic.
If mask=1 and value=1 it matches on tagged traffic.
This is the kernel implementation.
This patch updated MLX5 PMD to set cvlan_tag mask and value according
to flow rule contents.
This update is relevant when using DV flow engine (dv_flow_en=1).
See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.
Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
doc/guides/nics/mlx5.rst | 9 +++------
drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 18573cf6a0..e772369213 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -107,21 +107,18 @@ Limitations
process. If the external memory is registered by primary process but has
different virtual address in secondary process, unexpected error may happen.
-- Flow pattern without any specific vlan will match for vlan packets as well:
+- When using Verbs flow engine (``dv_flow_en`` = 0), flow pattern without any
+ specific VLAN will match for VLAN packets as well:
When VLAN spec is not specified in the pattern, the matching rule will be created with VLAN as a wild card.
Meaning, the flow rule::
flow create 0 ingress pattern eth / vlan vid is 3 / ipv4 / end ...
- Will only match vlan packets with vid=3. and the flow rules::
+ Will only match vlan packets with vid=3. and the flow rule::
flow create 0 ingress pattern eth / ipv4 / end ...
- Or::
-
- flow create 0 ingress pattern eth / vlan / ipv4 / end ...
-
Will match any ipv4 packet (VLAN included).
- VLAN pop offload command:
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f2c5f87fde..0d902f89fe 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4994,6 +4994,15 @@ flow_dv_translate_item_eth(void *matcher, void *key,
rte_be_to_cpu_16(eth_m->type));
l24_v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_v, ethertype);
*(uint16_t *)(l24_v) = eth_m->type & eth_v->type;
+ if (eth_v->type) {
+ /* When ethertype is present set mask for tagged VLAN. */
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
+ /* Set value for tagged VLAN if ethertype is 802.1Q. */
+ if (eth_v->type == RTE_BE16(RTE_ETHER_TYPE_VLAN) ||
+ eth_v->type == RTE_BE16(RTE_ETHER_TYPE_QINQ))
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag,
+ 1);
+ }
}
/**
@@ -5134,6 +5143,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
ipv4_m->hdr.next_proto_id);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
/**
@@ -5238,6 +5248,7 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
ipv6_m->hdr.proto);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv6_v->hdr.proto & ipv6_m->hdr.proto);
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
/**
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.107017625 +0000
+++ 0028-net-mlx5-fix-VLAN-match-for-DV-mode.patch 2020-02-17 17:00:15.339950909 +0000
@@ -1,8 +1,10 @@
-From 00f75a40576b28aa5633d2cadd86f23c30c7d220 Mon Sep 17 00:00:00 2001
+From 10fb6382b1f886e6ac81125705f1f1583f42b95d Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 11 Feb 2020 13:05:11 +0200
Subject: [PATCH] net/mlx5: fix VLAN match for DV mode
+[ upstream commit 00f75a40576b28aa5633d2cadd86f23c30c7d220 ]
+
Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
@@ -19,21 +21,19 @@
See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.
Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
- doc/guides/nics/mlx5.rst | 9 +++------
- doc/guides/rel_notes/release_20_02.rst | 1 +
- drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++++
- 3 files changed, 15 insertions(+), 6 deletions(-)
+ doc/guides/nics/mlx5.rst | 9 +++------
+ drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++++
+ 2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 2411fb3461..2ea4fa9546 100644
+index 18573cf6a0..e772369213 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
-@@ -110,21 +110,18 @@ Limitations
+@@ -107,21 +107,18 @@ Limitations
process. If the external memory is registered by primary process but has
different virtual address in secondary process, unexpected error may happen.
@@ -58,23 +58,11 @@
Will match any ipv4 packet (VLAN included).
- VLAN pop offload command:
-diff --git a/doc/guides/rel_notes/release_20_02.rst b/doc/guides/rel_notes/release_20_02.rst
-index 2d28a04ab6..3c7b5d71c0 100644
---- a/doc/guides/rel_notes/release_20_02.rst
-+++ b/doc/guides/rel_notes/release_20_02.rst
-@@ -118,6 +118,7 @@ New Features
-
- * Added support for RSS using L3/L4 source/destination only.
- * Added support for matching on GTP tunnel header item.
-+ * Removed limitation of matching on tagged/untagged packets (when using DV flow engine).
-
- * **Add new vDPA PMD based on Mellanox devices**
-
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index d88daeccbc..a9bb0b4f10 100644
+index f2c5f87fde..0d902f89fe 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5216,6 +5216,15 @@ flow_dv_translate_item_eth(void *matcher, void *key,
+@@ -4994,6 +4994,15 @@ flow_dv_translate_item_eth(void *matcher, void *key,
rte_be_to_cpu_16(eth_m->type));
l24_v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_v, ethertype);
*(uint16_t *)(l24_v) = eth_m->type & eth_v->type;
@@ -90,7 +78,7 @@
}
/**
-@@ -5356,6 +5365,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -5134,6 +5143,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
ipv4_m->hdr.next_proto_id);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
@@ -98,7 +86,7 @@
}
/**
-@@ -5460,6 +5470,7 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+@@ -5238,6 +5248,7 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
ipv6_m->hdr.proto);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv6_v->hdr.proto & ipv6_m->hdr.proto);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix meter header modify before decap' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (26 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix umem frame size and headroom' " luca.boccassi
` (24 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Suanming Mou
Cc: Tonghao Zhang, Viacheslav Ovsiienko, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e32739c056ce736ff67511b964181229e6a86d75 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Thu, 6 Feb 2020 06:14:25 +0200
Subject: [PATCH] net/mlx5: fix meter header modify before decap
[ upstream commit 431f199883e5b7eeea87a2f9f0272daf3354c1da ]
The meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets. The tag header modify action is added to the
prefix subflow to make the suffix subflow to match the packets from the
prefix subflow.
Currently, the tag header modify action is added at the beginning in the
prefix subflow even before decap action. The header modify action does
not make sense to the later decap action, so the flow create will be
validated as incorrect flow rule and failed.
Move the tag header modify action just before meter action in the prefix
subflow to make the flow with decap action to do the decap first, then
do the tag and meter to fix that issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 45df610a91..07979a09cb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3471,21 +3471,25 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
struct rte_flow_action actions_sfx[],
struct rte_flow_action actions_pre[])
{
- struct rte_flow_action *tag_action;
+ struct rte_flow_action *tag_action = NULL;
struct mlx5_rte_flow_action_set_tag *set_tag;
struct rte_flow_error error;
const struct rte_flow_action_raw_encap *raw_encap;
const struct rte_flow_action_raw_decap *raw_decap;
uint32_t tag_id;
- /* Add the extra tag action first. */
- tag_action = actions_pre;
- tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
- actions_pre++;
/* Prepare the actions for prefix and suffix flow. */
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
switch (actions->type) {
case RTE_FLOW_ACTION_TYPE_METER:
+ /* Add the extra tag action first. */
+ tag_action = actions_pre;
+ tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+ actions_pre++;
+ memcpy(actions_pre, actions,
+ sizeof(struct rte_flow_action));
+ actions_pre++;
+ break;
case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
memcpy(actions_pre, actions,
@@ -3540,6 +3544,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
*/
tag_id = flow_qrss_get_id(dev);
set_tag->data = rte_cpu_to_be_32(tag_id);
+ assert(tag_action);
tag_action->conf = set_tag;
return tag_id;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.139870279 +0000
+++ 0029-net-mlx5-fix-meter-header-modify-before-decap.patch 2020-02-17 17:00:15.347951022 +0000
@@ -1,8 +1,10 @@
-From 431f199883e5b7eeea87a2f9f0272daf3354c1da Mon Sep 17 00:00:00 2001
+From e32739c056ce736ff67511b964181229e6a86d75 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Thu, 6 Feb 2020 06:14:25 +0200
Subject: [PATCH] net/mlx5: fix meter header modify before decap
+[ upstream commit 431f199883e5b7eeea87a2f9f0272daf3354c1da ]
+
The meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
@@ -20,7 +22,6 @@
do the tag and meter to fix that issue.
Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
-Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
@@ -31,10 +32,10 @@
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index e05d7994e2..25482010d8 100644
+index 45df610a91..07979a09cb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -3476,21 +3476,25 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -3471,21 +3471,25 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
struct rte_flow_action actions_sfx[],
struct rte_flow_action actions_pre[])
{
@@ -65,10 +66,10 @@
case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
memcpy(actions_pre, actions,
-@@ -3545,6 +3549,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -3540,6 +3544,7 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
*/
tag_id = flow_qrss_get_id(dev);
- set_tag->data = tag_id << MLX5_MTR_COLOR_BITS;
+ set_tag->data = rte_cpu_to_be_32(tag_id);
+ assert(tag_action);
tag_action->conf = set_tag;
return tag_id;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: fix umem frame size and headroom' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (27 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix meter header modify before decap' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix fill queue addresses' " luca.boccassi
` (23 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4f343be652008ae7b7006c4a9b916668c186de00 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:12 +0000
Subject: [PATCH] net/af_xdp: fix umem frame size and headroom
[ upstream commit b79ae90c78a143605610ed5c7d59d42c0846847f ]
The previous frame size calculation incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size.
Instead of performing a manual calculation, use the
rte_mempool_calc_obj_size API to determine the frame size.
The previous frame headroom calculation also incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size or
the mbuf priv size. Fix this.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index d903e6c28a..348dbde5e6 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -34,6 +34,7 @@
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_memzone.h>
+#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_ring.h>
@@ -755,11 +756,13 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
void *base_addr = NULL;
struct rte_mempool *mb_pool = rxq->mb_pool;
- usr_config.frame_size = rte_pktmbuf_data_room_size(mb_pool) +
- ETH_AF_XDP_MBUF_OVERHEAD +
- mb_pool->private_data_size;
- usr_config.frame_headroom = ETH_AF_XDP_DATA_HEADROOM +
- mb_pool->private_data_size;
+ usr_config.frame_size = rte_mempool_calc_obj_size(mb_pool->elt_size,
+ mb_pool->flags,
+ NULL);
+ usr_config.frame_headroom = mb_pool->header_size +
+ sizeof(struct rte_mbuf) +
+ rte_pktmbuf_priv_size(mb_pool) +
+ RTE_PKTMBUF_HEADROOM;
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id());
if (umem == NULL) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.169058692 +0000
+++ 0030-net-af_xdp-fix-umem-frame-size-and-headroom.patch 2020-02-17 17:00:15.347951022 +0000
@@ -1,8 +1,10 @@
-From b79ae90c78a143605610ed5c7d59d42c0846847f Mon Sep 17 00:00:00 2001
+From 4f343be652008ae7b7006c4a9b916668c186de00 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:12 +0000
Subject: [PATCH] net/af_xdp: fix umem frame size and headroom
+[ upstream commit b79ae90c78a143605610ed5c7d59d42c0846847f ]
+
The previous frame size calculation incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size.
Instead of performing a manual calculation, use the
@@ -13,7 +15,6 @@
the mbuf priv size. Fix this.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -22,10 +23,10 @@
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index ed784dff19..111ab000cc 100644
+index d903e6c28a..348dbde5e6 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -33,6 +33,7 @@
+@@ -34,6 +34,7 @@
#include <rte_log.h>
#include <rte_memory.h>
#include <rte_memzone.h>
@@ -33,7 +34,7 @@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_ring.h>
-@@ -754,11 +755,13 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
+@@ -755,11 +756,13 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
void *base_addr = NULL;
struct rte_mempool *mb_pool = rxq->mb_pool;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: fix fill queue addresses' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (28 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix umem frame size and headroom' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix maximum MTU' " luca.boccassi
` (22 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 0a88b449453f744d638b5d8ef63a5d4f2d8eb3b7 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:13 +0000
Subject: [PATCH] net/af_xdp: fix fill queue addresses
[ upstream commit 96d8ae9990c0a213255b4dc45c53368ea2c92bfa ]
The fill queue addresses should start at the beginning of the mempool
object instead of the beginning of the mbuf. This is because the umem
frame headroom includes the mp hdrobj size. Starting at this point
ensures AF_XDP doesn't write past the available room in the frame, in
the case of larger packets which are close to the size of the mbuf.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 348dbde5e6..24c70473c3 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -172,7 +172,8 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,
uint64_t addr;
fq_addr = xsk_ring_prod__fill_addr(fq, idx++);
- addr = (uint64_t)bufs[i] - (uint64_t)umem->buffer;
+ addr = (uint64_t)bufs[i] - (uint64_t)umem->buffer -
+ umem->mb_pool->header_size;
*fq_addr = addr;
}
@@ -271,8 +272,11 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
addr = xsk_umem__extract_addr(addr);
bufs[i] = (struct rte_mbuf *)
- xsk_umem__get_data(umem->buffer, addr);
- bufs[i]->data_off = offset - sizeof(struct rte_mbuf);
+ xsk_umem__get_data(umem->buffer, addr +
+ umem->mb_pool->header_size);
+ bufs[i]->data_off = offset - sizeof(struct rte_mbuf) -
+ rte_pktmbuf_priv_size(umem->mb_pool) -
+ umem->mb_pool->header_size;
rte_pktmbuf_pkt_len(bufs[i]) = len;
rte_pktmbuf_data_len(bufs[i]) = len;
@@ -385,7 +389,8 @@ pull_umem_cq(struct xsk_umem_info *umem, int size)
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
addr = xsk_umem__extract_addr(addr);
rte_pktmbuf_free((struct rte_mbuf *)
- xsk_umem__get_data(umem->buffer, addr));
+ xsk_umem__get_data(umem->buffer,
+ addr + umem->mb_pool->header_size));
#else
rte_ring_enqueue(umem->buf_ring, (void *)addr);
#endif
@@ -443,9 +448,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
desc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);
desc->len = mbuf->pkt_len;
- addr = (uint64_t)mbuf - (uint64_t)umem->buffer;
+ addr = (uint64_t)mbuf - (uint64_t)umem->buffer -
+ umem->mb_pool->header_size;
offset = rte_pktmbuf_mtod(mbuf, uint64_t) -
- (uint64_t)mbuf;
+ (uint64_t)mbuf +
+ umem->mb_pool->header_size;
offset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;
desc->addr = addr | offset;
count++;
@@ -466,9 +473,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
desc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);
desc->len = mbuf->pkt_len;
- addr = (uint64_t)local_mbuf - (uint64_t)umem->buffer;
+ addr = (uint64_t)local_mbuf - (uint64_t)umem->buffer -
+ umem->mb_pool->header_size;
offset = rte_pktmbuf_mtod(local_mbuf, uint64_t) -
- (uint64_t)local_mbuf;
+ (uint64_t)local_mbuf +
+ umem->mb_pool->header_size;
pkt = xsk_umem__get_data(umem->buffer, addr + offset);
offset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;
desc->addr = addr | offset;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.194093620 +0000
+++ 0031-net-af_xdp-fix-fill-queue-addresses.patch 2020-02-17 17:00:15.347951022 +0000
@@ -1,8 +1,10 @@
-From 96d8ae9990c0a213255b4dc45c53368ea2c92bfa Mon Sep 17 00:00:00 2001
+From 0a88b449453f744d638b5d8ef63a5d4f2d8eb3b7 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:13 +0000
Subject: [PATCH] net/af_xdp: fix fill queue addresses
+[ upstream commit 96d8ae9990c0a213255b4dc45c53368ea2c92bfa ]
+
The fill queue addresses should start at the beginning of the mempool
object instead of the beginning of the mbuf. This is because the umem
frame headroom includes the mp hdrobj size. Starting at this point
@@ -10,7 +12,6 @@
the case of larger packets which are close to the size of the mbuf.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -19,10 +20,10 @@
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index 111ab000cc..a0edfc3cd3 100644
+index 348dbde5e6..24c70473c3 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -171,7 +171,8 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,
+@@ -172,7 +172,8 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,
uint64_t addr;
fq_addr = xsk_ring_prod__fill_addr(fq, idx++);
@@ -32,7 +33,7 @@
*fq_addr = addr;
}
-@@ -270,8 +271,11 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -271,8 +272,11 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
addr = xsk_umem__extract_addr(addr);
bufs[i] = (struct rte_mbuf *)
@@ -46,7 +47,7 @@
rte_pktmbuf_pkt_len(bufs[i]) = len;
rte_pktmbuf_data_len(bufs[i]) = len;
-@@ -384,7 +388,8 @@ pull_umem_cq(struct xsk_umem_info *umem, int size)
+@@ -385,7 +389,8 @@ pull_umem_cq(struct xsk_umem_info *umem, int size)
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
addr = xsk_umem__extract_addr(addr);
rte_pktmbuf_free((struct rte_mbuf *)
@@ -56,7 +57,7 @@
#else
rte_ring_enqueue(umem->buf_ring, (void *)addr);
#endif
-@@ -442,9 +447,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -443,9 +448,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
desc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);
desc->len = mbuf->pkt_len;
@@ -70,7 +71,7 @@
offset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;
desc->addr = addr | offset;
count++;
-@@ -465,9 +472,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -466,9 +473,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
desc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);
desc->len = mbuf->pkt_len;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/af_xdp: fix maximum MTU' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (29 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix fill queue addresses' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: rename meson variable for dlopen option' " luca.boccassi
` (21 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4517e8b0bee0870ca82fb76d93c0ff0d914e2e63 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:14 +0000
Subject: [PATCH] net/af_xdp: fix maximum MTU
[ upstream commit 1668e87d4d51e9f4c333dcafa0c3e189b1eaee35 ]
The maximum MTU for af_xdp zero copy is equal to the page size less the
frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame
headroom = 320). The patch updates this value to reflect this.
This change also makes it possible to remove unneeded constants for both
zero-copy and copy mode.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 24c70473c3..d75281c10d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -59,13 +59,6 @@ static int af_xdp_logtype;
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
-#ifdef XDP_UMEM_UNALIGNED_CHUNK_FLAG
-#define ETH_AF_XDP_MBUF_OVERHEAD 128 /* sizeof(struct rte_mbuf) */
-#define ETH_AF_XDP_DATA_HEADROOM \
- (ETH_AF_XDP_MBUF_OVERHEAD + RTE_PKTMBUF_HEADROOM)
-#else
-#define ETH_AF_XDP_DATA_HEADROOM 0
-#endif
#define ETH_AF_XDP_DFLT_NUM_DESCS XSK_RING_CONS__DEFAULT_NUM_DESCS
#define ETH_AF_XDP_DFLT_START_QUEUE_IDX 0
#define ETH_AF_XDP_DFLT_QUEUE_COUNT 1
@@ -602,7 +595,14 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_tx_queues = internals->queue_cnt;
dev_info->min_mtu = RTE_ETHER_MIN_MTU;
- dev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE - ETH_AF_XDP_DATA_HEADROOM;
+#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
+ dev_info->max_mtu = getpagesize() -
+ sizeof(struct rte_mempool_objhdr) -
+ sizeof(struct rte_mbuf) -
+ RTE_PKTMBUF_HEADROOM - XDP_PACKET_HEADROOM;
+#else
+ dev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE - XDP_PACKET_HEADROOM;
+#endif
dev_info->default_rxportconf.nb_queues = 1;
dev_info->default_txportconf.nb_queues = 1;
@@ -804,7 +804,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
.fill_size = ETH_AF_XDP_DFLT_NUM_DESCS,
.comp_size = ETH_AF_XDP_DFLT_NUM_DESCS,
.frame_size = ETH_AF_XDP_FRAME_SIZE,
- .frame_headroom = ETH_AF_XDP_DATA_HEADROOM };
+ .frame_headroom = 0 };
char ring_name[RTE_RING_NAMESIZE];
char mz_name[RTE_MEMZONE_NAMESIZE];
int ret;
@@ -829,8 +829,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
for (i = 0; i < ETH_AF_XDP_NUM_BUFFERS; i++)
rte_ring_enqueue(umem->buf_ring,
- (void *)(i * ETH_AF_XDP_FRAME_SIZE +
- ETH_AF_XDP_DATA_HEADROOM));
+ (void *)(i * ETH_AF_XDP_FRAME_SIZE));
snprintf(mz_name, sizeof(mz_name), "af_xdp_umem_%s_%u",
internals->if_name, rxq->xsk_queue_idx);
@@ -939,7 +938,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
/* Now get the space available for data in the mbuf */
buf_size = rte_pktmbuf_data_room_size(mb_pool) -
RTE_PKTMBUF_HEADROOM;
- data_size = ETH_AF_XDP_FRAME_SIZE - ETH_AF_XDP_DATA_HEADROOM;
+ data_size = ETH_AF_XDP_FRAME_SIZE;
if (data_size > buf_size) {
AF_XDP_LOG(ERR, "%s: %d bytes will not fit in mbuf (%d bytes)\n",
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.219819347 +0000
+++ 0032-net-af_xdp-fix-maximum-MTU.patch 2020-02-17 17:00:15.347951022 +0000
@@ -1,8 +1,10 @@
-From 1668e87d4d51e9f4c333dcafa0c3e189b1eaee35 Mon Sep 17 00:00:00 2001
+From 4517e8b0bee0870ca82fb76d93c0ff0d914e2e63 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 13 Feb 2020 08:49:14 +0000
Subject: [PATCH] net/af_xdp: fix maximum MTU
+[ upstream commit 1668e87d4d51e9f4c333dcafa0c3e189b1eaee35 ]
+
The maximum MTU for af_xdp zero copy is equal to the page size less the
frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame
headroom = 320). The patch updates this value to reflect this.
@@ -11,7 +13,6 @@
zero-copy and copy mode.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -20,10 +21,10 @@
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index a0edfc3cd3..06124ba789 100644
+index 24c70473c3..d75281c10d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -58,13 +58,6 @@ static int af_xdp_logtype;
+@@ -59,13 +59,6 @@ static int af_xdp_logtype;
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
@@ -37,7 +38,7 @@
#define ETH_AF_XDP_DFLT_NUM_DESCS XSK_RING_CONS__DEFAULT_NUM_DESCS
#define ETH_AF_XDP_DFLT_START_QUEUE_IDX 0
#define ETH_AF_XDP_DFLT_QUEUE_COUNT 1
-@@ -601,7 +594,14 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -602,7 +595,14 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_tx_queues = internals->queue_cnt;
dev_info->min_mtu = RTE_ETHER_MIN_MTU;
@@ -53,7 +54,7 @@
dev_info->default_rxportconf.nb_queues = 1;
dev_info->default_txportconf.nb_queues = 1;
-@@ -803,7 +803,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -804,7 +804,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
.fill_size = ETH_AF_XDP_DFLT_NUM_DESCS,
.comp_size = ETH_AF_XDP_DFLT_NUM_DESCS,
.frame_size = ETH_AF_XDP_FRAME_SIZE,
@@ -62,7 +63,7 @@
char ring_name[RTE_RING_NAMESIZE];
char mz_name[RTE_MEMZONE_NAMESIZE];
int ret;
-@@ -828,8 +828,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -829,8 +829,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
for (i = 0; i < ETH_AF_XDP_NUM_BUFFERS; i++)
rte_ring_enqueue(umem->buf_ring,
@@ -72,7 +73,7 @@
snprintf(mz_name, sizeof(mz_name), "af_xdp_umem_%s_%u",
internals->if_name, rxq->xsk_queue_idx);
-@@ -938,7 +937,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -939,7 +938,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
/* Now get the space available for data in the mbuf */
buf_size = rte_pktmbuf_data_room_size(mb_pool) -
RTE_PKTMBUF_HEADROOM;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx: rename meson variable for dlopen option' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (30 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix maximum MTU' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: add static ibverbs linkage with meson' " luca.boccassi
` (20 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5ae81a0f9dec5e7ede7eeda24159d4e72486184f Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:07 +0100
Subject: [PATCH] net/mlx: rename meson variable for dlopen option
[ upstream commit 76c72a34bb0aa174fea2fa4978550603e154357f ]
The name of the variable pmd_dlopen is confusing because
it can be understood as true if the PMD is dlopen,
whereas it means the ibverbs glue layer is a dlopen library.
That's why it is renamed dlopen_ibverbs.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/mlx4/meson.build | 8 ++++----
drivers/net/mlx5/meson.build | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 9eb4988420..4f16950a4a 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -9,11 +9,11 @@ if not is_linux
endif
build = true
-pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
+dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
LIB_GLUE_VERSION = '18.02.0'
LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-if pmd_dlopen
+if dlopen_ibverbs
dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
cflags += [
'-DMLX4_GLUE="@0@"'.format(LIB_GLUE),
@@ -51,7 +51,7 @@ if build
'mlx4_txq.c',
'mlx4_utils.c',
)
- if not pmd_dlopen
+ if not dlopen_ibverbs
sources += files('mlx4_glue.c')
endif
cflags_options = [
@@ -103,7 +103,7 @@ if build
configure_file(output : 'mlx4_autoconf.h', configuration : config)
endif
# Build Glue Library
-if pmd_dlopen and build
+if dlopen_ibverbs and build
dlopen_name = 'mlx4_glue'
dlopen_lib_name = driver_name_fmt.format(dlopen_name)
dlopen_so_version = LIB_GLUE_VERSION
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index d6b32db794..1b4f6cf831 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,11 +9,11 @@ if not is_linux
endif
build = true
-pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
+dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
LIB_GLUE_VERSION = '19.08.0'
LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-if pmd_dlopen
+if dlopen_ibverbs
dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
cflags += [
'-DMLX5_GLUE="@0@"'.format(LIB_GLUE),
@@ -67,7 +67,7 @@ if build
or dpdk_conf.has('RTE_ARCH_PPC_64'))
sources += files('mlx5_rxtx_vec.c')
endif
- if not pmd_dlopen
+ if not dlopen_ibverbs
sources += files('mlx5_glue.c')
endif
cflags_options = [
@@ -200,7 +200,7 @@ if build
configure_file(output : 'mlx5_autoconf.h', configuration : config)
endif
# Build Glue Library
-if pmd_dlopen and build
+if dlopen_ibverbs and build
dlopen_name = 'mlx5_glue'
dlopen_lib_name = driver_name_fmt.format(dlopen_name)
dlopen_so_version = LIB_GLUE_VERSION
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.244606857 +0000
+++ 0033-net-mlx-rename-meson-variable-for-dlopen-option.patch 2020-02-17 17:00:15.351951079 +0000
@@ -1,8 +1,10 @@
-From 76c72a34bb0aa174fea2fa4978550603e154357f Mon Sep 17 00:00:00 2001
+From 5ae81a0f9dec5e7ede7eeda24159d4e72486184f Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:07 +0100
Subject: [PATCH] net/mlx: rename meson variable for dlopen option
+[ upstream commit 76c72a34bb0aa174fea2fa4978550603e154357f ]
+
The name of the variable pmd_dlopen is confusing because
it can be understood as true if the PMD is dlopen,
whereas it means the ibverbs glue layer is a dlopen library.
@@ -11,80 +13,80 @@
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
- drivers/common/mlx5/meson.build | 8 ++++----
- drivers/net/mlx4/meson.build | 8 ++++----
+ drivers/net/mlx4/meson.build | 8 ++++----
+ drivers/net/mlx5/meson.build | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
-diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
-index 089494e1f8..ea98e61fcd 100644
---- a/drivers/common/mlx5/meson.build
-+++ b/drivers/common/mlx5/meson.build
-@@ -8,11 +8,11 @@ if not is_linux
+diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
+index 9eb4988420..4f16950a4a 100644
+--- a/drivers/net/mlx4/meson.build
++++ b/drivers/net/mlx4/meson.build
+@@ -9,11 +9,11 @@ if not is_linux
endif
+ build = true
- static_ibverbs = (get_option('ibverbs_link') == 'static')
-pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
+dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
- LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
- LIB_GLUE_VERSION = '20.02.0'
+ LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
+ LIB_GLUE_VERSION = '18.02.0'
LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-if pmd_dlopen
+if dlopen_ibverbs
dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
cflags += [
- '-DMLX5_GLUE="@0@"'.format(LIB_GLUE),
-@@ -54,7 +54,7 @@ sources = files(
- 'mlx5_common.c',
- 'mlx5_nl.c',
- )
--if not pmd_dlopen
-+if not dlopen_ibverbs
- sources += files('mlx5_glue.c')
+ '-DMLX4_GLUE="@0@"'.format(LIB_GLUE),
+@@ -51,7 +51,7 @@ if build
+ 'mlx4_txq.c',
+ 'mlx4_utils.c',
+ )
+- if not pmd_dlopen
++ if not dlopen_ibverbs
+ sources += files('mlx4_glue.c')
+ endif
+ cflags_options = [
+@@ -103,7 +103,7 @@ if build
+ configure_file(output : 'mlx4_autoconf.h', configuration : config)
endif
- cflags_options = [
-@@ -193,7 +193,7 @@ endforeach
- configure_file(output : 'mlx5_autoconf.h', configuration : config)
-
# Build Glue Library
--if pmd_dlopen
-+if dlopen_ibverbs
- dlopen_name = 'mlx5_glue'
- dlopen_lib_name = 'rte_pmd_@0@'.format(dlopen_name)
+-if pmd_dlopen and build
++if dlopen_ibverbs and build
+ dlopen_name = 'mlx4_glue'
+ dlopen_lib_name = driver_name_fmt.format(dlopen_name)
dlopen_so_version = LIB_GLUE_VERSION
-diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
-index 290bd1e268..f66e70f4d1 100644
---- a/drivers/net/mlx4/meson.build
-+++ b/drivers/net/mlx4/meson.build
+diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
+index d6b32db794..1b4f6cf831 100644
+--- a/drivers/net/mlx5/meson.build
++++ b/drivers/net/mlx5/meson.build
@@ -9,11 +9,11 @@ if not is_linux
endif
+ build = true
- static_ibverbs = (get_option('ibverbs_link') == 'static')
-pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
+dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
- LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
- LIB_GLUE_VERSION = '18.02.0'
+ LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
+ LIB_GLUE_VERSION = '19.08.0'
LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-if pmd_dlopen
+if dlopen_ibverbs
dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
cflags += [
- '-DMLX4_GLUE="@0@"'.format(LIB_GLUE),
-@@ -61,7 +61,7 @@ sources = files(
- 'mlx4_txq.c',
- 'mlx4_utils.c',
- )
--if not pmd_dlopen
-+if not dlopen_ibverbs
- sources += files('mlx4_glue.c')
+ '-DMLX5_GLUE="@0@"'.format(LIB_GLUE),
+@@ -67,7 +67,7 @@ if build
+ or dpdk_conf.has('RTE_ARCH_PPC_64'))
+ sources += files('mlx5_rxtx_vec.c')
+ endif
+- if not pmd_dlopen
++ if not dlopen_ibverbs
+ sources += files('mlx5_glue.c')
+ endif
+ cflags_options = [
+@@ -200,7 +200,7 @@ if build
+ configure_file(output : 'mlx5_autoconf.h', configuration : config)
endif
- cflags_options = [
-@@ -113,7 +113,7 @@ endforeach
- configure_file(output : 'mlx4_autoconf.h', configuration : config)
-
# Build Glue Library
--if pmd_dlopen
-+if dlopen_ibverbs
- dlopen_name = 'mlx4_glue'
+-if pmd_dlopen and build
++if dlopen_ibverbs and build
+ dlopen_name = 'mlx5_glue'
dlopen_lib_name = driver_name_fmt.format(dlopen_name)
dlopen_so_version = LIB_GLUE_VERSION
--
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx: add static ibverbs linkage with meson' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (31 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: rename meson variable for dlopen option' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: workaround static " luca.boccassi
` (19 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ce71a4766c74cf46f793f1c8246892152780b841 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:04 +0100
Subject: [PATCH] net/mlx: add static ibverbs linkage with meson
[ upstream commit 6affeabaf3210f52a90dd1bb96741d23256a39c6 ]
The libibverbs (and libmlx4/5) can be statically embedded
in the shared PMD library, or in the application with the static PMD.
It was supported with make build system in
commit 2c0dd7b69fb0 ("config: add static linkage of mlx dependency").
The same feature is enabled with meson when using pkg-config
(i.e. only if the call to dependency() is successful).
The fallback method for searching library with cc.find_library()
is not supported because the dependencies of the found library
would not be linked (no such info in .a file unlike .so).
The main difference, in meson build system, is the generated .pc file
giving arguments to link DPDK with the application.
Unfortunately the .pc file will not keep memory of the static linkage
option for libibverbs.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/nics/mlx4.rst | 4 ++++
doc/guides/nics/mlx5.rst | 4 ++++
drivers/net/mlx4/meson.build | 5 +++--
drivers/net/mlx5/meson.build | 5 +++--
meson_options.txt | 4 ++--
5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index d0e8a8b2ff..4b1d1aceb2 100644
--- a/doc/guides/nics/mlx4.rst
+++ b/doc/guides/nics/mlx4.rst
@@ -92,6 +92,10 @@ These options can be modified in the ``.config`` file.
adds additional run-time checks and debugging messages at the cost of
lower performance.
+This option is available in meson:
+
+- ``ibverbs_link`` can be ``static``, ``shared``, or ``dlopen``.
+
Environment variables
~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index e772369213..98d53b772b 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -267,6 +267,10 @@ These options can be modified in the ``.config`` file.
64. Default armv8a configuration of make build and meson build set it to 128
then brings performance degradation.
+This option is available in meson:
+
+- ``ibverbs_link`` can be ``static``, ``shared``, or ``dlopen``.
+
Environment variables
~~~~~~~~~~~~~~~~~~~~~
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 4f16950a4a..a87f439f59 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -9,6 +9,7 @@ if not is_linux
endif
build = true
+static_ibverbs = (get_option('ibverbs_link') == 'static')
dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
LIB_GLUE_VERSION = '18.02.0'
@@ -24,8 +25,8 @@ endif
libnames = [ 'mlx4', 'ibverbs' ]
libs = []
foreach libname:libnames
- lib = dependency('lib' + libname, required:false)
- if not lib.found()
+ lib = dependency('lib' + libname, static:static_ibverbs, required:false)
+ if not lib.found() and not static_ibverbs
lib = cc.find_library(libname, required:false)
endif
if lib.found()
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 1b4f6cf831..6f2a0ad5a5 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,6 +9,7 @@ if not is_linux
endif
build = true
+static_ibverbs = (get_option('ibverbs_link') == 'static')
dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
LIB_GLUE_VERSION = '19.08.0'
@@ -24,8 +25,8 @@ endif
libnames = [ 'mlx5', 'ibverbs' ]
libs = []
foreach libname:libnames
- lib = dependency('lib' + libname, required:false)
- if not lib.found()
+ lib = dependency('lib' + libname, static:static_ibverbs, required:false)
+ if not lib.found() and not static_ibverbs
lib = cc.find_library(libname, required:false)
endif
if lib.found()
diff --git a/meson_options.txt b/meson_options.txt
index bc369d06c9..0de16b4fdb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -12,8 +12,8 @@ option('examples', type: 'string', value: '',
description: 'Comma-separated list of examples to build by default')
option('flexran_sdk', type: 'string', value: '',
description: 'Path to FlexRAN SDK optional Libraries for BBDEV device')
-option('ibverbs_link', type: 'combo', choices : ['shared', 'dlopen'], value: 'shared',
- description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
+option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared',
+ description: 'Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
option('include_subdir_arch', type: 'string', value: '',
description: 'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '',
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.268987682 +0000
+++ 0034-net-mlx-add-static-ibverbs-linkage-with-meson.patch 2020-02-17 17:00:15.351951079 +0000
@@ -1,8 +1,10 @@
-From 6affeabaf3210f52a90dd1bb96741d23256a39c6 Mon Sep 17 00:00:00 2001
+From ce71a4766c74cf46f793f1c8246892152780b841 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:04 +0100
Subject: [PATCH] net/mlx: add static ibverbs linkage with meson
+[ upstream commit 6affeabaf3210f52a90dd1bb96741d23256a39c6 ]
+
The libibverbs (and libmlx4/5) can be statically embedded
in the shared PMD library, or in the application with the static PMD.
It was supported with make build system in
@@ -22,11 +24,11 @@
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
- doc/guides/nics/mlx4.rst | 4 ++++
- doc/guides/nics/mlx5.rst | 4 ++++
- drivers/common/mlx5/meson.build | 5 +++--
- drivers/net/mlx4/meson.build | 5 +++--
- meson_options.txt | 4 ++--
+ doc/guides/nics/mlx4.rst | 4 ++++
+ doc/guides/nics/mlx5.rst | 4 ++++
+ drivers/net/mlx4/meson.build | 5 +++--
+ drivers/net/mlx5/meson.build | 5 +++--
+ meson_options.txt | 4 ++--
5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
@@ -45,10 +47,10 @@
~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 2ea4fa9546..5ab7c07165 100644
+index e772369213..98d53b772b 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
-@@ -275,6 +275,10 @@ These options can be modified in the ``.config`` file.
+@@ -267,6 +267,10 @@ These options can be modified in the ``.config`` file.
64. Default armv8a configuration of make build and meson build set it to 128
then brings performance degradation.
@@ -59,20 +61,20 @@
Environment variables
~~~~~~~~~~~~~~~~~~~~~
-diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
-index c6d4154cd0..206ef75ca2 100644
---- a/drivers/common/mlx5/meson.build
-+++ b/drivers/common/mlx5/meson.build
-@@ -7,6 +7,7 @@ if not is_linux
- subdir_done()
+diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
+index 4f16950a4a..a87f439f59 100644
+--- a/drivers/net/mlx4/meson.build
++++ b/drivers/net/mlx4/meson.build
+@@ -9,6 +9,7 @@ if not is_linux
endif
+ build = true
+static_ibverbs = (get_option('ibverbs_link') == 'static')
- pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
- LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
- LIB_GLUE_VERSION = '20.02.0'
-@@ -22,8 +23,8 @@ endif
- libnames = [ 'mlx5', 'ibverbs' ]
+ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
+ LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
+ LIB_GLUE_VERSION = '18.02.0'
+@@ -24,8 +25,8 @@ endif
+ libnames = [ 'mlx4', 'ibverbs' ]
libs = []
foreach libname:libnames
- lib = dependency('lib' + libname, required:false)
@@ -82,20 +84,20 @@
lib = cc.find_library(libname, required:false)
endif
if lib.found()
-diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
-index 6d2397b3cc..7513516764 100644
---- a/drivers/net/mlx4/meson.build
-+++ b/drivers/net/mlx4/meson.build
-@@ -8,6 +8,7 @@ if not is_linux
- subdir_done()
+diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
+index 1b4f6cf831..6f2a0ad5a5 100644
+--- a/drivers/net/mlx5/meson.build
++++ b/drivers/net/mlx5/meson.build
+@@ -9,6 +9,7 @@ if not is_linux
endif
+ build = true
+static_ibverbs = (get_option('ibverbs_link') == 'static')
- pmd_dlopen = (get_option('ibverbs_link') == 'dlopen')
- LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
- LIB_GLUE_VERSION = '18.02.0'
-@@ -23,8 +24,8 @@ endif
- libnames = [ 'mlx4', 'ibverbs' ]
+ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
+ LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
+ LIB_GLUE_VERSION = '19.08.0'
+@@ -24,8 +25,8 @@ endif
+ libnames = [ 'mlx5', 'ibverbs' ]
libs = []
foreach libname:libnames
- lib = dependency('lib' + libname, required:false)
@@ -106,10 +108,10 @@
endif
if lib.found()
diff --git a/meson_options.txt b/meson_options.txt
-index 20be15fe6b..9e4923a4f1 100644
+index bc369d06c9..0de16b4fdb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -14,8 +14,8 @@ option('examples', type: 'string', value: '',
+@@ -12,8 +12,8 @@ option('examples', type: 'string', value: '',
description: 'Comma-separated list of examples to build by default')
option('flexran_sdk', type: 'string', value: '',
description: 'Path to FlexRAN SDK optional Libraries for BBDEV device')
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx: workaround static linkage with meson' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (32 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: add static ibverbs linkage with meson' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' " luca.boccassi
` (18 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 99641413e43afe32ca107ca4576a060fd91b5d98 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:06 +0100
Subject: [PATCH] net/mlx: workaround static linkage with meson
[ upstream commit af331158f228aac12513abba13927a3745a41c14 ]
If ibverbs_link is static and the application choose to link DPDK
as static libraries, both PMD and ibverbs libraries must be linked
as static libraries. And the dependencies of ibverbs (netlink) must
still be linked as shared libraries.
Unfortunately, meson forget about the static requirement for ibverbs
when generating the .pc file.
As a result, libibverbs, libmlx4, libmlx5 are listed in Requires.private
section (allowing to be linked as shared libraries) and libnl is missing.
A fix is in progress for meson, but anyway we will have to live without
such a fix until a better version of meson is widely available:
https://github.com/mesonbuild/meson/pull/6393
In order to avoid meson suggesting shared libraries in the section
Requires.private of the .pc file, the dependency object is recreated
with declare_dependency():
- cflags are extracted the libibverbs.pc
- ldflags, from libibverbs.pc, are processed to force
static flavor of ibverbs libraries, thanks to this syntax:
-l:libfoo.a
Fixes: 6affeabaf321 ("net/mlx: add static ibverbs linkage with meson")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
buildtools/meson.build | 2 ++
drivers/net/mlx4/meson.build | 14 ++++++++++++--
drivers/net/mlx5/meson.build | 13 ++++++++++++-
3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 6ef2c5721c..cd6f4c1af0 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -3,9 +3,11 @@
subdir('pmdinfogen')
+pkgconf = find_program('pkg-config', 'pkgconf', required: false)
pmdinfo = find_program('gen-pmdinfo-cfile.sh')
check_experimental_syms = find_program('check-experimental-syms.sh')
+ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
# set up map-to-def script using python, either built-in or external
python3 = import('python').find_installation(required: false)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index a87f439f59..17711f154b 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -30,7 +30,10 @@ foreach libname:libnames
lib = cc.find_library(libname, required:false)
endif
if lib.found()
- libs += [ lib ]
+ libs += lib
+ if not static_ibverbs
+ ext_deps += lib
+ endif
else
build = false
reason = 'missing dependency, "' + libname + '"'
@@ -38,8 +41,15 @@ foreach libname:libnames
endforeach
if build
+ if static_ibverbs
+ # Build without adding shared libs to Requires.private
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
+ # Add static deps ldflags to internal apps and Libs.private
+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
+ endif
allow_experimental_apis = true
- ext_deps += libs
sources = files(
'mlx4.c',
'mlx4_ethdev.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 6f2a0ad5a5..e21f3d8dc8 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -31,6 +31,9 @@ foreach libname:libnames
endif
if lib.found()
libs += [ lib ]
+ if not static_ibverbs
+ ext_deps += lib
+ endif
else
build = false
reason = 'missing dependency, "' + libname + '"'
@@ -38,9 +41,17 @@ foreach libname:libnames
endforeach
if build
+ if static_ibverbs
+ # Build without adding shared libs to Requires.private
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
+ # Add static deps ldflags to internal apps and Libs.private
+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
+ endif
+ allow_experimental_apis = true
allow_experimental_apis = true
deps += ['hash']
- ext_deps += libs
sources = files(
'mlx5.c',
'mlx5_ethdev.c',
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.297040760 +0000
+++ 0035-net-mlx-workaround-static-linkage-with-meson.patch 2020-02-17 17:00:15.355951135 +0000
@@ -1,8 +1,10 @@
-From af331158f228aac12513abba13927a3745a41c14 Mon Sep 17 00:00:00 2001
+From 99641413e43afe32ca107ca4576a060fd91b5d98 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:06 +0100
Subject: [PATCH] net/mlx: workaround static linkage with meson
+[ upstream commit af331158f228aac12513abba13927a3745a41c14 ]
+
If ibverbs_link is static and the application choose to link DPDK
as static libraries, both PMD and ibverbs libraries must be linked
as static libraries. And the dependencies of ibverbs (netlink) must
@@ -30,13 +32,13 @@
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
- buildtools/meson.build | 2 ++
- drivers/common/mlx5/meson.build | 12 +++++++++++-
- drivers/net/mlx4/meson.build | 14 ++++++++++++--
- 3 files changed, 25 insertions(+), 3 deletions(-)
+ buildtools/meson.build | 2 ++
+ drivers/net/mlx4/meson.build | 14 ++++++++++++--
+ drivers/net/mlx5/meson.build | 13 ++++++++++++-
+ 3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/buildtools/meson.build b/buildtools/meson.build
-index 0f563d89a3..9812917e50 100644
+index 6ef2c5721c..cd6f4c1af0 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -3,9 +3,11 @@
@@ -45,77 +47,78 @@
+pkgconf = find_program('pkg-config', 'pkgconf', required: false)
pmdinfo = find_program('gen-pmdinfo-cfile.sh')
- list_dir_globs = find_program('list-dir-globs.py')
+
check_experimental_syms = find_program('check-experimental-syms.sh')
+ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
# set up map-to-def script using python, either built-in or external
python3 = import('python').find_installation(required: false)
-diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
-index 206ef75ca2..089494e1f8 100644
---- a/drivers/common/mlx5/meson.build
-+++ b/drivers/common/mlx5/meson.build
-@@ -29,16 +29,26 @@ foreach libname:libnames
+diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
+index a87f439f59..17711f154b 100644
+--- a/drivers/net/mlx4/meson.build
++++ b/drivers/net/mlx4/meson.build
+@@ -30,7 +30,10 @@ foreach libname:libnames
+ lib = cc.find_library(libname, required:false)
endif
if lib.found()
- libs += lib
+- libs += [ lib ]
++ libs += lib
+ if not static_ibverbs
+ ext_deps += lib
+ endif
else
build = false
reason = 'missing dependency, "' + libname + '"'
- subdir_done()
- endif
+@@ -38,8 +41,15 @@ foreach libname:libnames
endforeach
-+if static_ibverbs
-+ # Build without adding shared libs to Requires.private
-+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
-+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
-+ # Add static deps ldflags to internal apps and Libs.private
-+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
-+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
-+endif
-
- allow_experimental_apis = true
- deps += ['hash', 'pci', 'net', 'eal', 'kvargs']
--ext_deps += libs
- sources = files(
- 'mlx5_devx_cmds.c',
- 'mlx5_common.c',
-diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
-index 7513516764..290bd1e268 100644
---- a/drivers/net/mlx4/meson.build
-+++ b/drivers/net/mlx4/meson.build
-@@ -29,16 +29,26 @@ foreach libname:libnames
- lib = cc.find_library(libname, required:false)
+
+ if build
++ if static_ibverbs
++ # Build without adding shared libs to Requires.private
++ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
++ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
++ # Add static deps ldflags to internal apps and Libs.private
++ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
++ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
++ endif
+ allow_experimental_apis = true
+- ext_deps += libs
+ sources = files(
+ 'mlx4.c',
+ 'mlx4_ethdev.c',
+diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
+index 6f2a0ad5a5..e21f3d8dc8 100644
+--- a/drivers/net/mlx5/meson.build
++++ b/drivers/net/mlx5/meson.build
+@@ -31,6 +31,9 @@ foreach libname:libnames
endif
if lib.found()
-- libs += [ lib ]
-+ libs += lib
+ libs += [ lib ]
+ if not static_ibverbs
+ ext_deps += lib
+ endif
else
build = false
reason = 'missing dependency, "' + libname + '"'
- subdir_done()
- endif
+@@ -38,9 +41,17 @@ foreach libname:libnames
endforeach
-+if static_ibverbs
-+ # Build without adding shared libs to Requires.private
-+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
-+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
-+ # Add static deps ldflags to internal apps and Libs.private
-+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
-+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
-+endif
-
- allow_experimental_apis = true
--ext_deps += libs
- sources = files(
- 'mlx4.c',
- 'mlx4_ethdev.c',
+
+ if build
++ if static_ibverbs
++ # Build without adding shared libs to Requires.private
++ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
++ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
++ # Add static deps ldflags to internal apps and Libs.private
++ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
++ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
++ endif
++ allow_experimental_apis = true
+ allow_experimental_apis = true
+ deps += ['hash']
+- ext_deps += libs
+ sources = files(
+ 'mlx5.c',
+ 'mlx5_ethdev.c',
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (33 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: workaround static " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:50 ` Luca Boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: check message header size read' " luca.boccassi
` (17 subsequent siblings)
52 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:08 +0100
Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen
[ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ]
If ibverbs_link is dlopen, the PMD and application should not
be linked with ibverbs, but the glue library is.
Unfortunately the ibverbs dependency was exported in the
variable ext_deps, so there were overlinking.
It is fixed by not exporting the dependency in ext_deps,
and recreating a limited dependency object for cflags only.
Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/mlx4/meson.build | 6 ++++--
drivers/net/mlx5/meson.build | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 17711f154b..ff7386aee2 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -31,7 +31,7 @@ foreach libname:libnames
endif
if lib.found()
libs += lib
- if not static_ibverbs
+ if not static_ibverbs and not dlopen_ibverbs
ext_deps += lib
endif
else
@@ -41,10 +41,12 @@ foreach libname:libnames
endforeach
if build
- if static_ibverbs
+ if static_ibverbs or dlopen_ibverbs
# Build without adding shared libs to Requires.private
ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
ext_deps += declare_dependency(compile_args: ibv_cflags.split())
+ endif
+ if static_ibverbs
# Add static deps ldflags to internal apps and Libs.private
ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
ext_deps += declare_dependency(link_args:ibv_ldflags.split())
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index e21f3d8dc8..dab1b83fd3 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -41,10 +41,12 @@ foreach libname:libnames
endforeach
if build
- if static_ibverbs
+ if static_ibverbs or dlopen_ibverbs
# Build without adding shared libs to Requires.private
ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
ext_deps += declare_dependency(compile_args: ibv_cflags.split())
+ endif
+ if static_ibverbs
# Add static deps ldflags to internal apps and Libs.private
ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
ext_deps += declare_dependency(link_args:ibv_ldflags.split())
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.322654671 +0000
+++ 0036-net-mlx-fix-overlinking-with-meson-and-glue-dlopen.patch 2020-02-17 17:00:15.355951135 +0000
@@ -1,8 +1,10 @@
-From e21492a5175af31ae568fa5fabef1f4b22706962 Mon Sep 17 00:00:00 2001
+From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 12 Feb 2020 23:07:08 +0100
Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen
+[ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ]
+
If ibverbs_link is dlopen, the PMD and application should not
be linked with ibverbs, but the glue library is.
Unfortunately the ibverbs dependency was exported in the
@@ -18,42 +20,15 @@
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
- drivers/common/mlx5/meson.build | 6 ++++--
- drivers/net/mlx4/meson.build | 6 ++++--
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
-index ea98e61fcd..141739fd6f 100644
---- a/drivers/common/mlx5/meson.build
-+++ b/drivers/common/mlx5/meson.build
-@@ -29,7 +29,7 @@ foreach libname:libnames
- endif
- if lib.found()
- libs += lib
-- if not static_ibverbs
-+ if not static_ibverbs and not dlopen_ibverbs
- ext_deps += lib
- endif
- else
-@@ -38,10 +38,12 @@ foreach libname:libnames
- subdir_done()
- endif
- endforeach
--if static_ibverbs
-+if static_ibverbs or dlopen_ibverbs
- # Build without adding shared libs to Requires.private
- ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
- ext_deps += declare_dependency(compile_args: ibv_cflags.split())
-+endif
-+if static_ibverbs
- # Add static deps ldflags to internal apps and Libs.private
- ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
- ext_deps += declare_dependency(link_args:ibv_ldflags.split())
+ drivers/net/mlx4/meson.build | 6 ++++--
+ drivers/net/mlx5/meson.build | 4 +++-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
-index f66e70f4d1..c598745730 100644
+index 17711f154b..ff7386aee2 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
-@@ -30,7 +30,7 @@ foreach libname:libnames
+@@ -31,7 +31,7 @@ foreach libname:libnames
endif
if lib.found()
libs += lib
@@ -62,20 +37,38 @@
ext_deps += lib
endif
else
-@@ -39,10 +39,12 @@ foreach libname:libnames
- subdir_done()
- endif
+@@ -41,10 +41,12 @@ foreach libname:libnames
+ endforeach
+
+ if build
+- if static_ibverbs
++ if static_ibverbs or dlopen_ibverbs
+ # Build without adding shared libs to Requires.private
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
++ endif
++ if static_ibverbs
+ # Add static deps ldflags to internal apps and Libs.private
+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
+diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
+index e21f3d8dc8..dab1b83fd3 100644
+--- a/drivers/net/mlx5/meson.build
++++ b/drivers/net/mlx5/meson.build
+@@ -41,10 +41,12 @@ foreach libname:libnames
endforeach
--if static_ibverbs
-+if static_ibverbs or dlopen_ibverbs
- # Build without adding shared libs to Requires.private
- ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
- ext_deps += declare_dependency(compile_args: ibv_cflags.split())
-+endif
-+if static_ibverbs
- # Add static deps ldflags to internal apps and Libs.private
- ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
- ext_deps += declare_dependency(link_args:ibv_ldflags.split())
+
+ if build
+- if static_ibverbs
++ if static_ibverbs or dlopen_ibverbs
+ # Build without adding shared libs to Requires.private
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ext_deps += declare_dependency(compile_args: ibv_cflags.split())
++ endif
++ if static_ibverbs
+ # Add static deps ldflags to internal apps and Libs.private
+ ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout()
+ ext_deps += declare_dependency(link_args:ibv_ldflags.split())
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: check message header size read' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (34 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: allocate interface name from heap' " luca.boccassi
` (16 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Ilja Van Sprundel, Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 86ad179c5b1de7c352d65d6bd4e14294a26ba10b Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 5 Feb 2020 16:05:29 +0100
Subject: [PATCH] vhost: check message header size read
[ upstream commit 966f89d998a20eddb45666f06dd42a3c3fc94574 ]
This patch adds a check to ensure the read size of
the Vhost-user message header is not smaller than
the expected size.
In case of unexpected read size, report an error
and close file descriptors passed with the message,
if any.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/vhost_user.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 4312e5e536..d224932dda 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2456,8 +2456,13 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
ret = read_fd_message(sockfd, (char *)msg, VHOST_USER_HDR_SIZE,
msg->fds, VHOST_MEMORY_MAX_NREGIONS, &msg->fd_num);
- if (ret <= 0)
+ if (ret <= 0) {
return ret;
+ } else if (ret != VHOST_USER_HDR_SIZE) {
+ RTE_LOG(ERR, VHOST_CONFIG, "Unexpected header size read\n");
+ close_msg_fds(msg);
+ return -1;
+ }
if (msg->size) {
if (msg->size > sizeof(msg->payload)) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.348690930 +0000
+++ 0037-vhost-check-message-header-size-read.patch 2020-02-17 17:00:15.355951135 +0000
@@ -1,8 +1,10 @@
-From 966f89d998a20eddb45666f06dd42a3c3fc94574 Mon Sep 17 00:00:00 2001
+From 86ad179c5b1de7c352d65d6bd4e14294a26ba10b Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Wed, 5 Feb 2020 16:05:29 +0100
Subject: [PATCH] vhost: check message header size read
+[ upstream commit 966f89d998a20eddb45666f06dd42a3c3fc94574 ]
+
This patch adds a check to ensure the read size of
the Vhost-user message header is not smaller than
the expected size.
@@ -12,7 +14,6 @@
if any.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
-Cc: stable@dpdk.org
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -22,7 +23,7 @@
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 9f14ea6676..91482ccd67 100644
+index 4312e5e536..d224932dda 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2456,8 +2456,13 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)
@@ -33,7 +34,7 @@
+ if (ret <= 0) {
return ret;
+ } else if (ret != VHOST_USER_HDR_SIZE) {
-+ VHOST_LOG_CONFIG(ERR, "Unexpected header size read\n");
++ RTE_LOG(ERR, VHOST_CONFIG, "Unexpected header size read\n");
+ close_msg_fds(msg);
+ return -1;
+ }
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: allocate interface name from heap' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (35 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: check message header size read' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: delay driver setup' " luca.boccassi
` (15 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Itsuro Oda; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 598ff73b843608b5bd1f5e2cace2822d12b6eebc Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:33 +0900
Subject: [PATCH] net/vhost: allocate interface name from heap
[ upstream commit e045e858444349323cb02e0951cd977d4a0edd0d ]
This patch allocates iface_name of pmd_internal from heap
in order to be able to refer from secondary processes.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/vhost/rte_eth_vhost.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index a63588986f..cea2ead2da 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1009,7 +1009,7 @@ eth_dev_close(struct rte_eth_dev *dev)
rte_free(dev->data->tx_queues[i]);
free(internal->dev_name);
- free(internal->iface_name);
+ rte_free(internal->iface_name);
rte_free(internal);
dev->data->dev_private = NULL;
@@ -1256,9 +1256,11 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
internal->dev_name = strdup(name);
if (internal->dev_name == NULL)
goto error;
- internal->iface_name = strdup(iface_name);
+ internal->iface_name = rte_malloc_socket(name, strlen(iface_name) + 1,
+ 0, numa_node);
if (internal->iface_name == NULL)
goto error;
+ strcpy(internal->iface_name, iface_name);
list->eth_dev = eth_dev;
pthread_mutex_lock(&internal_list_lock);
@@ -1306,7 +1308,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
error:
if (internal) {
- free(internal->iface_name);
+ rte_free(internal->iface_name);
free(internal->dev_name);
}
rte_free(vring_state);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.379268602 +0000
+++ 0038-net-vhost-allocate-interface-name-from-heap.patch 2020-02-17 17:00:15.359951192 +0000
@@ -1,13 +1,14 @@
-From e045e858444349323cb02e0951cd977d4a0edd0d Mon Sep 17 00:00:00 2001
+From 598ff73b843608b5bd1f5e2cace2822d12b6eebc Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:33 +0900
Subject: [PATCH] net/vhost: allocate interface name from heap
+[ upstream commit e045e858444349323cb02e0951cd977d4a0edd0d ]
+
This patch allocates iface_name of pmd_internal from heap
in order to be able to refer from secondary processes.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
-Cc: stable@dpdk.org
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: delay driver setup' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (36 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: allocate interface name from heap' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: fix probing in secondary process' " luca.boccassi
` (14 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Itsuro Oda; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a5bae1950be6e9a347ee460f3e76f052f84acff2 Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:34 +0900
Subject: [PATCH] net/vhost: delay driver setup
[ upstream commit 3d01b759d2679c216725689eabe44147d1737326 ]
Vhost driver setup is delayed at eth_dev configuration
in order to be able to set it from a secondary process.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/vhost/rte_eth_vhost.c | 130 ++++++++++++++++++------------
1 file changed, 78 insertions(+), 52 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index cea2ead2da..d7bba5c6e2 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -97,6 +97,8 @@ struct pmd_internal {
rte_atomic32_t dev_attached;
char *dev_name;
char *iface_name;
+ uint64_t flags;
+ uint64_t disable_flags;
uint16_t max_queues;
int vid;
rte_atomic32_t started;
@@ -491,17 +493,6 @@ out:
return nb_tx;
}
-static int
-eth_dev_configure(struct rte_eth_dev *dev __rte_unused)
-{
- struct pmd_internal *internal = dev->data->dev_private;
- const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-
- internal->vlan_strip = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
-
- return 0;
-}
-
static inline struct internal_list *
find_internal_resource(char *ifname)
{
@@ -877,6 +868,62 @@ static struct vhost_device_ops vhost_ops = {
.vring_state_changed = vring_state_changed,
};
+static int
+vhost_driver_setup(struct rte_eth_dev *eth_dev)
+{
+ struct pmd_internal *internal = eth_dev->data->dev_private;
+ struct internal_list *list = NULL;
+ struct rte_vhost_vring_state *vring_state = NULL;
+ unsigned int numa_node = eth_dev->device->numa_node;
+ const char *name = eth_dev->device->name;
+
+ list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
+ if (list == NULL)
+ goto error;
+
+ vring_state = rte_zmalloc_socket(name, sizeof(*vring_state),
+ 0, numa_node);
+ if (vring_state == NULL)
+ goto error;
+
+ list->eth_dev = eth_dev;
+ pthread_mutex_lock(&internal_list_lock);
+ TAILQ_INSERT_TAIL(&internal_list, list, next);
+ pthread_mutex_unlock(&internal_list_lock);
+
+ rte_spinlock_init(&vring_state->lock);
+ vring_states[eth_dev->data->port_id] = vring_state;
+
+ if (rte_vhost_driver_register(internal->iface_name, internal->flags))
+ goto error;
+
+ if (internal->disable_flags) {
+ if (rte_vhost_driver_disable_features(internal->iface_name,
+ internal->disable_flags))
+ goto error;
+ }
+
+ if (rte_vhost_driver_callback_register(internal->iface_name,
+ &vhost_ops) < 0) {
+ VHOST_LOG(ERR, "Can't register callbacks\n");
+ goto error;
+ }
+
+ if (rte_vhost_driver_start(internal->iface_name) < 0) {
+ VHOST_LOG(ERR, "Failed to start driver for %s\n",
+ internal->iface_name);
+ goto error;
+ }
+
+ return 0;
+
+error:
+ rte_free(vring_state);
+ rte_free(list);
+
+ return -1;
+}
+
int
rte_eth_vhost_get_queue_event(uint16_t port_id,
struct rte_eth_vhost_queue_event *event)
@@ -943,6 +990,24 @@ rte_eth_vhost_get_vid_from_port_id(uint16_t port_id)
return vid;
}
+static int
+eth_dev_configure(struct rte_eth_dev *dev)
+{
+ struct pmd_internal *internal = dev->data->dev_private;
+ const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+
+ /* NOTE: the same process has to operate a vhost interface
+ * from beginning to end (from eth_dev configure to eth_dev close).
+ * It is user's responsibility at the moment.
+ */
+ if (vhost_driver_setup(dev) < 0)
+ return -1;
+
+ internal->vlan_strip = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
+
+ return 0;
+}
+
static int
eth_dev_start(struct rte_eth_dev *eth_dev)
{
@@ -1219,16 +1284,10 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
struct pmd_internal *internal = NULL;
struct rte_eth_dev *eth_dev = NULL;
struct rte_ether_addr *eth_addr = NULL;
- struct rte_vhost_vring_state *vring_state = NULL;
- struct internal_list *list = NULL;
VHOST_LOG(INFO, "Creating VHOST-USER backend on numa socket %u\n",
numa_node);
- list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
- if (list == NULL)
- goto error;
-
/* reserve an ethdev entry */
eth_dev = rte_eth_vdev_allocate(dev, sizeof(*internal));
if (eth_dev == NULL)
@@ -1242,11 +1301,6 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
*eth_addr = base_eth_addr;
eth_addr->addr_bytes[5] = eth_dev->data->port_id;
- vring_state = rte_zmalloc_socket(name,
- sizeof(*vring_state), 0, numa_node);
- if (vring_state == NULL)
- goto error;
-
/* now put it all together
* - store queue data in internal,
* - point eth_dev_data to internals
@@ -1262,18 +1316,12 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
goto error;
strcpy(internal->iface_name, iface_name);
- list->eth_dev = eth_dev;
- pthread_mutex_lock(&internal_list_lock);
- TAILQ_INSERT_TAIL(&internal_list, list, next);
- pthread_mutex_unlock(&internal_list_lock);
-
- rte_spinlock_init(&vring_state->lock);
- vring_states[eth_dev->data->port_id] = vring_state;
-
data->nb_rx_queues = queues;
data->nb_tx_queues = queues;
internal->max_queues = queues;
internal->vid = -1;
+ internal->flags = flags;
+ internal->disable_flags = disable_flags;
data->dev_link = pmd_link;
data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
@@ -1283,26 +1331,6 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
eth_dev->rx_pkt_burst = eth_vhost_rx;
eth_dev->tx_pkt_burst = eth_vhost_tx;
- if (rte_vhost_driver_register(iface_name, flags))
- goto error;
-
- if (disable_flags) {
- if (rte_vhost_driver_disable_features(iface_name,
- disable_flags))
- goto error;
- }
-
- if (rte_vhost_driver_callback_register(iface_name, &vhost_ops) < 0) {
- VHOST_LOG(ERR, "Can't register callbacks\n");
- goto error;
- }
-
- if (rte_vhost_driver_start(iface_name) < 0) {
- VHOST_LOG(ERR, "Failed to start driver for %s\n",
- iface_name);
- goto error;
- }
-
rte_eth_dev_probing_finish(eth_dev);
return 0;
@@ -1311,9 +1339,7 @@ error:
rte_free(internal->iface_name);
free(internal->dev_name);
}
- rte_free(vring_state);
rte_eth_dev_release_port(eth_dev);
- rte_free(list);
return -1;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.405857588 +0000
+++ 0039-net-vhost-delay-driver-setup.patch 2020-02-17 17:00:15.359951192 +0000
@@ -1,13 +1,14 @@
-From 3d01b759d2679c216725689eabe44147d1737326 Mon Sep 17 00:00:00 2001
+From a5bae1950be6e9a347ee460f3e76f052f84acff2 Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:34 +0900
Subject: [PATCH] net/vhost: delay driver setup
+[ upstream commit 3d01b759d2679c216725689eabe44147d1737326 ]
+
Vhost driver setup is delayed at eth_dev configuration
in order to be able to set it from a secondary process.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
-Cc: stable@dpdk.org
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: fix probing in secondary process' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (37 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: delay driver setup' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/vhost_blk: fix check of device path' " luca.boccassi
` (13 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Itsuro Oda; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 8677e57f66ee737a15c18e4fb42bb3532ce3e99d Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:35 +0900
Subject: [PATCH] net/vhost: fix probing in secondary process
[ upstream commit 75ad5aadbd64fa89d35fa4a38d54e10cdd8e838e ]
This patch adds lacking member setting and makes secondary
probe complete.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/vhost/rte_eth_vhost.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index d7bba5c6e2..307de2c682 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1397,8 +1397,11 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
VHOST_LOG(ERR, "Failed to probe %s\n", name);
return -1;
}
- /* TODO: request info from primary to set up Rx and Tx */
+ eth_dev->rx_pkt_burst = eth_vhost_rx;
+ eth_dev->tx_pkt_burst = eth_vhost_tx;
eth_dev->dev_ops = &ops;
+ if (dev->device.numa_node == SOCKET_ID_ANY)
+ dev->device.numa_node = rte_socket_id();
eth_dev->device = &dev->device;
rte_eth_dev_probing_finish(eth_dev);
return 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.431357404 +0000
+++ 0040-net-vhost-fix-probing-in-secondary-process.patch 2020-02-17 17:00:15.359951192 +0000
@@ -1,13 +1,14 @@
-From 75ad5aadbd64fa89d35fa4a38d54e10cdd8e838e Mon Sep 17 00:00:00 2001
+From 8677e57f66ee737a15c18e4fb42bb3532ce3e99d Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:35 +0900
Subject: [PATCH] net/vhost: fix probing in secondary process
+[ upstream commit 75ad5aadbd64fa89d35fa4a38d54e10cdd8e838e ]
+
This patch adds lacking member setting and makes secondary
probe complete.
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
-Cc: stable@dpdk.org
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/vhost_blk: fix check of device path' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (38 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: fix probing in secondary process' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: fix inflight resubmit check' " luca.boccassi
` (12 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Jin Yu; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e879627a3b3a5f2d90e2a0917bb3a61315090d5a Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 12 Feb 2020 20:54:46 +0800
Subject: [PATCH] examples/vhost_blk: fix check of device path
[ upstream commit 71dd2870bf79930ac388b50d70fc319dd200e604 ]
Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
it's ok to ignore. The second one is that unlink fails to remove
file but the next bind() would fail too.
Coverity issue: 350589, 158663
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
examples/vhost_blk/vhost_blk.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index e1036bf3a6..74c82a900b 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -994,11 +994,7 @@ vhost_blk_ctrlr_construct(const char *ctrlr_name)
}
snprintf(dev_pathname, sizeof(dev_pathname), "%s/%s", path, ctrlr_name);
- if (access(dev_pathname, F_OK) != -1) {
- if (unlink(dev_pathname) != 0)
- rte_exit(EXIT_FAILURE, "Cannot remove %s.\n",
- dev_pathname);
- }
+ unlink(dev_pathname);
if (rte_vhost_driver_register(dev_pathname, 0) != 0) {
fprintf(stderr, "socket %s already exists\n", dev_pathname);
@@ -1041,8 +1037,7 @@ signal_handler(__rte_unused int signum)
{
struct vhost_blk_ctrlr *ctrlr;
- if (access(dev_pathname, F_OK) == 0)
- unlink(dev_pathname);
+ unlink(dev_pathname);
if (g_should_stop != -1) {
g_should_stop = 1;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.456848275 +0000
+++ 0041-examples-vhost_blk-fix-check-of-device-path.patch 2020-02-17 17:00:15.359951192 +0000
@@ -1,8 +1,10 @@
-From 71dd2870bf79930ac388b50d70fc319dd200e604 Mon Sep 17 00:00:00 2001
+From e879627a3b3a5f2d90e2a0917bb3a61315090d5a Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 12 Feb 2020 20:54:46 +0800
Subject: [PATCH] examples/vhost_blk: fix check of device path
+[ upstream commit 71dd2870bf79930ac388b50d70fc319dd200e604 ]
+
Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
@@ -11,7 +13,6 @@
Coverity issue: 350589, 158663
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
-Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: fix inflight resubmit check' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (39 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/vhost_blk: fix check of device path' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " luca.boccassi
` (11 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Jin Yu; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f07186f3291858a6b8e64c3233a54762d87497e2 Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 25 Dec 2019 22:18:35 +0800
Subject: [PATCH] vhost: fix inflight resubmit check
[ upstream commit c47edd040a6a409de6bc86a31f44e86e5fa55b19 ]
The frontend may not send the get_inflight_fd and
set_inflight_fd although we negotiate the protocol
feature. When we meet this situation just return OK.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_user.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index d224932dda..8a33510a47 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1645,8 +1645,11 @@ vhost_check_queue_inflights_split(struct virtio_net *dev,
(1ULL << VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)))
return RTE_VHOST_MSG_RESULT_OK;
+ /* The frontend may still not support the inflight feature
+ * although we negotiate the protocol feature.
+ */
if ((!vq->inflight_split))
- return RTE_VHOST_MSG_RESULT_ERR;
+ return RTE_VHOST_MSG_RESULT_OK;
if (!vq->inflight_split->version) {
vq->inflight_split->version = INFLIGHT_VERSION;
@@ -1726,8 +1729,11 @@ vhost_check_queue_inflights_packed(struct virtio_net *dev,
(1ULL << VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)))
return RTE_VHOST_MSG_RESULT_OK;
+ /* The frontend may still not support the inflight feature
+ * although we negotiate the protocol feature.
+ */
if ((!vq->inflight_packed))
- return RTE_VHOST_MSG_RESULT_ERR;
+ return RTE_VHOST_MSG_RESULT_OK;
if (!vq->inflight_packed->version) {
vq->inflight_packed->version = INFLIGHT_VERSION;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.482548378 +0000
+++ 0042-vhost-fix-inflight-resubmit-check.patch 2020-02-17 17:00:15.363951249 +0000
@@ -1,14 +1,15 @@
-From c47edd040a6a409de6bc86a31f44e86e5fa55b19 Mon Sep 17 00:00:00 2001
+From f07186f3291858a6b8e64c3233a54762d87497e2 Mon Sep 17 00:00:00 2001
From: Jin Yu <jin.yu@intel.com>
Date: Wed, 25 Dec 2019 22:18:35 +0800
Subject: [PATCH] vhost: fix inflight resubmit check
+[ upstream commit c47edd040a6a409de6bc86a31f44e86e5fa55b19 ]
+
The frontend may not send the get_inflight_fd and
set_inflight_fd although we negotiate the protocol
feature. When we meet this situation just return OK.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
-Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -17,7 +18,7 @@
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 91482ccd67..9a7b8b3088 100644
+index d224932dda..8a33510a47 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1645,8 +1645,11 @@ vhost_check_queue_inflights_split(struct virtio_net *dev,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (40 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: fix inflight resubmit check' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: update Rx offload after setting MTU' " luca.boccassi
` (10 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Adrian Moreno; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 37d6a69f880b9c9292f7adbc72c4aba008e03115 Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Thu, 13 Feb 2020 11:04:58 +0100
Subject: [PATCH] vhost: protect log address translation in IOTLB update
[ upstream commit 4f37df14c405b754b5e971c75f4f67f4bb5bfdde ]
Currently, the log address translation only happens in the vhost-user's
translate_ring_addresses(). However, the IOTLB update handler is not
checking if it was mapped to re-trigger that translation.
Since the log address mapping could fail, check it on iotlb updates.
Also, check it on vring_translate() so we do not dirty pages if the
logging address is not yet ready.
Additionally, properly protect the accesses to the iotlb structures.
Fixes: fbda9f145927 ("vhost: translate incoming log address to GPA")
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost.c | 56 ++++++++++++++++++++++++++++++++++
lib/librte_vhost/vhost.h | 15 +++++++--
lib/librte_vhost/vhost_user.c | 57 +++++++++++++++--------------------
3 files changed, 93 insertions(+), 35 deletions(-)
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 1cbe948f74..20fda61518 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -350,6 +350,57 @@ free_device(struct virtio_net *dev)
rte_free(dev);
}
+static __rte_always_inline int
+log_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+{
+ if (likely(!(vq->ring_addrs.flags & (1 << VHOST_VRING_F_LOG))))
+ return 0;
+
+ vq->log_guest_addr = translate_log_addr(dev, vq,
+ vq->ring_addrs.log_guest_addr);
+ if (vq->log_guest_addr == 0)
+ return -1;
+
+ return 0;
+}
+
+/*
+ * Converts vring log address to GPA
+ * If IOMMU is enabled, the log address is IOVA
+ * If IOMMU not enabled, the log address is already GPA
+ *
+ * Caller should have iotlb_lock read-locked
+ */
+uint64_t
+translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
+ uint64_t log_addr)
+{
+ if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
+ const uint64_t exp_size = sizeof(uint64_t);
+ uint64_t hva, gpa;
+ uint64_t size = exp_size;
+
+ hva = vhost_iova_to_vva(dev, vq, log_addr,
+ &size, VHOST_ACCESS_RW);
+
+ if (size != exp_size)
+ return 0;
+
+ gpa = hva_to_gpa(dev, hva, exp_size);
+ if (!gpa) {
+ RTE_LOG(ERR, VHOST_CONFIG,
+ "VQ: Failed to find GPA for log_addr: 0x%"
+ PRIx64 " hva: 0x%" PRIx64 "\n",
+ log_addr, hva);
+ return 0;
+ }
+ return gpa;
+
+ } else
+ return log_addr;
+}
+
+/* Caller should have iotlb_lock read-locked */
static int
vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
{
@@ -388,6 +439,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
return 0;
}
+/* Caller should have iotlb_lock read-locked */
static int
vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
{
@@ -434,6 +486,10 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
if (vring_translate_split(dev, vq) < 0)
return -1;
}
+
+ if (log_translate(dev, vq) < 0)
+ return -1;
+
vq->access_ok = 1;
return 0;
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 9f11b28a31..9ec5934566 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -462,14 +462,23 @@ static __rte_always_inline void
vhost_log_cache_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
uint64_t offset, uint64_t len)
{
- vhost_log_cache_write(dev, vq, vq->log_guest_addr + offset, len);
+ if (unlikely(dev->features & (1ULL << VHOST_F_LOG_ALL))) {
+ if (unlikely(vq->log_guest_addr == 0))
+ return;
+ __vhost_log_cache_write(dev, vq, vq->log_guest_addr + offset,
+ len);
+ }
}
static __rte_always_inline void
vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq,
uint64_t offset, uint64_t len)
{
- vhost_log_write(dev, vq->log_guest_addr + offset, len);
+ if (unlikely(dev->features & (1ULL << VHOST_F_LOG_ALL))) {
+ if (unlikely(vq->log_guest_addr == 0))
+ return;
+ __vhost_log_write(dev, vq->log_guest_addr + offset, len);
+ }
}
static __rte_always_inline void
@@ -620,6 +629,8 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
struct vhost_virtqueue *vq,
uint64_t desc_addr, uint64_t desc_len);
int vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq);
+uint64_t translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
+ uint64_t log_addr);
void vring_invalidate(struct virtio_net *dev, struct vhost_virtqueue *vq);
static __rte_always_inline uint64_t
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 8a33510a47..40c4520c08 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -656,13 +656,11 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
{
if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
uint64_t vva;
- uint64_t req_size = *size;
- vva = vhost_user_iotlb_cache_find(vq, ra,
+ vhost_user_iotlb_rd_lock(vq);
+ vva = vhost_iova_to_vva(dev, vq, ra,
size, VHOST_ACCESS_RW);
- if (req_size != *size)
- vhost_user_iotlb_miss(dev, (ra + *size),
- VHOST_ACCESS_RW);
+ vhost_user_iotlb_rd_unlock(vq);
return vva;
}
@@ -670,37 +668,16 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
return qva_to_vva(dev, ra, size);
}
-/*
- * Converts vring log address to GPA
- * If IOMMU is enabled, the log address is IOVA
- * If IOMMU not enabled, the log address is already GPA
- */
static uint64_t
-translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq,
- uint64_t log_addr)
+log_addr_to_gpa(struct virtio_net *dev, struct vhost_virtqueue *vq)
{
- if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
- const uint64_t exp_size = sizeof(struct vring_used) +
- sizeof(struct vring_used_elem) * vq->size;
- uint64_t hva, gpa;
- uint64_t size = exp_size;
+ uint64_t log_gpa;
- hva = vhost_iova_to_vva(dev, vq, log_addr,
- &size, VHOST_ACCESS_RW);
- if (size != exp_size)
- return 0;
+ vhost_user_iotlb_rd_lock(vq);
+ log_gpa = translate_log_addr(dev, vq, vq->ring_addrs.log_guest_addr);
+ vhost_user_iotlb_rd_unlock(vq);
- gpa = hva_to_gpa(dev, hva, exp_size);
- if (!gpa) {
- RTE_LOG(ERR, VHOST_CONFIG,
- "VQ: Failed to find GPA for log_addr: 0x%" PRIx64 " hva: 0x%" PRIx64 "\n",
- log_addr, hva);
- return 0;
- }
- return gpa;
-
- } else
- return log_addr;
+ return log_gpa;
}
static struct virtio_net *
@@ -712,7 +689,7 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
if (addr->flags & (1 << VHOST_VRING_F_LOG)) {
vq->log_guest_addr =
- translate_log_addr(dev, vq, addr->log_guest_addr);
+ log_addr_to_gpa(dev, vq);
if (vq->log_guest_addr == 0) {
RTE_LOG(DEBUG, VHOST_CONFIG,
"(%d) failed to map log_guest_addr.\n",
@@ -2251,6 +2228,13 @@ is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
if (ra->used_user_addr < end && (ra->used_user_addr + len) > start)
return 1;
+ if (ra->flags & (1 << VHOST_VRING_F_LOG)) {
+ len = sizeof(uint64_t);
+ if (ra->log_guest_addr < end &&
+ (ra->log_guest_addr + len) > start)
+ return 1;
+ }
+
return 0;
}
@@ -2276,6 +2260,13 @@ is_vring_iotlb_packed(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
if (ra->used_user_addr < end && (ra->used_user_addr + len) > start)
return 1;
+ if (ra->flags & (1 << VHOST_VRING_F_LOG)) {
+ len = sizeof(uint64_t);
+ if (ra->log_guest_addr < end &&
+ (ra->log_guest_addr + len) > start)
+ return 1;
+ }
+
return 0;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.509727070 +0000
+++ 0043-vhost-protect-log-address-translation-in-IOTLB-updat.patch 2020-02-17 17:00:15.367951305 +0000
@@ -1,8 +1,10 @@
-From 4f37df14c405b754b5e971c75f4f67f4bb5bfdde Mon Sep 17 00:00:00 2001
+From 37d6a69f880b9c9292f7adbc72c4aba008e03115 Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Thu, 13 Feb 2020 11:04:58 +0100
Subject: [PATCH] vhost: protect log address translation in IOTLB update
+[ upstream commit 4f37df14c405b754b5e971c75f4f67f4bb5bfdde ]
+
Currently, the log address translation only happens in the vhost-user's
translate_ring_addresses(). However, the IOTLB update handler is not
checking if it was mapped to re-trigger that translation.
@@ -14,7 +16,6 @@
Additionally, properly protect the accesses to the iotlb structures.
Fixes: fbda9f145927 ("vhost: translate incoming log address to GPA")
-Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -25,10 +26,10 @@
3 files changed, 93 insertions(+), 35 deletions(-)
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
-index c819a84774..0266318440 100644
+index 1cbe948f74..20fda61518 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
-@@ -353,6 +353,57 @@ free_device(struct virtio_net *dev)
+@@ -350,6 +350,57 @@ free_device(struct virtio_net *dev)
rte_free(dev);
}
@@ -70,7 +71,7 @@
+
+ gpa = hva_to_gpa(dev, hva, exp_size);
+ if (!gpa) {
-+ VHOST_LOG_CONFIG(ERR,
++ RTE_LOG(ERR, VHOST_CONFIG,
+ "VQ: Failed to find GPA for log_addr: 0x%"
+ PRIx64 " hva: 0x%" PRIx64 "\n",
+ log_addr, hva);
@@ -86,7 +87,7 @@
static int
vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
{
-@@ -391,6 +442,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -388,6 +439,7 @@ vring_translate_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
return 0;
}
@@ -94,7 +95,7 @@
static int
vring_translate_packed(struct virtio_net *dev, struct vhost_virtqueue *vq)
{
-@@ -437,6 +489,10 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -434,6 +486,10 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
if (vring_translate_split(dev, vq) < 0)
return -1;
}
@@ -106,7 +107,7 @@
return 0;
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index 686ce42a20..2087d1400e 100644
+index 9f11b28a31..9ec5934566 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -462,14 +462,23 @@ static __rte_always_inline void
@@ -135,7 +136,7 @@
}
static __rte_always_inline void
-@@ -626,6 +635,8 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
+@@ -620,6 +629,8 @@ void *vhost_alloc_copy_ind_table(struct virtio_net *dev,
struct vhost_virtqueue *vq,
uint64_t desc_addr, uint64_t desc_len);
int vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq);
@@ -145,7 +146,7 @@
static __rte_always_inline uint64_t
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 9a7b8b3088..bd1be01040 100644
+index 8a33510a47..40c4520c08 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -656,13 +656,11 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -196,7 +197,7 @@
- gpa = hva_to_gpa(dev, hva, exp_size);
- if (!gpa) {
-- VHOST_LOG_CONFIG(ERR,
+- RTE_LOG(ERR, VHOST_CONFIG,
- "VQ: Failed to find GPA for log_addr: 0x%" PRIx64 " hva: 0x%" PRIx64 "\n",
- log_addr, hva);
- return 0;
@@ -216,7 +217,7 @@
- translate_log_addr(dev, vq, addr->log_guest_addr);
+ log_addr_to_gpa(dev, vq);
if (vq->log_guest_addr == 0) {
- VHOST_LOG_CONFIG(DEBUG,
+ RTE_LOG(DEBUG, VHOST_CONFIG,
"(%d) failed to map log_guest_addr.\n",
@@ -2251,6 +2228,13 @@ is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
if (ra->used_user_addr < end && (ra->used_user_addr + len) > start)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: update Rx offload after setting MTU' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (41 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix unchecked Tx cleanup error' " luca.boccassi
` (9 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Wei Hu (Xavier); +Cc: Huisong Li, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 97293db4409daeac55b1f5f019eea30f47e97d6c Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 13 Feb 2020 09:57:43 +0800
Subject: [PATCH] app/testpmd: update Rx offload after setting MTU
[ upstream commit 150c9ac2df13b1ab1a0ad723f74004346d8ecd65 ]
Currently, Rx offload capabilities and max_rx_pkt_len in the struct
variable named rte_port are not updated after setting mtu successfully
in port_mtu_set function by 'port config mtu <port_id> <value>' command.
This may lead to reconfig mtu to the initial value in the driver when
recalling rte_eth_dev_configure API interface.
This patch updates Rx offload capabilities and max_rx_pkt_len after
setting mtu successfully when configuring mtu.
Fixes: ae03d0d18adf ("app/testpmd: command to configure MTU")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/config.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 8c86217796..62e547be09 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1216,7 +1216,9 @@ void
port_mtu_set(portid_t port_id, uint16_t mtu)
{
int diag;
+ struct rte_port *rte_port = &ports[port_id];
struct rte_eth_dev_info dev_info;
+ uint16_t eth_overhead;
int ret;
if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -1232,8 +1234,25 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
return;
}
diag = rte_eth_dev_set_mtu(port_id, mtu);
- if (diag == 0)
+ if (diag == 0 &&
+ dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+ /*
+ * Ether overhead in driver is equal to the difference of
+ * max_rx_pktlen and max_mtu in rte_eth_dev_info when the
+ * device supports jumbo frame.
+ */
+ eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
+ if (mtu > RTE_ETHER_MAX_LEN - eth_overhead) {
+ rte_port->dev_conf.rxmode.offloads |=
+ DEV_RX_OFFLOAD_JUMBO_FRAME;
+ rte_port->dev_conf.rxmode.max_rx_pkt_len =
+ mtu + eth_overhead;
+ } else
+ rte_port->dev_conf.rxmode.offloads &=
+ ~DEV_RX_OFFLOAD_JUMBO_FRAME;
+
return;
+ }
printf("Set MTU failed. diag=%d\n", diag);
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.538346827 +0000
+++ 0044-app-testpmd-update-Rx-offload-after-setting-MTU.patch 2020-02-17 17:00:15.367951305 +0000
@@ -1,8 +1,10 @@
-From 150c9ac2df13b1ab1a0ad723f74004346d8ecd65 Mon Sep 17 00:00:00 2001
+From 97293db4409daeac55b1f5f019eea30f47e97d6c Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 13 Feb 2020 09:57:43 +0800
Subject: [PATCH] app/testpmd: update Rx offload after setting MTU
+[ upstream commit 150c9ac2df13b1ab1a0ad723f74004346d8ecd65 ]
+
Currently, Rx offload capabilities and max_rx_pkt_len in the struct
variable named rte_port are not updated after setting mtu successfully
in port_mtu_set function by 'port config mtu <port_id> <value>' command.
@@ -13,7 +15,6 @@
setting mtu successfully when configuring mtu.
Fixes: ae03d0d18adf ("app/testpmd: command to configure MTU")
-Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -23,10 +24,10 @@
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index f9c55a2260..9d95202233 100644
+index 8c86217796..62e547be09 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
-@@ -1215,7 +1215,9 @@ void
+@@ -1216,7 +1216,9 @@ void
port_mtu_set(portid_t port_id, uint16_t mtu)
{
int diag;
@@ -36,7 +37,7 @@
int ret;
if (port_id_is_invalid(port_id, ENABLED_WARN))
-@@ -1231,8 +1233,25 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
+@@ -1232,8 +1234,25 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
return;
}
diag = rte_eth_dev_set_mtu(port_id, mtu);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix unchecked Tx cleanup error' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (42 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: update Rx offload after setting MTU' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
` (8 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Sunil Pai G; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6ecf6e42a2f142d6674c432d659f27e18e875ac6 Mon Sep 17 00:00:00 2001
From: Sunil Pai G <sunil.pai.g@intel.com>
Date: Wed, 12 Feb 2020 05:37:10 +0000
Subject: [PATCH] net/ice: fix unchecked Tx cleanup error
[ upstream commit fe38133c42d846613a41beff49ab0e1b9a3e0e61 ]
Coverity complains of unchecked return value warning of
ice_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
ice_xmit_cleanup and return in case of cleanup failure, we directly cast
it to void function to make the Coverity happy.
Coverity issue: 353623
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/ice_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index ccc2c93398..37e792b05b 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2471,7 +2471,7 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* Check if the descriptor ring needs to be cleaned. */
if (txq->nb_tx_free < txq->tx_free_thresh)
- ice_xmit_cleanup(txq);
+ (void)ice_xmit_cleanup(txq);
for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
tx_pkt = *tx_pkts++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.566414530 +0000
+++ 0045-net-ice-fix-unchecked-Tx-cleanup-error.patch 2020-02-17 17:00:15.371951362 +0000
@@ -1,8 +1,10 @@
-From fe38133c42d846613a41beff49ab0e1b9a3e0e61 Mon Sep 17 00:00:00 2001
+From 6ecf6e42a2f142d6674c432d659f27e18e875ac6 Mon Sep 17 00:00:00 2001
From: Sunil Pai G <sunil.pai.g@intel.com>
Date: Wed, 12 Feb 2020 05:37:10 +0000
Subject: [PATCH] net/ice: fix unchecked Tx cleanup error
+[ upstream commit fe38133c42d846613a41beff49ab0e1b9a3e0e61 ]
+
Coverity complains of unchecked return value warning of
ice_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
@@ -11,7 +13,6 @@
Coverity issue: 353623
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
-Cc: stable@dpdk.org
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -20,7 +21,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index ce5b8e6ca3..60c411bfad 100644
+index ccc2c93398..37e792b05b 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2471,7 +2471,7 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix unchecked Tx cleanup error' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (43 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix unchecked Tx cleanup error' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/octeontx2: fix flow control initial state' " luca.boccassi
` (7 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Beilei Xing; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 85ceba97e41210ba113c414936ced115c8201555 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 12 Feb 2020 20:36:01 +0800
Subject: [PATCH] net/i40e: fix unchecked Tx cleanup error
[ upstream commit ba950e62762bd0198e53666ecc2a791767adc137 ]
Coverity complains of unchecked return value warning of
i40e_xmit_cleanup, while this cleanup is opportunistic and will not
cause problems if it fails. So instead of checking the return value of
i40e_xmit_cleanup and return in case of cleanup failure, we directly
cast it to void function to make the Coverity happy.
Coverity issue: 353617
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index bbdba39b3c..0ae47b807b 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1039,7 +1039,7 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* Check if the descriptor ring needs to be cleaned. */
if (txq->nb_tx_free < txq->tx_free_thresh)
- i40e_xmit_cleanup(txq);
+ (void)i40e_xmit_cleanup(txq);
for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
td_cmd = 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.594459517 +0000
+++ 0046-net-i40e-fix-unchecked-Tx-cleanup-error.patch 2020-02-17 17:00:15.375951419 +0000
@@ -1,8 +1,10 @@
-From ba950e62762bd0198e53666ecc2a791767adc137 Mon Sep 17 00:00:00 2001
+From 85ceba97e41210ba113c414936ced115c8201555 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 12 Feb 2020 20:36:01 +0800
Subject: [PATCH] net/i40e: fix unchecked Tx cleanup error
+[ upstream commit ba950e62762bd0198e53666ecc2a791767adc137 ]
+
Coverity complains of unchecked return value warning of
i40e_xmit_cleanup, while this cleanup is opportunistic and will not
cause problems if it fails. So instead of checking the return value of
@@ -11,7 +13,6 @@
Coverity issue: 353617
Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -20,7 +21,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index fd1ae80da8..f6d23c9fb6 100644
+index bbdba39b3c..0ae47b807b 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1039,7 +1039,7 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix flow control initial state' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (44 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'event/dpaa2: set number of order sequences' " luca.boccassi
` (6 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Vamsi Attunuru; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cf55204d8141dd100818ffc5955ec03e9fa3201d Mon Sep 17 00:00:00 2001
From: Vamsi Attunuru <vattunuru@marvell.com>
Date: Thu, 6 Feb 2020 09:57:13 +0530
Subject: [PATCH] net/octeontx2: fix flow control initial state
[ upstream commit 29bb974576a559daa96fc7894aaa432014ed12f2 ]
Currently when application requests for RTE_FC_NONE earlier
than PMD's internal fc mode update, flow control set routine
is returning without updating the flow control state.
Patch updates the PMD's internal fc mode details during
dev_configure to ensure any flow control set requests
issued later are handled properly.
Fixes: 609945f1ce90 ("net/octeontx2: support flow control")
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_ethdev.c | 6 +++++
drivers/net/octeontx2/otx2_ethdev.h | 2 ++
drivers/net/octeontx2/otx2_flow_ctrl.c | 35 +++++++++++++++++++++++---
3 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 268b383dbd..c86165b5ec 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -1721,6 +1721,12 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
goto cq_fini;
}
+ rc = otx2_nix_flow_ctrl_init(eth_dev);
+ if (rc) {
+ otx2_err("Failed to init flow ctrl mode %d", rc);
+ goto cq_fini;
+ }
+
rc = otx2_nix_mc_addr_list_install(eth_dev);
if (rc < 0) {
otx2_err("Failed to install mc address list rc=%d", rc);
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 987e7607c4..483535ab12 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -504,6 +504,8 @@ int otx2_cgx_mac_addr_set(struct rte_eth_dev *eth_dev,
struct rte_ether_addr *addr);
/* Flow Control */
+int otx2_nix_flow_ctrl_init(struct rte_eth_dev *eth_dev);
+
int otx2_nix_flow_ctrl_get(struct rte_eth_dev *eth_dev,
struct rte_eth_fc_conf *fc_conf);
diff --git a/drivers/net/octeontx2/otx2_flow_ctrl.c b/drivers/net/octeontx2/otx2_flow_ctrl.c
index 1c6929e764..76bf481001 100644
--- a/drivers/net/octeontx2/otx2_flow_ctrl.c
+++ b/drivers/net/octeontx2/otx2_flow_ctrl.c
@@ -200,16 +200,14 @@ int
otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
{
struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+ struct otx2_fc_info *fc = &dev->fc_info;
struct rte_eth_fc_conf fc_conf;
if (otx2_dev_is_lbk(dev) || otx2_dev_is_sdp(dev))
return 0;
memset(&fc_conf, 0, sizeof(struct rte_eth_fc_conf));
- /* Both Rx & Tx flow ctrl get enabled(RTE_FC_FULL) in HW
- * by AF driver, update those info in PMD structure.
- */
- otx2_nix_flow_ctrl_get(eth_dev, &fc_conf);
+ fc_conf.mode = fc->mode;
/* To avoid Link credit deadlock on Ax, disable Tx FC if it's enabled */
if (otx2_dev_is_Ax(dev) &&
@@ -223,3 +221,32 @@ otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev)
return otx2_nix_flow_ctrl_set(eth_dev, &fc_conf);
}
+
+int
+otx2_nix_flow_ctrl_init(struct rte_eth_dev *eth_dev)
+{
+ struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+ struct otx2_fc_info *fc = &dev->fc_info;
+ struct rte_eth_fc_conf fc_conf;
+ int rc;
+
+ if (otx2_dev_is_lbk(dev) || otx2_dev_is_sdp(dev))
+ return 0;
+
+ memset(&fc_conf, 0, sizeof(struct rte_eth_fc_conf));
+ /* Both Rx & Tx flow ctrl get enabled(RTE_FC_FULL) in HW
+ * by AF driver, update those info in PMD structure.
+ */
+ rc = otx2_nix_flow_ctrl_get(eth_dev, &fc_conf);
+ if (rc)
+ goto exit;
+
+ fc->mode = fc_conf.mode;
+ fc->rx_pause = (fc_conf.mode == RTE_FC_FULL) ||
+ (fc_conf.mode == RTE_FC_RX_PAUSE);
+ fc->tx_pause = (fc_conf.mode == RTE_FC_FULL) ||
+ (fc_conf.mode == RTE_FC_TX_PAUSE);
+
+exit:
+ return rc;
+}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.623703703 +0000
+++ 0047-net-octeontx2-fix-flow-control-initial-state.patch 2020-02-17 17:00:15.375951419 +0000
@@ -1,8 +1,10 @@
-From 29bb974576a559daa96fc7894aaa432014ed12f2 Mon Sep 17 00:00:00 2001
+From cf55204d8141dd100818ffc5955ec03e9fa3201d Mon Sep 17 00:00:00 2001
From: Vamsi Attunuru <vattunuru@marvell.com>
Date: Thu, 6 Feb 2020 09:57:13 +0530
Subject: [PATCH] net/octeontx2: fix flow control initial state
+[ upstream commit 29bb974576a559daa96fc7894aaa432014ed12f2 ]
+
Currently when application requests for RTE_FC_NONE earlier
than PMD's internal fc mode update, flow control set routine
is returning without updating the flow control state.
@@ -12,7 +14,6 @@
issued later are handled properly.
Fixes: 609945f1ce90 ("net/octeontx2: support flow control")
-Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -23,12 +24,12 @@
3 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index e18435d494..e60f4901c4 100644
+index 268b383dbd..c86165b5ec 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -1744,6 +1744,12 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
- if (rc)
+@@ -1721,6 +1721,12 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
goto cq_fini;
+ }
+ rc = otx2_nix_flow_ctrl_init(eth_dev);
+ if (rc) {
@@ -40,10 +41,10 @@
if (rc < 0) {
otx2_err("Failed to install mc address list rc=%d", rc);
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
-index 5cb5953dcd..e5684f9f00 100644
+index 987e7607c4..483535ab12 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
-@@ -511,6 +511,8 @@ int otx2_cgx_mac_addr_set(struct rte_eth_dev *eth_dev,
+@@ -504,6 +504,8 @@ int otx2_cgx_mac_addr_set(struct rte_eth_dev *eth_dev,
struct rte_ether_addr *addr);
/* Flow Control */
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'event/dpaa2: set number of order sequences' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (45 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'net/octeontx2: fix flow control initial state' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix error checking' " luca.boccassi
` (5 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Nipun Gupta; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2418d67fd0a8ad4507f2cdbb9f31702db282b8a0 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Sat, 8 Feb 2020 10:20:19 +0530
Subject: [PATCH] event/dpaa2: set number of order sequences
[ upstream commit 5df2c07d7eeecd0cd13155f20aabc264632e0cde ]
This patch sets the number of atomic ordered sequences
supported by the driver.
Fixes: dbf63bd43afa ("event/dpaa2: support ordered queue")
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/event/dpaa2/dpaa2_eventdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index d71361666c..1833d659d8 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -479,6 +479,8 @@ dpaa2_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
RTE_SET_USED(queue_id);
queue_conf->nb_atomic_flows = DPAA2_EVENT_QUEUE_ATOMIC_FLOWS;
+ queue_conf->nb_atomic_order_sequences =
+ DPAA2_EVENT_QUEUE_ORDER_SEQUENCES;
queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL;
queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.651980923 +0000
+++ 0048-event-dpaa2-set-number-of-order-sequences.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,13 +1,14 @@
-From 5df2c07d7eeecd0cd13155f20aabc264632e0cde Mon Sep 17 00:00:00 2001
+From 2418d67fd0a8ad4507f2cdbb9f31702db282b8a0 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Sat, 8 Feb 2020 10:20:19 +0530
Subject: [PATCH] event/dpaa2: set number of order sequences
+[ upstream commit 5df2c07d7eeecd0cd13155f20aabc264632e0cde ]
+
This patch sets the number of atomic ordered sequences
supported by the driver.
Fixes: dbf63bd43afa ("event/dpaa2: support ordered queue")
-Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-event: fix error checking' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (46 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'event/dpaa2: set number of order sequences' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " luca.boccassi
` (4 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Sunil Kumar Kori; +Cc: Pavan Nikhilesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1a4537dcc2f2c36aa235d63675b970e367293828 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 30 Jan 2020 13:49:12 +0530
Subject: [PATCH] examples/l2fwd-event: fix error checking
[ upstream commit 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 ]
Patch fixes coverity issues which handle return values from API
calling.
Coverity issue: 350588, 350594, 350598, 350599
Fixes: 3b5476db4823 ("examples/l2fwd-event: setup event queue and port")
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
examples/l2fwd-event/l2fwd_event_generic.c | 9 +++++++--
examples/l2fwd-event/l2fwd_event_internal_port.c | 10 ++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c
index b07306a17b..2dc95e5f7d 100644
--- a/examples/l2fwd-event/l2fwd_event_generic.c
+++ b/examples/l2fwd-event/l2fwd_event_generic.c
@@ -112,7 +112,9 @@ l2fwd_event_port_setup_generic(struct l2fwd_resources *rsrc)
rte_panic("No space is available\n");
memset(&def_p_conf, 0, sizeof(struct rte_event_port_conf));
- rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+ ret = rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+ if (ret < 0)
+ rte_panic("Error to get default configuration of event port\n");
if (def_p_conf.new_event_threshold < event_p_conf.new_event_threshold)
event_p_conf.new_event_threshold =
@@ -173,7 +175,10 @@ l2fwd_event_queue_setup_generic(struct l2fwd_resources *rsrc,
if (!evt_rsrc->evq.event_q_id)
rte_panic("Memory allocation failure\n");
- rte_event_queue_default_conf_get(event_d_id, 0, &def_q_conf);
+ ret = rte_event_queue_default_conf_get(event_d_id, 0, &def_q_conf);
+ if (ret < 0)
+ rte_panic("Error to get default config of event queue\n");
+
if (def_q_conf.nb_atomic_flows < event_q_conf.nb_atomic_flows)
event_q_conf.nb_atomic_flows = def_q_conf.nb_atomic_flows;
diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c
index 5e6e8598af..63d57b46c2 100644
--- a/examples/l2fwd-event/l2fwd_event_internal_port.c
+++ b/examples/l2fwd-event/l2fwd_event_internal_port.c
@@ -109,7 +109,10 @@ l2fwd_event_port_setup_internal_port(struct l2fwd_resources *rsrc)
if (!evt_rsrc->evp.event_p_id)
rte_panic("Failed to allocate memory for Event Ports\n");
- rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+ ret = rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+ if (ret < 0)
+ rte_panic("Error to get default configuration of event port\n");
+
if (def_p_conf.new_event_threshold < event_p_conf.new_event_threshold)
event_p_conf.new_event_threshold =
def_p_conf.new_event_threshold;
@@ -161,7 +164,10 @@ l2fwd_event_queue_setup_internal_port(struct l2fwd_resources *rsrc,
uint8_t event_q_id = 0;
int32_t ret;
- rte_event_queue_default_conf_get(event_d_id, event_q_id, &def_q_conf);
+ ret = rte_event_queue_default_conf_get(event_d_id, event_q_id,
+ &def_q_conf);
+ if (ret < 0)
+ rte_panic("Error to get default config of event queue\n");
if (def_q_conf.nb_atomic_flows < event_q_conf.nb_atomic_flows)
event_q_conf.nb_atomic_flows = def_q_conf.nb_atomic_flows;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.677985760 +0000
+++ 0049-examples-l2fwd-event-fix-error-checking.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,15 +1,16 @@
-From 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 Mon Sep 17 00:00:00 2001
+From 1a4537dcc2f2c36aa235d63675b970e367293828 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 30 Jan 2020 13:49:12 +0530
Subject: [PATCH] examples/l2fwd-event: fix error checking
+[ upstream commit 8cecdc7e4190f3f04d1c918393a4a56b742d60a6 ]
+
Patch fixes coverity issues which handle return values from API
calling.
Coverity issue: 350588, 350594, 350598, 350599
Fixes: 3b5476db4823 ("examples/l2fwd-event: setup event queue and port")
-Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (47 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix error checking' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix core allocation in poll mode' " luca.boccassi
` (3 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7377fe6165d98eb21bbaeca7e918a8ed91d021bb Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 3 Feb 2020 10:22:59 +0530
Subject: [PATCH] app/eventdev: fix pipeline test with meson build
[ upstream commit 0d4ba7496512b57e7e0c66d4041d1b339f132629 ]
Add missing pipeline test to meson build.
Fixes: 2ff67267b049 ("app/eventdev: build with meson")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
app/test-eventdev/meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 7ff2b786cf..9e588d9ec7 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -10,5 +10,8 @@ sources = files('evt_main.c',
'test_order_queue.c',
'test_perf_common.c',
'test_perf_atq.c',
- 'test_perf_queue.c')
+ 'test_perf_queue.c',
+ 'test_pipeline_common.c',
+ 'test_pipeline_atq.c',
+ 'test_pipeline_queue.c')
deps += 'eventdev'
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.703244840 +0000
+++ 0050-app-eventdev-fix-pipeline-test-with-meson-build.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,12 +1,13 @@
-From 0d4ba7496512b57e7e0c66d4041d1b339f132629 Mon Sep 17 00:00:00 2001
+From 7377fe6165d98eb21bbaeca7e918a8ed91d021bb Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 3 Feb 2020 10:22:59 +0530
Subject: [PATCH] app/eventdev: fix pipeline test with meson build
+[ upstream commit 0d4ba7496512b57e7e0c66d4041d1b339f132629 ]
+
Add missing pipeline test to meson build.
Fixes: 2ff67267b049 ("app/eventdev: build with meson")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-event: fix core allocation in poll mode' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (48 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'test: fix build without ring PMD' " luca.boccassi
` (2 subsequent siblings)
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From fc30c8dfc077607d73f9e019c1b4e3a5506a34be Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 3 Feb 2020 10:16:18 +0530
Subject: [PATCH] examples/l2fwd-event: fix core allocation in poll mode
[ upstream commit c3a09b17db781469e7fe321e6babb1bda1dd91e6 ]
Skip master lcore when assigning cores to rx_queues as it is only used
to print stats.
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
examples/l2fwd-event/l2fwd_poll.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/l2fwd-event/l2fwd_poll.c b/examples/l2fwd-event/l2fwd_poll.c
index a3a3835582..2033c65e54 100644
--- a/examples/l2fwd-event/l2fwd_poll.c
+++ b/examples/l2fwd-event/l2fwd_poll.c
@@ -116,6 +116,7 @@ l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc)
/* get the lcore_id for this port */
while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
+ rx_lcore_id == rte_get_master_lcore() ||
poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
rsrc->rx_queue_per_lcore) {
rx_lcore_id++;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.728206280 +0000
+++ 0051-examples-l2fwd-event-fix-core-allocation-in-poll-mod.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,13 +1,14 @@
-From c3a09b17db781469e7fe321e6babb1bda1dd91e6 Mon Sep 17 00:00:00 2001
+From fc30c8dfc077607d73f9e019c1b4e3a5506a34be Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 3 Feb 2020 10:16:18 +0530
Subject: [PATCH] examples/l2fwd-event: fix core allocation in poll mode
+[ upstream commit c3a09b17db781469e7fe321e6babb1bda1dd91e6 ]
+
Skip master lcore when assigning cores to rx_queues as it is only used
to print stats.
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test: fix build without ring PMD' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (49 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix core allocation in poll mode' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " luca.boccassi
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Reshma Pattan
Cc: Stephen Hemminger, Nikhil Rao, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 78142a53ec956c93297bf7fb4e0c0224a4614803 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Mon, 23 Dec 2019 06:53:05 +0000
Subject: [PATCH] test: fix build without ring PMD
[ upstream commit 207b1c813f39b1622268d7eab819737458839a67 ]
Some unit tests has dependency on RING PMD,
so this patch is trying to fix those and other
closely related issues.
1)pdump, latency, bitrate, ring PMD and test_event_eth_tx_adapter
unit tests are dependent on ring PMD, so compile those
tests only when ring PMD is enabled else ignore.
2)get rid of make file error which was added by bond unit test
for ring PMD disabled case which is not necessary.
3)Tx adapter UT is dependent on RING PMD, but it was
observed that it was missing from the run in meson
build, so added it. TX adapter UT uses 'sw event and
'null' pmd drivers, so for shared builds the drivers .so
path has to be passed to the test args of meson UT run.
Fixes: 086eb64db3 ("test/pdump: add unit test for pdump library")
Fixes: fdeb30fa71 ("test/bitrate: add unit tests for bitrate library")
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 46cf97e4bb ("eventdev: add test for eth Tx adapter")
Fixes: d23e09e0ef ("app/test: link with ring pmd when needed")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Nikhil Rao <nikhil.rao@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/Makefile | 16 +++++-----------
app/test/meson.build | 36 ++++++++++++++++++++++--------------
app/test/process.h | 8 ++++++++
app/test/test.c | 2 ++
4 files changed, 37 insertions(+), 25 deletions(-)
diff --git a/app/test/Makefile b/app/test/Makefile
index 57930c00b1..1ee1550094 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -151,8 +151,12 @@ SRCS-y += test_func_reentrancy.c
SRCS-y += test_service_cores.c
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
+SRCS-y += sample_packet_forward.c
SRCS-$(CONFIG_RTE_LIBRTE_BITRATE) += test_bitratestats.c
SRCS-$(CONFIG_RTE_LIBRTE_LATENCY_STATS) += test_latencystats.c
+SRCS-$(CONFIG_RTE_LIBRTE_PDUMP) += test_pdump.c
+endif
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c
@@ -181,11 +185,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c
SRCS-$(CONFIG_RTE_LIBRTE_REORDER) += test_reorder.c
-SRCS-$(CONFIG_RTE_LIBRTE_PDUMP) += test_pdump.c
-
SRCS-y += virtual_pmd.c
SRCS-y += packet_burst_generator.c
-SRCS-y += sample_packet_forward.c
SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_acl.c
ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
@@ -215,7 +216,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
SRCS-y += test_eventdev.c
SRCS-y += test_event_ring.c
SRCS-y += test_event_eth_rx_adapter.c
-SRCS-y += test_event_eth_tx_adapter.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += test_event_eth_tx_adapter.c
SRCS-y += test_event_timer_adapter.c
SRCS-y += test_event_crypto_adapter.c
endif
@@ -268,13 +269,6 @@ endif
endif
endif
-# Link against shared libraries when needed
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
-ifneq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
-$(error Link bonding tests require CONFIG_RTE_LIBRTE_PMD_RING=y)
-endif
-endif
-
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
diff --git a/app/test/meson.build b/app/test/meson.build
index 22b0cefaa3..8cb90c4993 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -7,13 +7,11 @@ endif
test_sources = files('commands.c',
'packet_burst_generator.c',
- 'sample_packet_forward.c',
'test.c',
'test_acl.c',
'test_alarm.c',
'test_atomic.c',
'test_barrier.c',
- 'test_bitratestats.c',
'test_bpf.c',
'test_byteorder.c',
'test_cmdline.c',
@@ -43,7 +41,6 @@ test_sources = files('commands.c',
'test_event_crypto_adapter.c',
'test_event_eth_rx_adapter.c',
'test_event_ring.c',
- 'test_event_eth_tx_adapter.c',
'test_event_timer_adapter.c',
'test_eventdev.c',
'test_external_mem.c',
@@ -65,9 +62,7 @@ test_sources = files('commands.c',
'test_ipsec_sad.c',
'test_kni.c',
'test_kvargs.c',
- 'test_latencystats.c',
'test_link_bonding.c',
- 'test_link_bonding_mode4.c',
'test_link_bonding_rssconf.c',
'test_logs.c',
'test_lpm.c',
@@ -88,11 +83,8 @@ test_sources = files('commands.c',
'test_metrics.c',
'test_mcslock.c',
'test_mp_secondary.c',
- 'test_pdump.c',
'test_per_lcore.c',
'test_pmd_perf.c',
- 'test_pmd_ring.c',
- 'test_pmd_ring_perf.c',
'test_power.c',
'test_power_cpufreq.c',
'test_power_kvm_vm.c',
@@ -212,7 +204,6 @@ fast_test_names = [
'rib_autotest',
'rib6_autotest',
'ring_autotest',
- 'ring_pmd_autotest',
'rwlock_test1_autotest',
'rwlock_rda_autotest',
'rwlock_rds_wrm_autotest',
@@ -227,7 +218,6 @@ fast_test_names = [
'timer_autotest',
'user_delay_us',
'version_autotest',
- 'bitratestats_autotest',
'crc_autotest',
'delay_us_sleep_autotest',
'distributor_autotest',
@@ -238,10 +228,8 @@ fast_test_names = [
'ipsec_autotest',
'kni_autotest',
'kvargs_autotest',
- 'latencystats_autotest',
'member_autotest',
'metrics_autotest',
- 'pdump_autotest',
'power_cpufreq_autotest',
'power_autotest',
'power_kvm_vm_autotest',
@@ -277,7 +265,6 @@ perf_test_names = [
'rcu_qsbr_perf_autotest',
'red_perf',
'distributor_perf_autotest',
- 'ring_pmd_perf_autotest',
'pmd_perf_autotest',
'stack_perf_autotest',
'stack_lf_perf_autotest',
@@ -302,7 +289,6 @@ driver_test_names = [
'eventdev_selftest_octeontx',
'eventdev_selftest_sw',
'link_bonding_autotest',
- 'link_bonding_mode4_autotest',
'link_bonding_rssconf_autotest',
'rawdev_autotest',
]
@@ -339,6 +325,21 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
endif
if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
test_deps += 'pmd_ring'
+ test_sources += 'test_pmd_ring_perf.c'
+ test_sources += 'test_pmd_ring.c'
+ test_sources += 'test_event_eth_tx_adapter.c'
+ test_sources += 'test_bitratestats.c'
+ test_sources += 'test_latencystats.c'
+ test_sources += 'test_link_bonding_mode4.c'
+ test_sources += 'sample_packet_forward.c'
+ test_sources += 'test_pdump.c'
+ fast_test_names += 'ring_pmd_autotest'
+ perf_test_names += 'ring_pmd_perf_autotest'
+ fast_test_names += 'event_eth_tx_adapter_autotest'
+ fast_test_names += 'bitratestats_autotest'
+ fast_test_names += 'latencystats_autotest'
+ driver_test_names += 'link_bonding_mode4_autotest'
+ fast_test_names += 'pdump_autotest'
endif
if dpdk_conf.has('RTE_LIBRTE_POWER')
@@ -402,7 +403,14 @@ get_coremask = find_program('get-coremask.sh')
num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
test_args = [num_cores_arg]
+
foreach arg : fast_test_names
+ if (get_option('default_library') == 'shared' and
+ arg == 'event_eth_tx_adapter_autotest')
+ foreach drv:dpdk_drivers
+ test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
+ endforeach
+ endif
if host_machine.system() == 'linux'
test(arg, dpdk_test,
env : ['DPDK_TEST=' + arg],
diff --git a/app/test/process.h b/app/test/process.h
index 191d2796a9..c3b3780337 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -25,10 +25,12 @@
#endif
#ifdef RTE_LIBRTE_PDUMP
+#ifdef RTE_LIBRTE_RING_PMD
#include <pthread.h>
extern void *send_pkts(void *empty);
extern uint16_t flag_for_send_pkts;
#endif
+#endif
/*
* launches a second copy of the test process using the given argv parameters,
@@ -44,7 +46,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
int i, status;
char path[32];
#ifdef RTE_LIBRTE_PDUMP
+#ifdef RTE_LIBRTE_RING_PMD
pthread_t thread;
+#endif
#endif
pid_t pid = fork();
@@ -121,17 +125,21 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
}
/* parent process does a wait */
#ifdef RTE_LIBRTE_PDUMP
+#ifdef RTE_LIBRTE_RING_PMD
if ((strcmp(env_value, "run_pdump_server_tests") == 0))
pthread_create(&thread, NULL, &send_pkts, NULL);
+#endif
#endif
while (wait(&status) != pid)
;
#ifdef RTE_LIBRTE_PDUMP
+#ifdef RTE_LIBRTE_RING_PMD
if ((strcmp(env_value, "run_pdump_server_tests") == 0)) {
flag_for_send_pkts = 0;
pthread_join(thread, NULL);
}
+#endif
#endif
return status;
}
diff --git a/app/test/test.c b/app/test/test.c
index cd7aaf645f..d0826ca69e 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -53,7 +53,9 @@ do_recursive_call(void)
} actions[] = {
{ "run_secondary_instances", test_mp_secondary },
#ifdef RTE_LIBRTE_PDUMP
+#ifdef RTE_LIBRTE_RING_PMD
{ "run_pdump_server_tests", test_pdump },
+#endif
#endif
{ "test_missing_c_flag", no_action },
{ "test_master_lcore_flag", no_action },
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.753506226 +0000
+++ 0052-test-fix-build-without-ring-PMD.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,8 +1,10 @@
-From 207b1c813f39b1622268d7eab819737458839a67 Mon Sep 17 00:00:00 2001
+From 78142a53ec956c93297bf7fb4e0c0224a4614803 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Mon, 23 Dec 2019 06:53:05 +0000
Subject: [PATCH] test: fix build without ring PMD
+[ upstream commit 207b1c813f39b1622268d7eab819737458839a67 ]
+
Some unit tests has dependency on RING PMD,
so this patch is trying to fix those and other
closely related issues.
@@ -25,7 +27,6 @@
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 46cf97e4bb ("eventdev: add test for eth Tx adapter")
Fixes: d23e09e0ef ("app/test: link with ring pmd when needed")
-Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
@@ -39,7 +40,7 @@
4 files changed, 37 insertions(+), 25 deletions(-)
diff --git a/app/test/Makefile b/app/test/Makefile
-index b9bb3a74b2..1f080d1626 100644
+index 57930c00b1..1ee1550094 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -151,8 +151,12 @@ SRCS-y += test_func_reentrancy.c
@@ -76,7 +77,7 @@
SRCS-y += test_event_timer_adapter.c
SRCS-y += test_event_crypto_adapter.c
endif
-@@ -261,13 +262,6 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
+@@ -268,13 +269,6 @@ endif
endif
endif
@@ -91,7 +92,7 @@
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
diff --git a/app/test/meson.build b/app/test/meson.build
-index 3675ffb5c5..0a2ce710f0 100644
+index 22b0cefaa3..8cb90c4993 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -7,13 +7,11 @@ endif
@@ -154,7 +155,7 @@
'crc_autotest',
'delay_us_sleep_autotest',
'distributor_autotest',
-@@ -237,10 +227,8 @@ fast_test_names = [
+@@ -238,10 +228,8 @@ fast_test_names = [
'ipsec_autotest',
'kni_autotest',
'kvargs_autotest',
@@ -165,7 +166,7 @@
'power_cpufreq_autotest',
'power_autotest',
'power_kvm_vm_autotest',
-@@ -276,7 +264,6 @@ perf_test_names = [
+@@ -277,7 +265,6 @@ perf_test_names = [
'rcu_qsbr_perf_autotest',
'red_perf',
'distributor_perf_autotest',
@@ -173,7 +174,7 @@
'pmd_perf_autotest',
'stack_perf_autotest',
'stack_lf_perf_autotest',
-@@ -303,7 +290,6 @@ driver_test_names = [
+@@ -302,7 +289,6 @@ driver_test_names = [
'eventdev_selftest_octeontx',
'eventdev_selftest_sw',
'link_bonding_autotest',
@@ -181,7 +182,7 @@
'link_bonding_rssconf_autotest',
'rawdev_autotest',
]
-@@ -340,6 +326,21 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
+@@ -339,6 +325,21 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
endif
if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
test_deps += 'pmd_ring'
@@ -203,7 +204,7 @@
endif
if dpdk_conf.has('RTE_LIBRTE_POWER')
-@@ -403,7 +404,14 @@ get_coremask = find_program('get-coremask.sh')
+@@ -402,7 +403,14 @@ get_coremask = find_program('get-coremask.sh')
num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
test_args = [num_cores_arg]
@@ -268,7 +269,7 @@
return status;
}
diff --git a/app/test/test.c b/app/test/test.c
-index 7845350957..94d26ab1f6 100644
+index cd7aaf645f..d0826ca69e 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -53,7 +53,9 @@ do_recursive_call(void)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (50 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'test: fix build without ring PMD' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " luca.boccassi
52 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Thomas Faivre; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7262d69b854be94e0bf30caa615be147bc7e4108 Mon Sep 17 00:00:00 2001
From: Thomas Faivre <thomas.faivre@6wind.com>
Date: Wed, 12 Feb 2020 13:31:56 +0100
Subject: [PATCH] usertools: fix syntax warning in python 3.8
[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]
Silent the following warning when running script with python 3.8:
> /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
> Did you mean "=="?
> if (autoload_path is None or autoload_path is ""):
As autoload_path can only be None or a string, directly check its bool
value.
Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
---
usertools/dpdk-pmdinfo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 069a3bf124..9d5c6369a0 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -539,7 +539,7 @@ def scan_for_autoload_pmds(dpdk_path):
return
(autoload_path, scannedfile) = readelf.search_for_autoload_path()
- if (autoload_path is None or autoload_path is ""):
+ if not autoload_path:
if (raw_output is False):
print("No autoload path configured in %s" % dpdk_path)
return
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.779871532 +0000
+++ 0053-usertools-fix-syntax-warning-in-python-3.8.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,8 +1,10 @@
-From e1766e7b0c9b4ad30b330677f2376a05b3b46f0c Mon Sep 17 00:00:00 2001
+From 7262d69b854be94e0bf30caa615be147bc7e4108 Mon Sep 17 00:00:00 2001
From: Thomas Faivre <thomas.faivre@6wind.com>
Date: Wed, 12 Feb 2020 13:31:56 +0100
Subject: [PATCH] usertools: fix syntax warning in python 3.8
+[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]
+
Silent the following warning when running script with python 3.8:
> /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
@@ -13,7 +15,6 @@
value.
Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
-Cc: stable@dpdk.org
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'usertools: fix telemetry client with python 3' has been queued to stable release 19.11.1
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
` (51 preceding siblings ...)
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " luca.boccassi
@ 2020-02-17 17:45 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
52 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-17 17:45 UTC (permalink / raw)
To: Ciara Power; +Cc: Robin Jarry, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From af5dd262a7a91819b8c652255d434e93b87896ff Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 21 Jan 2020 17:03:10 +0000
Subject: [PATCH] usertools: fix telemetry client with python 3
[ upstream commit af927da4d7d23f1050f23caf55f4ac2a995ab244 ]
The client script for use with the telemetry library did not support
Python3, as the data being sent over the socket was in string format.
Python3 requires the data be explicitly converted to bytes before being
sent. Similarly, the received bytes need to be decoded into string
format.
Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Fixes: fe35622659ed ("usertools: fix telemetry client with python 3")
Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Fixes: 4080e46c8078 ("telemetry: support global metrics")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
usertools/dpdk-telemetry-client.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
index 290345dcc4..35edb7cd26 100755
--- a/usertools/dpdk-telemetry-client.py
+++ b/usertools/dpdk-telemetry-client.py
@@ -3,6 +3,7 @@
# Copyright(c) 2018 Intel Corporation
from __future__ import print_function
+from __future__ import unicode_literals
import socket
import os
@@ -65,18 +66,19 @@ class Client:
self.socket.recv_fd.settimeout(2)
self.socket.send_fd.connect("/var/run/dpdk/rte/telemetry")
JSON = (API_REG + self.file_path + "\"}}")
- self.socket.send_fd.sendall(JSON)
+ self.socket.send_fd.sendall(JSON.encode())
+
self.socket.recv_fd.listen(1)
self.socket.client_fd = self.socket.recv_fd.accept()[0]
def unregister(self): # Unregister a given client
- self.socket.client_fd.send(API_UNREG + self.file_path + "\"}}")
+ self.socket.client_fd.send((API_UNREG + self.file_path + "\"}}").encode())
self.socket.client_fd.close()
def requestMetrics(self): # Requests metrics for given client
- self.socket.client_fd.send(METRICS_REQ)
- data = self.socket.client_fd.recv(BUFFER_SIZE)
- print("\nResponse: \n", str(data))
+ self.socket.client_fd.send(METRICS_REQ.encode())
+ data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
+ print("\nResponse: \n", data)
def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client
print("\nPlease enter the number of times you'd like to continuously request Metrics:")
@@ -88,9 +90,9 @@ class Client:
time.sleep(sleep_time)
def requestGlobalMetrics(self): #Requests global metrics for given client
- self.socket.client_fd.send(GLOBAL_METRICS_REQ)
- data = self.socket.client_fd.recv(BUFFER_SIZE)
- print("\nResponse: \n", str(data))
+ self.socket.client_fd.send(GLOBAL_METRICS_REQ.encode())
+ data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
+ print("\nResponse: \n", data)
def interactiveMenu(self, sleep_time): # Creates Interactive menu within the script
while self.choice != 4:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-17 17:00:16.805849510 +0000
+++ 0054-usertools-fix-telemetry-client-with-python-3.patch 2020-02-17 17:00:15.379951475 +0000
@@ -1,8 +1,10 @@
-From af927da4d7d23f1050f23caf55f4ac2a995ab244 Mon Sep 17 00:00:00 2001
+From af5dd262a7a91819b8c652255d434e93b87896ff Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Tue, 21 Jan 2020 17:03:10 +0000
Subject: [PATCH] usertools: fix telemetry client with python 3
+[ upstream commit af927da4d7d23f1050f23caf55f4ac2a995ab244 ]
+
The client script for use with the telemetry library did not support
Python3, as the data being sent over the socket was in string format.
Python3 requires the data be explicitly converted to bytes before being
@@ -13,7 +15,6 @@
Fixes: fe35622659ed ("usertools: fix telemetry client with python 3")
Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Fixes: 4080e46c8078 ("telemetry: support global metrics")
-Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' has been queued to stable release 19.11.1
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' " luca.boccassi
@ 2020-02-17 17:50 ` Luca Boccassi
2020-02-17 18:07 ` Thomas Monjalon
0 siblings, 1 reply; 310+ messages in thread
From: Luca Boccassi @ 2020-02-17 17:50 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
This one required a few extra backports, you can see the end result at:
https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx4/meson.build
https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx5/meson.build
I can drop the series of changes to mlx's meson.build alternatively if
you prefer.
On Mon, 2020-02-17 at 17:45 +0000, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to
> http://dpdk.org/browse/dpdk-stable
> yet.
> It will be pushed if I get no objections before 02/19/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit
> vs the
> patch applied to the branch. This will indicate if there was any
> rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase
> was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00
> 2001
> From: Thomas Monjalon <
> thomas@monjalon.net
> >
> Date: Wed, 12 Feb 2020 23:07:08 +0100
> Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen
>
> [ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ]
>
> If ibverbs_link is dlopen, the PMD and application should not
> be linked with ibverbs, but the glue library is.
> Unfortunately the ibverbs dependency was exported in the
> variable ext_deps, so there were overlinking.
>
> It is fixed by not exporting the dependency in ext_deps,
> and recreating a limited dependency object for cflags only.
>
> Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
> Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
> Cc:
> stable@dpdk.org
>
>
> Signed-off-by: Thomas Monjalon <
> thomas@monjalon.net
> >
> Acked-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
> drivers/net/mlx4/meson.build | 6 ++++--
> drivers/net/mlx5/meson.build | 4 +++-
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx4/meson.build
> b/drivers/net/mlx4/meson.build
> index 17711f154b..ff7386aee2 100644
> --- a/drivers/net/mlx4/meson.build
> +++ b/drivers/net/mlx4/meson.build
> @@ -31,7 +31,7 @@ foreach libname:libnames
> endif
> if lib.found()
> libs += lib
> - if not static_ibverbs
> + if not static_ibverbs and not dlopen_ibverbs
> ext_deps += lib
> endif
> else
> @@ -41,10 +41,12 @@ foreach libname:libnames
> endforeach
>
> if build
> - if static_ibverbs
> + if static_ibverbs or dlopen_ibverbs
> # Build without adding shared libs to Requires.private
> ibv_cflags = run_command(pkgconf, '--cflags',
> 'libibverbs').stdout()
> ext_deps += declare_dependency(compile_args:
> ibv_cflags.split())
> + endif
> + if static_ibverbs
> # Add static deps ldflags to internal apps and
> Libs.private
> ibv_ldflags = run_command(ldflags_ibverbs_static,
> check:true).stdout()
> ext_deps +=
> declare_dependency(link_args:ibv_ldflags.split())
> diff --git a/drivers/net/mlx5/meson.build
> b/drivers/net/mlx5/meson.build
> index e21f3d8dc8..dab1b83fd3 100644
> --- a/drivers/net/mlx5/meson.build
> +++ b/drivers/net/mlx5/meson.build
> @@ -41,10 +41,12 @@ foreach libname:libnames
> endforeach
>
> if build
> - if static_ibverbs
> + if static_ibverbs or dlopen_ibverbs
> # Build without adding shared libs to Requires.private
> ibv_cflags = run_command(pkgconf, '--cflags',
> 'libibverbs').stdout()
> ext_deps += declare_dependency(compile_args:
> ibv_cflags.split())
> + endif
> + if static_ibverbs
> # Add static deps ldflags to internal apps and
> Libs.private
> ibv_ldflags = run_command(ldflags_ibverbs_static,
> check:true).stdout()
> ext_deps +=
> declare_dependency(link_args:ibv_ldflags.split())
>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' has been queued to stable release 19.11.1
2020-02-17 17:50 ` Luca Boccassi
@ 2020-02-17 18:07 ` Thomas Monjalon
2020-02-18 9:15 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Thomas Monjalon @ 2020-02-17 18:07 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Bruce Richardson, dpdk stable
17/02/2020 18:50, Luca Boccassi:
> This one required a few extra backports, you can see the end result at:
>
> https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx4/meson.build
> https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx5/meson.build
>
> I can drop the series of changes to mlx's meson.build alternatively if
> you prefer.
Your backport looks OK, thanks.
There is just a unneeded redundant allow_experimental_apis.
> On Mon, 2020-02-17 at 17:45 +0000, luca.boccassi@gmail.com wrote:
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.11.1
> >
> > Note it hasn't been pushed to
> > http://dpdk.org/browse/dpdk-stable
> > yet.
> > It will be pushed if I get no objections before 02/19/20. So please
> > shout if anyone has objections.
> >
> > Also note that after the patch there's a diff of the upstream commit
> > vs the
> > patch applied to the branch. This will indicate if there was any
> > rebasing
> > needed to apply to the stable branch. If there were code changes for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase
> > was
> > correctly done.
> >
> > Thanks.
> >
> > Luca Boccassi
> >
> > ---
> > From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00
> > 2001
> > From: Thomas Monjalon <
> > thomas@monjalon.net
> > >
> > Date: Wed, 12 Feb 2020 23:07:08 +0100
> > Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen
> >
> > [ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ]
> >
> > If ibverbs_link is dlopen, the PMD and application should not
> > be linked with ibverbs, but the glue library is.
> > Unfortunately the ibverbs dependency was exported in the
> > variable ext_deps, so there were overlinking.
> >
> > It is fixed by not exporting the dependency in ext_deps,
> > and recreating a limited dependency object for cflags only.
> >
> > Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
> > Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
> > Cc:
> > stable@dpdk.org
> >
> >
> > Signed-off-by: Thomas Monjalon <
> > thomas@monjalon.net
> > >
> > Acked-by: Bruce Richardson <
> > bruce.richardson@intel.com
> > >
> > ---
> > drivers/net/mlx4/meson.build | 6 ++++--
> > drivers/net/mlx5/meson.build | 4 +++-
> > 2 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/mlx4/meson.build
> > b/drivers/net/mlx4/meson.build
> > index 17711f154b..ff7386aee2 100644
> > --- a/drivers/net/mlx4/meson.build
> > +++ b/drivers/net/mlx4/meson.build
> > @@ -31,7 +31,7 @@ foreach libname:libnames
> > endif
> > if lib.found()
> > libs += lib
> > - if not static_ibverbs
> > + if not static_ibverbs and not dlopen_ibverbs
> > ext_deps += lib
> > endif
> > else
> > @@ -41,10 +41,12 @@ foreach libname:libnames
> > endforeach
> >
> > if build
> > - if static_ibverbs
> > + if static_ibverbs or dlopen_ibverbs
> > # Build without adding shared libs to Requires.private
> > ibv_cflags = run_command(pkgconf, '--cflags',
> > 'libibverbs').stdout()
> > ext_deps += declare_dependency(compile_args:
> > ibv_cflags.split())
> > + endif
> > + if static_ibverbs
> > # Add static deps ldflags to internal apps and
> > Libs.private
> > ibv_ldflags = run_command(ldflags_ibverbs_static,
> > check:true).stdout()
> > ext_deps +=
> > declare_dependency(link_args:ibv_ldflags.split())
> > diff --git a/drivers/net/mlx5/meson.build
> > b/drivers/net/mlx5/meson.build
> > index e21f3d8dc8..dab1b83fd3 100644
> > --- a/drivers/net/mlx5/meson.build
> > +++ b/drivers/net/mlx5/meson.build
> > @@ -41,10 +41,12 @@ foreach libname:libnames
> > endforeach
> >
> > if build
> > - if static_ibverbs
> > + if static_ibverbs or dlopen_ibverbs
> > # Build without adding shared libs to Requires.private
> > ibv_cflags = run_command(pkgconf, '--cflags',
> > 'libibverbs').stdout()
> > ext_deps += declare_dependency(compile_args:
> > ibv_cflags.split())
> > + endif
> > + if static_ibverbs
> > # Add static deps ldflags to internal apps and
> > Libs.private
> > ibv_ldflags = run_command(ldflags_ibverbs_static,
> > check:true).stdout()
> > ext_deps +=
> > declare_dependency(link_args:ibv_ldflags.split())
> >
>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' has been queued to stable release 19.11.1
2020-02-17 18:07 ` Thomas Monjalon
@ 2020-02-18 9:15 ` Luca Boccassi
0 siblings, 0 replies; 310+ messages in thread
From: Luca Boccassi @ 2020-02-18 9:15 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable
On Mon, 2020-02-17 at 19:07 +0100, Thomas Monjalon wrote:
> 17/02/2020 18:50, Luca Boccassi:
> > This one required a few extra backports, you can see the end result
> > at:
> >
> > https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx4/meson.build
> >
> > https://github.com/bluca/dpdk-stable/blob/19.11/drivers/net/mlx5/meson.build
> >
> >
> > I can drop the series of changes to mlx's meson.build alternatively
> > if
> > you prefer.
>
> Your backport looks OK, thanks.
>
> There is just a unneeded redundant allow_experimental_apis.
Thanks, fixed
>
> > On Mon, 2020-02-17 at 17:45 +0000,
> > luca.boccassi@gmail.com
> > wrote:
> > > Hi,
> > >
> > > FYI, your patch has been queued to stable release 19.11.1
> > >
> > > Note it hasn't been pushed to
> > > http://dpdk.org/browse/dpdk-stable
> > >
> > > yet.
> > > It will be pushed if I get no objections before 02/19/20. So
> > > please
> > > shout if anyone has objections.
> > >
> > > Also note that after the patch there's a diff of the upstream
> > > commit
> > > vs the
> > > patch applied to the branch. This will indicate if there was any
> > > rebasing
> > > needed to apply to the stable branch. If there were code changes
> > > for
> > > rebasing
> > > (ie: not only metadata diffs), please double check that the
> > > rebase
> > > was
> > > correctly done.
> > >
> > > Thanks.
> > >
> > > Luca Boccassi
> > >
> > > ---
> > > From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00
> > > 2001
> > > From: Thomas Monjalon <
> > > thomas@monjalon.net
> > >
> > >
> > > Date: Wed, 12 Feb 2020 23:07:08 +0100
> > > Subject: [PATCH] net/mlx: fix overlinking with meson and glue
> > > dlopen
> > >
> > > [ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ]
> > >
> > > If ibverbs_link is dlopen, the PMD and application should not
> > > be linked with ibverbs, but the glue library is.
> > > Unfortunately the ibverbs dependency was exported in the
> > > variable ext_deps, so there were overlinking.
> > >
> > > It is fixed by not exporting the dependency in ext_deps,
> > > and recreating a limited dependency object for cflags only.
> > >
> > > Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
> > > Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
> > > Cc:
> > > stable@dpdk.org
> > >
> > >
> > >
> > > Signed-off-by: Thomas Monjalon <
> > > thomas@monjalon.net
> > >
> > >
> > > Acked-by: Bruce Richardson <
> > > bruce.richardson@intel.com
> > >
> > >
> > > ---
> > > drivers/net/mlx4/meson.build | 6 ++++--
> > > drivers/net/mlx5/meson.build | 4 +++-
> > > 2 files changed, 7 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/mlx4/meson.build
> > > b/drivers/net/mlx4/meson.build
> > > index 17711f154b..ff7386aee2 100644
> > > --- a/drivers/net/mlx4/meson.build
> > > +++ b/drivers/net/mlx4/meson.build
> > > @@ -31,7 +31,7 @@ foreach libname:libnames
> > > endif
> > > if lib.found()
> > > libs += lib
> > > - if not static_ibverbs
> > > + if not static_ibverbs and not dlopen_ibverbs
> > > ext_deps += lib
> > > endif
> > > else
> > > @@ -41,10 +41,12 @@ foreach libname:libnames
> > > endforeach
> > >
> > > if build
> > > - if static_ibverbs
> > > + if static_ibverbs or dlopen_ibverbs
> > > # Build without adding shared libs to Requires.private
> > > ibv_cflags = run_command(pkgconf, '--cflags',
> > > 'libibverbs').stdout()
> > > ext_deps += declare_dependency(compile_args:
> > > ibv_cflags.split())
> > > + endif
> > > + if static_ibverbs
> > > # Add static deps ldflags to internal apps and
> > > Libs.private
> > > ibv_ldflags = run_command(ldflags_ibverbs_static,
> > > check:true).stdout()
> > > ext_deps +=
> > > declare_dependency(link_args:ibv_ldflags.split())
> > > diff --git a/drivers/net/mlx5/meson.build
> > > b/drivers/net/mlx5/meson.build
> > > index e21f3d8dc8..dab1b83fd3 100644
> > > --- a/drivers/net/mlx5/meson.build
> > > +++ b/drivers/net/mlx5/meson.build
> > > @@ -41,10 +41,12 @@ foreach libname:libnames
> > > endforeach
> > >
> > > if build
> > > - if static_ibverbs
> > > + if static_ibverbs or dlopen_ibverbs
> > > # Build without adding shared libs to Requires.private
> > > ibv_cflags = run_command(pkgconf, '--cflags',
> > > 'libibverbs').stdout()
> > > ext_deps += declare_dependency(compile_args:
> > > ibv_cflags.split())
> > > + endif
> > > + if static_ibverbs
> > > # Add static deps ldflags to internal apps and
> > > Libs.private
> > > ibv_ldflags = run_command(ldflags_ibverbs_static,
> > > check:true).stdout()
> > > ext_deps +=
> > > declare_dependency(link_args:ibv_ldflags.split())
> > >
>
>
>
>
>
>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'test/ipsec: fix a typo in function name' has been queued to stable release 19.11.1
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' " luca.boccassi
` (40 more replies)
0 siblings, 41 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From c5ea96545388c148135df302be95930f46025ba2 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 19 Feb 2020 12:26:50 +0100
Subject: [PATCH] test/ipsec: fix a typo in function name
[ upstream commit e162f1a7513480f66ed9407cecd83d17954c5f36 ]
The name of the static function check_cryptodev_capablity()
is fixed for the word "capability".
There is no functional change.
The same typo is fixed in a comment in ip_fragmentation example.
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
app/test/test_ipsec.c | 4 ++--
examples/ip_fragmentation/main.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 7dc83fee7e..9e14472938 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -237,7 +237,7 @@ fill_crypto_xform(struct ipsec_unitest_params *ut_params,
}
static int
-check_cryptodev_capablity(const struct ipsec_unitest_params *ut,
+check_cryptodev_capability(const struct ipsec_unitest_params *ut,
uint8_t dev_id)
{
struct rte_cryptodev_sym_capability_idx cap_idx;
@@ -302,7 +302,7 @@ testsuite_setup(void)
/* Find first valid crypto device */
for (i = 0; i < nb_devs; i++) {
- rc = check_cryptodev_capablity(ut_params, i);
+ rc = check_cryptodev_capability(ut_params, i);
if (rc == 0) {
ts_params->valid_dev = i;
ts_params->valid_dev_found = 1;
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 104612339c..28febf49e7 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -646,7 +646,7 @@ check_all_ports_link_status(uint32_t port_mask)
}
}
-/* Check L3 packet type detection capablity of the NIC port */
+/* Check L3 packet type detection capability of the NIC port */
static int
check_ptype(int portid)
{
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:55.883438030 +0000
+++ 0001-test-ipsec-fix-a-typo-in-function-name.patch 2020-02-27 09:31:55.627945083 +0000
@@ -1,8 +1,10 @@
-From e162f1a7513480f66ed9407cecd83d17954c5f36 Mon Sep 17 00:00:00 2001
+From c5ea96545388c148135df302be95930f46025ba2 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 19 Feb 2020 12:26:50 +0100
Subject: [PATCH] test/ipsec: fix a typo in function name
+[ upstream commit e162f1a7513480f66ed9407cecd83d17954c5f36 ]
+
The name of the static function check_cryptodev_capablity()
is fixed for the word "capability".
There is no functional change.
@@ -10,7 +12,6 @@
The same typo is fixed in a comment in ip_fragmentation example.
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
-Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-28 4:24 ` [dpdk-stable] [EXT] " Anoob Joseph
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/fips_validation: fix string token for CT length' " luca.boccassi
` (39 subsequent siblings)
40 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Ankur Dwivedi; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 14 Feb 2020 12:08:18 +0530
Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-GCM
[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
This patch extends creation of inline session to all the algorithms.
Previously the inline session was enabled only for AES-GCM cipher.
Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index c75a5a15f5..04827d7e11 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
}
if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
- struct rte_ipsec_session *ips;
iv_length = 12;
sa_ctx->xf[idx].a.type = RTE_CRYPTO_SYM_XFORM_AEAD;
@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
sa->xforms = &sa_ctx->xf[idx].a;
- ips = ipsec_get_primary_session(sa);
- if (ips->type ==
- RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
- ips->type ==
- RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
- rc = create_inline_session(skt_ctx, sa, ips);
- if (rc != 0) {
- RTE_LOG(ERR, IPSEC_ESP,
- "create_inline_session() failed\n");
- return -EINVAL;
- }
- }
print_one_sa_rule(sa, inbound);
} else {
switch (sa->cipher_algo) {
@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
print_one_sa_rule(sa, inbound);
}
+
+ if (ips->type ==
+ RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
+ ips->type ==
+ RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
+ rc = create_inline_session(skt_ctx, sa, ips);
+ if (rc != 0) {
+ RTE_LOG(ERR, IPSEC_ESP,
+ "create_inline_session() failed\n");
+ return -EINVAL;
+ }
+ }
}
return 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:55.915137861 +0000
+++ 0002-examples-ipsec-secgw-extend-inline-session-to-non-AE.patch 2020-02-27 09:31:55.631945112 +0000
@@ -1,26 +1,27 @@
-From b685f931e1ce33d287e3891d4f19ab07f8d2aa79 Mon Sep 17 00:00:00 2001
+From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 14 Feb 2020 12:08:18 +0530
Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-GCM
+[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
+
This patch extends creation of inline session to all the algorithms.
Previously the inline session was enabled only for AES-GCM cipher.
Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
-Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
- examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
- 1 file changed, 12 insertions(+), 14 deletions(-)
+ examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
-index e75b687c46..4822d6bdaa 100644
+index c75a5a15f5..04827d7e11 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
-@@ -1057,7 +1057,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
+@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
}
if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
@@ -28,11 +29,10 @@
iv_length = 12;
sa_ctx->xf[idx].a.type = RTE_CRYPTO_SYM_XFORM_AEAD;
-@@ -1077,19 +1076,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
- sa->digest_len;
+@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
sa->xforms = &sa_ctx->xf[idx].a;
--
+
- ips = ipsec_get_primary_session(sa);
- if (ips->type ==
- RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
@@ -45,13 +45,14 @@
- return -EINVAL;
- }
- }
+ print_one_sa_rule(sa, inbound);
} else {
switch (sa->cipher_algo) {
- case RTE_CRYPTO_CIPHER_NULL:
-@@ -1156,6 +1142,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
- sa->xforms = &sa_ctx->xf[idx].a;
- }
+@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
+ print_one_sa_rule(sa, inbound);
+ }
++
+ if (ips->type ==
+ RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
+ ips->type ==
@@ -63,10 +64,9 @@
+ return -EINVAL;
+ }
+ }
-+
- print_one_sa_rule(sa, inbound);
}
+ return 0;
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/fips_validation: fix string token for CT length' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix blocking system events' " luca.boccassi
` (38 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ea800a57d6442594a91f23c80e829ab0fb6cde09 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 18 Feb 2020 16:01:12 +0530
Subject: [PATCH] examples/fips_validation: fix string token for CT length
[ upstream commit b1ea86a07cbce6d5b0a9b05a4e0c0fbbe56ad20d ]
The NIST test vectors use the string 'PTlen' to denote text lengths
in case of encrypt & decrypt operations. So the same string needs to be
used while parsing PT and CT.
Fixes: 2adb3b4e7e54 ("examples/fips_validation: fix AES-GCM cipher length parsing")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
examples/fips_validation/fips_validation_gcm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index bc2d37dcbf..47576e9a38 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -19,7 +19,6 @@
#define PTLEN_STR "PTlen = "
#define AADLEN_STR "AADlen = "
#define TAGLEN_STR "Taglen = "
-#define CTLEN_STR "CTlen = "
#define COUNT_STR "Count = "
#define KEY_STR "Key = "
@@ -47,7 +46,10 @@ struct fips_test_callback gcm_interim_vectors[] = {
{KEYLEN_STR, parser_read_uint32_bit_val, &vec.aead.key},
{IVLEN_STR, parser_read_uint32_bit_val, &vec.iv},
{PTLEN_STR, parser_read_uint32_bit_val, &vec.pt},
- {CTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
+ {PTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
+ /**< The NIST test vectors use 'PTlen' to denote input text
+ * length in case of decrypt & encrypt operations.
+ */
{AADLEN_STR, parser_read_uint32_bit_val, &vec.aead.aad},
{TAGLEN_STR, parser_read_uint32_bit_val,
&vec.aead.digest},
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:55.944088518 +0000
+++ 0003-examples-fips_validation-fix-string-token-for-CT-len.patch 2020-02-27 09:31:55.631945112 +0000
@@ -1,8 +1,10 @@
-From b1ea86a07cbce6d5b0a9b05a4e0c0fbbe56ad20d Mon Sep 17 00:00:00 2001
+From ea800a57d6442594a91f23c80e829ab0fb6cde09 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 18 Feb 2020 16:01:12 +0530
Subject: [PATCH] examples/fips_validation: fix string token for CT length
+[ upstream commit b1ea86a07cbce6d5b0a9b05a4e0c0fbbe56ad20d ]
+
The NIST test vectors use the string 'PTlen' to denote text lengths
in case of encrypt & decrypt operations. So the same string needs to be
used while parsing PT and CT.
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix blocking system events' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/fips_validation: fix string token for CT length' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: fix VF reload' " luca.boccassi
` (37 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Tao Zhu; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b0c7e6d600deb39872ad82080c781aaf1b2ad316 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 15 Jan 2020 19:38:48 +0000
Subject: [PATCH] net/ixgbe: fix blocking system events
[ upstream commit 819d0d1d57f17aa40321648e99a50b49adc7bdf6 ]
IXGBE link status task uses rte alarm thread in old implementation.
Sometime ixgbe link status task takes up to 9 seconds. This will
severely affect the rte-alarm-thread dependent tasks in the
system, like interrupt or hotplug event. So replace with an
independent thread which has the same thread affinity settings
as rte interrupt.
Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
drivers/net/ixgbe/Makefile | 1 +
drivers/net/ixgbe/ixgbe_ethdev.c | 50 +++++++++++++++++++++++++++-----
drivers/net/ixgbe/ixgbe_ethdev.h | 2 ++
3 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 85762e2f2a..31523025b3 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -57,6 +57,7 @@ endif
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
LDLIBS += -lrte_bus_pci
+LDLIBS += -lpthread
#
# Add extra flags for base driver files (also known as shared code)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 1646b217a1..51fc0ff09f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -229,7 +229,8 @@ static int ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev);
static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev);
static void ixgbe_dev_interrupt_handler(void *param);
static void ixgbe_dev_interrupt_delayed_handler(void *param);
-static void ixgbe_dev_setup_link_alarm_handler(void *param);
+static void *ixgbe_dev_setup_link_thread_handler(void *param);
+static void ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev);
static int ixgbe_add_rar(struct rte_eth_dev *dev,
struct rte_ether_addr *mac_addr,
@@ -1076,6 +1077,7 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
static int
eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
{
+ struct ixgbe_adapter *ad = eth_dev->data->dev_private;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ixgbe_hw *hw =
@@ -1127,6 +1129,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
return 0;
}
+ rte_atomic32_clear(&ad->link_thread_running);
rte_eth_copy_pci_info(eth_dev, pci_dev);
/* Vendor and Device ID need to be set before init of shared code */
@@ -1565,6 +1568,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
{
int diag;
uint32_t tc, tcs;
+ struct ixgbe_adapter *ad = eth_dev->data->dev_private;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ixgbe_hw *hw =
@@ -1605,6 +1609,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ rte_atomic32_clear(&ad->link_thread_running);
ixgbevf_parse_devargs(eth_dev->data->dev_private,
pci_dev->device.devargs);
@@ -2560,7 +2565,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
/* Stop the link setup handler before resetting the HW. */
- rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+ ixgbe_dev_cancel_link_thread(dev);
/* disable uio/vfio intr/eventfd mapping */
rte_intr_disable(intr_handle);
@@ -2841,7 +2846,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+ ixgbe_dev_cancel_link_thread(dev);
/* disable interrupts */
ixgbe_disable_intr(hw);
@@ -4095,9 +4100,23 @@ out:
}
static void
-ixgbe_dev_setup_link_alarm_handler(void *param)
+ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev)
+{
+ struct ixgbe_adapter *ad = dev->data->dev_private;
+ void *retval;
+
+ if (rte_atomic32_read(&ad->link_thread_running)) {
+ pthread_cancel(ad->link_thread_tid);
+ pthread_join(ad->link_thread_tid, &retval);
+ rte_atomic32_clear(&ad->link_thread_running);
+ }
+}
+
+static void *
+ixgbe_dev_setup_link_thread_handler(void *param)
{
struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+ struct ixgbe_adapter *ad = dev->data->dev_private;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ixgbe_interrupt *intr =
IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
@@ -4111,6 +4130,8 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
ixgbe_setup_link(hw, speed, true);
intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
+ rte_atomic32_clear(&ad->link_thread_running);
+ return NULL;
}
/*
@@ -4151,6 +4172,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
int wait_to_complete, int vf)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct ixgbe_adapter *ad = dev->data->dev_private;
struct rte_eth_link link;
ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_UNKNOWN;
struct ixgbe_interrupt *intr =
@@ -4196,8 +4218,20 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
if (link_up == 0) {
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
- rte_eal_alarm_set(10,
- ixgbe_dev_setup_link_alarm_handler, dev);
+ if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
+ if (rte_ctrl_thread_create(&ad->link_thread_tid,
+ "ixgbe-link-handler",
+ NULL,
+ ixgbe_dev_setup_link_thread_handler,
+ dev) < 0) {
+ PMD_DRV_LOG(ERR,
+ "Create link thread failed!");
+ rte_atomic32_clear(&ad->link_thread_running);
+ }
+ } else {
+ PMD_DRV_LOG(ERR,
+ "Other link thread is running now!");
+ }
}
return rte_eth_linkstatus_set(dev, &link);
}
@@ -5241,7 +5275,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
/* Stop the link setup handler before resetting the HW. */
- rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+ ixgbe_dev_cancel_link_thread(dev);
err = hw->mac.ops.reset_hw(hw);
if (err) {
@@ -5339,7 +5373,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- rte_eal_alarm_cancel(ixgbe_dev_setup_link_alarm_handler, dev);
+ ixgbe_dev_cancel_link_thread(dev);
ixgbevf_intr_disable(dev);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 76a1b9d184..318fbe6215 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -510,6 +510,8 @@ struct ixgbe_adapter {
* mailbox status) link status.
*/
uint8_t pflink_fullchk;
+ rte_atomic32_t link_thread_running;
+ pthread_t link_thread_tid;
};
struct ixgbe_vf_representor {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:55.972344880 +0000
+++ 0004-net-ixgbe-fix-blocking-system-events.patch 2020-02-27 09:31:55.643945200 +0000
@@ -1,8 +1,10 @@
-From 819d0d1d57f17aa40321648e99a50b49adc7bdf6 Mon Sep 17 00:00:00 2001
+From b0c7e6d600deb39872ad82080c781aaf1b2ad316 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 15 Jan 2020 19:38:48 +0000
Subject: [PATCH] net/ixgbe: fix blocking system events
+[ upstream commit 819d0d1d57f17aa40321648e99a50b49adc7bdf6 ]
+
IXGBE link status task uses rte alarm thread in old implementation.
Sometime ixgbe link status task takes up to 9 seconds. This will
severely affect the rte-alarm-thread dependent tasks in the
@@ -11,7 +13,6 @@
as rte interrupt.
Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
-Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -22,7 +23,7 @@
3 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
-index 8b9d51f753..aec56a6807 100644
+index 85762e2f2a..31523025b3 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -57,6 +57,7 @@ endif
@@ -34,7 +35,7 @@
#
# Add extra flags for base driver files (also known as shared code)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 2a248a3f27..0ef84a2861 100644
+index 1646b217a1..51fc0ff09f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -229,7 +229,8 @@ static int ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev);
@@ -47,7 +48,7 @@
static int ixgbe_add_rar(struct rte_eth_dev *dev,
struct rte_ether_addr *mac_addr,
-@@ -1078,6 +1079,7 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
+@@ -1076,6 +1077,7 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
static int
eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
{
@@ -55,7 +56,7 @@
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ixgbe_hw *hw =
-@@ -1129,6 +1131,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1127,6 +1129,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
return 0;
}
@@ -63,7 +64,7 @@
rte_eth_copy_pci_info(eth_dev, pci_dev);
/* Vendor and Device ID need to be set before init of shared code */
-@@ -1567,6 +1570,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1565,6 +1568,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
{
int diag;
uint32_t tc, tcs;
@@ -71,7 +72,7 @@
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ixgbe_hw *hw =
-@@ -1607,6 +1611,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1605,6 +1609,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
@@ -79,7 +80,7 @@
ixgbevf_parse_devargs(eth_dev->data->dev_private,
pci_dev->device.devargs);
-@@ -2563,7 +2568,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
+@@ -2560,7 +2565,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
/* Stop the link setup handler before resetting the HW. */
@@ -88,7 +89,7 @@
/* disable uio/vfio intr/eventfd mapping */
rte_intr_disable(intr_handle);
-@@ -2844,7 +2849,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2841,7 +2846,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
@@ -97,7 +98,7 @@
/* disable interrupts */
ixgbe_disable_intr(hw);
-@@ -4098,9 +4103,23 @@ out:
+@@ -4095,9 +4100,23 @@ out:
}
static void
@@ -122,7 +123,7 @@
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ixgbe_interrupt *intr =
IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
-@@ -4114,6 +4133,8 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
+@@ -4111,6 +4130,8 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
ixgbe_setup_link(hw, speed, true);
intr->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
@@ -131,7 +132,7 @@
}
/*
-@@ -4155,6 +4176,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4151,6 +4172,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
int wait_to_complete, int vf)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -139,7 +140,7 @@
struct rte_eth_link link;
ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_UNKNOWN;
struct ixgbe_interrupt *intr =
-@@ -4200,8 +4222,20 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4196,8 +4218,20 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
if (link_up == 0) {
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
@@ -162,7 +163,7 @@
}
return rte_eth_linkstatus_set(dev, &link);
}
-@@ -5245,7 +5279,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5241,7 +5275,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
/* Stop the link setup handler before resetting the HW. */
@@ -171,7 +172,7 @@
err = hw->mac.ops.reset_hw(hw);
if (err) {
-@@ -5343,7 +5377,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5339,7 +5373,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
@@ -181,10 +182,10 @@
ixgbevf_intr_disable(dev);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
-index e1cd8fd16c..5089347a7e 100644
+index 76a1b9d184..318fbe6215 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
-@@ -511,6 +511,8 @@ struct ixgbe_adapter {
+@@ -510,6 +510,8 @@ struct ixgbe_adapter {
* mailbox status) link status.
*/
uint8_t pflink_fullchk;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/qede: fix VF reload' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (2 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix blocking system events' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: do not stop vport if not started' " luca.boccassi
` (36 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Manish Chopra; +Cc: Shahed Shaikh, Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 06af4c872987b53f156fa4179df5b0fabee8abbc Mon Sep 17 00:00:00 2001
From: Manish Chopra <manishc@marvell.com>
Date: Thu, 6 Feb 2020 12:01:45 -0800
Subject: [PATCH] net/qede: fix VF reload
[ upstream commit f44ca48c81e823edda67189220a4bf7659cc22c1 ]
On ungraceful termination of DPDK application, PMD VF driver
fails to re-load due to PF seeing the VF in unexpected state
during VF acquisition handshake.
This patch fixes it by allowing VF to request the PF for soft
FLR during the load in such cases so that it can get cleanly
re-loaded.
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/base/ecore_dev.c | 2 +-
drivers/net/qede/base/ecore_dev_api.h | 3 ++
drivers/net/qede/base/ecore_iov_api.h | 1 +
drivers/net/qede/base/ecore_sriov.c | 33 ++++++++++++++++
drivers/net/qede/base/ecore_vf.c | 55 +++++++++++++++++++++++++--
drivers/net/qede/base/ecore_vf.h | 11 +++++-
drivers/net/qede/base/ecore_vf_api.h | 3 ++
drivers/net/qede/base/ecore_vfpf_if.h | 41 ++++++++++++++++++++
drivers/net/qede/base/mcp_public.h | 2 +
drivers/net/qede/qede_main.c | 4 ++
10 files changed, 149 insertions(+), 6 deletions(-)
diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index f33b9910c0..86ecfb2690 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -5617,7 +5617,7 @@ ecore_hw_prepare_single(struct ecore_hwfn *p_hwfn, void OSAL_IOMEM *p_regview,
p_hwfn->db_phys_addr = db_phys_addr;
if (IS_VF(p_dev))
- return ecore_vf_hw_prepare(p_hwfn);
+ return ecore_vf_hw_prepare(p_hwfn, p_params);
/* Validate that chip access is feasible */
if (REG_RD(p_hwfn, PXP_PF_ME_OPAQUE_ADDR) == 0xffffffff) {
diff --git a/drivers/net/qede/base/ecore_dev_api.h b/drivers/net/qede/base/ecore_dev_api.h
index 4d5cc1a0fa..5ea8427a07 100644
--- a/drivers/net/qede/base/ecore_dev_api.h
+++ b/drivers/net/qede/base/ecore_dev_api.h
@@ -277,6 +277,9 @@ struct ecore_hw_prepare_params {
/* Indicates whether this PF serves a storage target */
bool b_is_target;
+
+ /* retry count for VF acquire on channel timeout */
+ u8 acquire_retry_cnt;
};
/**
diff --git a/drivers/net/qede/base/ecore_iov_api.h b/drivers/net/qede/base/ecore_iov_api.h
index c998dbf8d5..5450018121 100644
--- a/drivers/net/qede/base/ecore_iov_api.h
+++ b/drivers/net/qede/base/ecore_iov_api.h
@@ -51,6 +51,7 @@ enum ecore_iov_pf_to_vf_status {
PFVF_STATUS_NO_RESOURCE,
PFVF_STATUS_FORCED,
PFVF_STATUS_MALICIOUS,
+ PFVF_STATUS_ACQUIRED,
};
struct ecore_mcp_link_params;
diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index deee04ac4b..e60257e190 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -61,6 +61,39 @@ const char *qede_ecore_channel_tlvs_string[] = {
"CHANNEL_TLV_COALESCE_READ",
"CHANNEL_TLV_BULLETIN_UPDATE_MAC",
"CHANNEL_TLV_UPDATE_MTU",
+ "CHANNEL_TLV_RDMA_ACQUIRE",
+ "CHANNEL_TLV_RDMA_START",
+ "CHANNEL_TLV_RDMA_STOP",
+ "CHANNEL_TLV_RDMA_ADD_USER",
+ "CHANNEL_TLV_RDMA_REMOVE_USER",
+ "CHANNEL_TLV_RDMA_QUERY_COUNTERS",
+ "CHANNEL_TLV_RDMA_ALLOC_TID",
+ "CHANNEL_TLV_RDMA_REGISTER_TID",
+ "CHANNEL_TLV_RDMA_DEREGISTER_TID",
+ "CHANNEL_TLV_RDMA_FREE_TID",
+ "CHANNEL_TLV_RDMA_CREATE_CQ",
+ "CHANNEL_TLV_RDMA_RESIZE_CQ",
+ "CHANNEL_TLV_RDMA_DESTROY_CQ",
+ "CHANNEL_TLV_RDMA_CREATE_QP",
+ "CHANNEL_TLV_RDMA_MODIFY_QP",
+ "CHANNEL_TLV_RDMA_QUERY_QP",
+ "CHANNEL_TLV_RDMA_DESTROY_QP",
+ "CHANNEL_TLV_RDMA_CREATE_SRQ",
+ "CHANNEL_TLV_RDMA_MODIFY_SRQ",
+ "CHANNEL_TLV_RDMA_DESTROY_SRQ",
+ "CHANNEL_TLV_RDMA_QUERY_PORT",
+ "CHANNEL_TLV_RDMA_QUERY_DEVICE",
+ "CHANNEL_TLV_RDMA_IWARP_CONNECT",
+ "CHANNEL_TLV_RDMA_IWARP_ACCEPT",
+ "CHANNEL_TLV_RDMA_IWARP_CREATE_LISTEN",
+ "CHANNEL_TLV_RDMA_IWARP_DESTROY_LISTEN",
+ "CHANNEL_TLV_RDMA_IWARP_PAUSE_LISTEN",
+ "CHANNEL_TLV_RDMA_IWARP_REJECT",
+ "CHANNEL_TLV_RDMA_IWARP_SEND_RTR",
+ "CHANNEL_TLV_ESTABLISH_LL2_CONN",
+ "CHANNEL_TLV_TERMINATE_LL2_CONN",
+ "CHANNEL_TLV_ASYNC_EVENT",
+ "CHANNEL_TLV_SOFT_FLR",
"CHANNEL_TLV_MAX"
};
diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index 24846cfb51..0e5b7d5eb3 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -226,7 +226,6 @@ enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn)
return _ecore_vf_pf_release(p_hwfn, true);
}
-#define VF_ACQUIRE_THRESH 3
static void ecore_vf_pf_acquire_reduce_resc(struct ecore_hwfn *p_hwfn,
struct vf_pf_resc_request *p_req,
struct pf_vf_resc *p_resp)
@@ -251,13 +250,47 @@ static void ecore_vf_pf_acquire_reduce_resc(struct ecore_hwfn *p_hwfn,
p_req->num_cids = p_resp->num_cids;
}
-static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
+static enum _ecore_status_t
+ecore_vf_pf_soft_flr_acquire(struct ecore_hwfn *p_hwfn)
+{
+ struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
+ struct pfvf_def_resp_tlv *resp;
+ struct vfpf_soft_flr_tlv *req;
+ enum _ecore_status_t rc;
+
+ req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_SOFT_FLR, sizeof(*req));
+
+ /* add list termination tlv */
+ ecore_add_tlv(&p_iov->offset,
+ CHANNEL_TLV_LIST_END,
+ sizeof(struct channel_list_end_tlv));
+
+ resp = &p_iov->pf2vf_reply->default_resp;
+ rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
+
+ DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "rc=0x%x\n", rc);
+
+ /* to release the mutex as ecore_vf_pf_acquire() take the mutex */
+ ecore_vf_pf_req_end(p_hwfn, ECORE_AGAIN);
+
+ /* As of today, there is no mechanism in place for VF to know the FLR
+ * status, so sufficiently (worst case time) wait for FLR to complete,
+ * as mailbox request to MFW by the PF for initiating VF flr and PF
+ * processing VF FLR could take time.
+ */
+ OSAL_MSLEEP(3000);
+
+ return ecore_vf_pf_acquire(p_hwfn);
+}
+
+enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
{
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
struct pfvf_acquire_resp_tlv *resp = &p_iov->pf2vf_reply->acquire_resp;
struct pf_vf_pfdev_info *pfdev_info = &resp->pfdev_info;
struct ecore_vf_acquire_sw_info vf_sw_info;
struct ecore_dev *p_dev = p_hwfn->p_dev;
+ u8 retry_cnt = p_iov->acquire_retry_cnt;
struct vf_pf_resc_request *p_resc;
bool resources_acquired = false;
struct vfpf_acquire_tlv *req;
@@ -318,6 +351,14 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
/* send acquire request */
rc = ecore_send_msg2pf(p_hwfn,
&resp->hdr.status, sizeof(*resp));
+
+ if (retry_cnt && rc == ECORE_TIMEOUT) {
+ DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+ "VF retrying to acquire due to VPC timeout\n");
+ retry_cnt--;
+ continue;
+ }
+
if (rc != ECORE_SUCCESS)
goto exit;
@@ -343,7 +384,7 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
resources_acquired = true;
} /* PF refuses to allocate our resources */
else if (resp->hdr.status == PFVF_STATUS_NO_RESOURCE &&
- attempts < VF_ACQUIRE_THRESH) {
+ attempts < ECORE_VF_ACQUIRE_THRESH) {
ecore_vf_pf_acquire_reduce_resc(p_hwfn, p_resc,
&resp->resc);
@@ -391,6 +432,9 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
"PF rejected acquisition by VF\n");
rc = ECORE_INVAL;
goto exit;
+ } else if (resp->hdr.status == PFVF_STATUS_ACQUIRED) {
+ ecore_vf_pf_req_end(p_hwfn, ECORE_AGAIN);
+ return ecore_vf_pf_soft_flr_acquire(p_hwfn);
} else {
DP_ERR(p_hwfn,
"PF returned err %d to VF acquisition request\n",
@@ -477,7 +521,9 @@ u32 ecore_vf_hw_bar_size(struct ecore_hwfn *p_hwfn,
return 0;
}
-enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn)
+enum _ecore_status_t
+ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn,
+ struct ecore_hw_prepare_params *p_params)
{
struct ecore_hwfn *p_lead = ECORE_LEADING_HWFN(p_hwfn->p_dev);
struct ecore_vf_iov *p_iov;
@@ -583,6 +629,7 @@ enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn)
#endif
OSAL_MUTEX_INIT(&p_iov->mutex);
+ p_iov->acquire_retry_cnt = p_params->acquire_retry_cnt;
p_hwfn->vf_iov_info = p_iov;
p_hwfn->hw_info.personality = ECORE_PCI_ETH;
diff --git a/drivers/net/qede/base/ecore_vf.h b/drivers/net/qede/base/ecore_vf.h
index a07f82ebd9..f027eba3ea 100644
--- a/drivers/net/qede/base/ecore_vf.h
+++ b/drivers/net/qede/base/ecore_vf.h
@@ -11,6 +11,7 @@
#include "ecore_vf_api.h"
#include "ecore_l2_api.h"
#include "ecore_vfpf_if.h"
+#include "ecore_dev_api.h"
/* Default number of CIDs [total of both Rx and Tx] to be requested
* by default.
@@ -59,6 +60,9 @@ struct ecore_vf_iov {
* bar or via the doorbell bar.
*/
bool b_doorbell_bar;
+
+ /* retry count for VF acquire on channel timeout */
+ u8 acquire_retry_cnt;
};
/**
@@ -72,6 +76,8 @@ struct ecore_vf_iov {
enum _ecore_status_t ecore_vf_pf_get_coalesce(struct ecore_hwfn *p_hwfn,
u16 *p_coal,
struct ecore_queue_cid *p_cid);
+
+enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn);
/**
* @brief VF - Set Rx/Tx coalesce per VF's relative queue.
* Coalesce value '0' will omit the configuration.
@@ -92,10 +98,13 @@ enum _ecore_status_t ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
* sends ACQUIRE message
*
* @param p_hwfn
+ * @param p_params
*
* @return enum _ecore_status_t
*/
-enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn);
+enum _ecore_status_t
+ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn,
+ struct ecore_hw_prepare_params *p_params);
/**
* @brief VF - start the RX Queue by sending a message to the PF
diff --git a/drivers/net/qede/base/ecore_vf_api.h b/drivers/net/qede/base/ecore_vf_api.h
index 1a9fb3b1f2..43951a9a34 100644
--- a/drivers/net/qede/base/ecore_vf_api.h
+++ b/drivers/net/qede/base/ecore_vf_api.h
@@ -11,6 +11,9 @@
#include "ecore_mcp_api.h"
#ifdef CONFIG_ECORE_SRIOV
+
+#define ECORE_VF_ACQUIRE_THRESH 3
+
/**
* @brief Read the VF bulletin and act on it if needed
*
diff --git a/drivers/net/qede/base/ecore_vfpf_if.h b/drivers/net/qede/base/ecore_vfpf_if.h
index c7ecb01c28..f92dc428af 100644
--- a/drivers/net/qede/base/ecore_vfpf_if.h
+++ b/drivers/net/qede/base/ecore_vfpf_if.h
@@ -251,6 +251,13 @@ struct vfpf_qid_tlv {
u8 padding[3];
};
+/* Soft FLR req */
+struct vfpf_soft_flr_tlv {
+ struct vfpf_first_tlv first_tlv;
+ u32 reserved1;
+ u32 reserved2;
+};
+
/* Setup Queue */
struct vfpf_start_rxq_tlv {
struct vfpf_first_tlv first_tlv;
@@ -557,6 +564,7 @@ union vfpf_tlvs {
struct vfpf_read_coal_req_tlv read_coal_req;
struct vfpf_bulletin_update_mac_tlv bulletin_update_mac;
struct vfpf_update_mtu_tlv update_mtu;
+ struct vfpf_soft_flr_tlv soft_flr;
struct tlv_buffer_size tlv_buf_size;
};
@@ -689,6 +697,39 @@ enum {
CHANNEL_TLV_COALESCE_READ,
CHANNEL_TLV_BULLETIN_UPDATE_MAC,
CHANNEL_TLV_UPDATE_MTU,
+ CHANNEL_TLV_RDMA_ACQUIRE,
+ CHANNEL_TLV_RDMA_START,
+ CHANNEL_TLV_RDMA_STOP,
+ CHANNEL_TLV_RDMA_ADD_USER,
+ CHANNEL_TLV_RDMA_REMOVE_USER,
+ CHANNEL_TLV_RDMA_QUERY_COUNTERS,
+ CHANNEL_TLV_RDMA_ALLOC_TID,
+ CHANNEL_TLV_RDMA_REGISTER_TID,
+ CHANNEL_TLV_RDMA_DEREGISTER_TID,
+ CHANNEL_TLV_RDMA_FREE_TID,
+ CHANNEL_TLV_RDMA_CREATE_CQ,
+ CHANNEL_TLV_RDMA_RESIZE_CQ,
+ CHANNEL_TLV_RDMA_DESTROY_CQ,
+ CHANNEL_TLV_RDMA_CREATE_QP,
+ CHANNEL_TLV_RDMA_MODIFY_QP,
+ CHANNEL_TLV_RDMA_QUERY_QP,
+ CHANNEL_TLV_RDMA_DESTROY_QP,
+ CHANNEL_TLV_RDMA_QUERY_PORT,
+ CHANNEL_TLV_RDMA_QUERY_DEVICE,
+ CHANNEL_TLV_RDMA_IWARP_CONNECT,
+ CHANNEL_TLV_RDMA_IWARP_ACCEPT,
+ CHANNEL_TLV_RDMA_IWARP_CREATE_LISTEN,
+ CHANNEL_TLV_RDMA_IWARP_DESTROY_LISTEN,
+ CHANNEL_TLV_RDMA_IWARP_PAUSE_LISTEN,
+ CHANNEL_TLV_RDMA_IWARP_REJECT,
+ CHANNEL_TLV_RDMA_IWARP_SEND_RTR,
+ CHANNEL_TLV_ESTABLISH_LL2_CONN,
+ CHANNEL_TLV_TERMINATE_LL2_CONN,
+ CHANNEL_TLV_ASYNC_EVENT,
+ CHANNEL_TLV_RDMA_CREATE_SRQ,
+ CHANNEL_TLV_RDMA_MODIFY_SRQ,
+ CHANNEL_TLV_RDMA_DESTROY_SRQ,
+ CHANNEL_TLV_SOFT_FLR,
CHANNEL_TLV_MAX,
/* Required for iterating over vport-update tlvs.
diff --git a/drivers/net/qede/base/mcp_public.h b/drivers/net/qede/base/mcp_public.h
index 98b9723dd4..6667c2d7ab 100644
--- a/drivers/net/qede/base/mcp_public.h
+++ b/drivers/net/qede/base/mcp_public.h
@@ -1290,6 +1290,7 @@ struct public_drv_mb {
/*deprecated don't use*/
#define DRV_MSG_CODE_INITIATE_FLR_DEPRECATED 0x02000000
#define DRV_MSG_CODE_INITIATE_PF_FLR 0x02010000
+#define DRV_MSG_CODE_INITIATE_VF_FLR 0x02020000
#define DRV_MSG_CODE_VF_DISABLED_DONE 0xc0000000
#define DRV_MSG_CODE_CFG_VF_MSIX 0xc0010000
#define DRV_MSG_CODE_CFG_PF_VFS_MSIX 0xc0020000
@@ -1749,6 +1750,7 @@ struct public_drv_mb {
#define FW_MSG_CODE_NIG_DRAIN_DONE 0x30000000
#define FW_MSG_CODE_VF_DISABLED_DONE 0xb0000000
#define FW_MSG_CODE_DRV_CFG_VF_MSIX_DONE 0xb0010000
+#define FW_MSG_CODE_INITIATE_VF_FLR_OK 0xb0030000
#define FW_MSG_CODE_ERR_RESOURCE_TEMPORARY_UNAVAILABLE 0x008b0000
#define FW_MSG_CODE_ERR_RESOURCE_ALREADY_ALLOCATED 0x008c0000
#define FW_MSG_CODE_ERR_RESOURCE_NOT_ALLOCATED 0x008d0000
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 4eb79d0fbb..8580cbcd7f 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -56,6 +56,10 @@ qed_probe(struct ecore_dev *edev, struct rte_pci_device *pci_dev,
qed_init_pci(edev, pci_dev);
memset(&hw_prepare_params, 0, sizeof(hw_prepare_params));
+
+ if (is_vf)
+ hw_prepare_params.acquire_retry_cnt = ECORE_VF_ACQUIRE_THRESH;
+
hw_prepare_params.personality = ECORE_PCI_ETH;
hw_prepare_params.drv_resc_alloc = false;
hw_prepare_params.chk_reg_fifo = false;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.008622713 +0000
+++ 0005-net-qede-fix-VF-reload.patch 2020-02-27 09:31:55.659945317 +0000
@@ -1,8 +1,10 @@
-From f44ca48c81e823edda67189220a4bf7659cc22c1 Mon Sep 17 00:00:00 2001
+From 06af4c872987b53f156fa4179df5b0fabee8abbc Mon Sep 17 00:00:00 2001
From: Manish Chopra <manishc@marvell.com>
Date: Thu, 6 Feb 2020 12:01:45 -0800
Subject: [PATCH] net/qede: fix VF reload
+[ upstream commit f44ca48c81e823edda67189220a4bf7659cc22c1 ]
+
On ungraceful termination of DPDK application, PMD VF driver
fails to re-load due to PF seeing the VF in unexpected state
during VF acquisition handshake.
@@ -12,7 +14,6 @@
re-loaded.
Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
@@ -115,7 +116,7 @@
};
diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
-index c5c0814262..db03bc494f 100644
+index 24846cfb51..0e5b7d5eb3 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -226,7 +226,6 @@ enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/qede: do not stop vport if not started' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (3 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: fix VF reload' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/octeontx2: fix PTP' " luca.boccassi
` (35 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Manish Chopra; +Cc: Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 7453074ee57c72795ce2cc70268181631c8714d0 Mon Sep 17 00:00:00 2001
From: Manish Chopra <manishc@marvell.com>
Date: Thu, 6 Feb 2020 12:01:46 -0800
Subject: [PATCH] net/qede: do not stop vport if not started
[ upstream commit bf44e27af5a4840b2965c71a89eccfc01b5c58bf ]
Stopping an already disabled vport leads to firmware
assert. Stop the vport only if it was started.
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/qede_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 19d2e96191..e01d437f19 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1472,7 +1472,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
if (eth_dev->data->dev_started)
qede_dev_stop(eth_dev);
- qede_stop_vport(edev);
+ if (qdev->vport_started)
+ qede_stop_vport(edev);
qdev->vport_started = false;
qede_fdir_dealloc_resc(eth_dev);
qede_dealloc_fp_resc(eth_dev);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.051999658 +0000
+++ 0006-net-qede-do-not-stop-vport-if-not-started.patch 2020-02-27 09:31:55.663945346 +0000
@@ -1,13 +1,14 @@
-From bf44e27af5a4840b2965c71a89eccfc01b5c58bf Mon Sep 17 00:00:00 2001
+From 7453074ee57c72795ce2cc70268181631c8714d0 Mon Sep 17 00:00:00 2001
From: Manish Chopra <manishc@marvell.com>
Date: Thu, 6 Feb 2020 12:01:46 -0800
Subject: [PATCH] net/qede: do not stop vport if not started
+[ upstream commit bf44e27af5a4840b2965c71a89eccfc01b5c58bf ]
+
Stopping an already disabled vport leads to firmware
assert. Stop the vport only if it was started.
Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
@@ -16,10 +17,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index 500440c2ca..74dfe895ad 100644
+index 19d2e96191..e01d437f19 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
-@@ -1509,7 +1509,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1472,7 +1472,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
if (eth_dev->data->dev_started)
qede_dev_stop(eth_dev);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix PTP' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (4 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: do not stop vport if not started' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: check for illegal Tx packets' " luca.boccassi
` (34 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From efd0744fc65671224158f87afd1a36b16dcfc25b Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Sat, 15 Feb 2020 14:05:03 +0530
Subject: [PATCH] net/octeontx2: fix PTP
[ upstream commit 93a9afdb4b10f02aa06b8e58ffa403e10bc32bba ]
PTP functionality has been broken after a change in kernel
where enum npc_kpu_lc_ltype is change to allow adjustment of
LTYPE_MASK to detect all types of IP headers.
Syncing the required changes in DPDK to fix the issue.
The kernel side changes available in marvell SDK version SDK-10.3.2.x.
Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/octeontx2/hw/otx2_npc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
index a0536e0aed..3dfc137a30 100644
--- a/drivers/common/octeontx2/hw/otx2_npc.h
+++ b/drivers/common/octeontx2/hw/otx2_npc.h
@@ -201,7 +201,8 @@ enum npc_kpu_lb_ltype {
};
enum npc_kpu_lc_ltype {
- NPC_LT_LC_IP = 1,
+ NPC_LT_LC_PTP = 1,
+ NPC_LT_LC_IP,
NPC_LT_LC_IP_OPT,
NPC_LT_LC_IP6,
NPC_LT_LC_IP6_EXT,
@@ -209,7 +210,6 @@ enum npc_kpu_lc_ltype {
NPC_LT_LC_RARP,
NPC_LT_LC_MPLS,
NPC_LT_LC_NSH,
- NPC_LT_LC_PTP,
NPC_LT_LC_FCOE,
};
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.081246361 +0000
+++ 0007-net-octeontx2-fix-PTP.patch 2020-02-27 09:31:55.663945346 +0000
@@ -1,8 +1,10 @@
-From 93a9afdb4b10f02aa06b8e58ffa403e10bc32bba Mon Sep 17 00:00:00 2001
+From efd0744fc65671224158f87afd1a36b16dcfc25b Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Sat, 15 Feb 2020 14:05:03 +0530
Subject: [PATCH] net/octeontx2: fix PTP
+[ upstream commit 93a9afdb4b10f02aa06b8e58ffa403e10bc32bba ]
+
PTP functionality has been broken after a change in kernel
where enum npc_kpu_lc_ltype is change to allow adjustment of
LTYPE_MASK to detect all types of IP headers.
@@ -11,7 +13,6 @@
The kernel side changes available in marvell SDK version SDK-10.3.2.x.
Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
-Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: check for illegal Tx packets' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (5 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/octeontx2: fix PTP' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' " luca.boccassi
` (33 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Xiao Zhang; +Cc: Konstantin Ananyev, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From dc50bc8425ce7964f6ac61a0396cb2d716243786 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Mon, 17 Feb 2020 22:51:15 +0800
Subject: [PATCH] net/ixgbe: check for illegal Tx packets
[ upstream commit fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a ]
For ixgbe, there is restriction that data buffers of any transmitted
packet must include at least 12 bytes of the src/dst Ethernet MAC
addresses as well as 2 bytes of the Type/Len field, otherwise, tx hang
would happen.
This patch adds check for those illegal packets and protects TX from
hanging.
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++++++
drivers/net/ixgbe/ixgbe_rxtx.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 91f5fe1517..a7b24cd053 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -988,6 +988,12 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
return i;
}
+ /* check the size of packet */
+ if (m->pkt_len < IXGBE_TX_MIN_PKT_LEN) {
+ rte_errno = EINVAL;
+ return i;
+ }
+
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 505d344b9c..5e1ac44942 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -53,6 +53,8 @@
#define IXGBE_TX_MAX_SEG 40
+#define IXGBE_TX_MIN_PKT_LEN 14
+
#define IXGBE_PACKET_TYPE_MASK_82599 0X7F
#define IXGBE_PACKET_TYPE_MASK_X550 0X10FF
#define IXGBE_PACKET_TYPE_MASK_TUNNEL 0XFF
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.107195811 +0000
+++ 0008-net-ixgbe-check-for-illegal-Tx-packets.patch 2020-02-27 09:31:55.667945376 +0000
@@ -1,8 +1,10 @@
-From fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a Mon Sep 17 00:00:00 2001
+From dc50bc8425ce7964f6ac61a0396cb2d716243786 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Mon, 17 Feb 2020 22:51:15 +0800
Subject: [PATCH] net/ixgbe: check for illegal Tx packets
+[ upstream commit fc6f59a0d61b3a27b04bf0603c3fc62afb2fa49a ]
+
For ixgbe, there is restriction that data buffers of any transmitted
packet must include at least 12 bytes of the src/dst Ethernet MAC
addresses as well as 2 bytes of the Type/Len field, otherwise, tx hang
@@ -12,7 +14,6 @@
hanging.
Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
-Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -23,10 +24,10 @@
2 files changed, 8 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index 7b398f1a1b..f839bcaab7 100644
+index 91f5fe1517..a7b24cd053 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
-@@ -986,6 +986,12 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -988,6 +988,12 @@ ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
return i;
}
@@ -40,7 +41,7 @@
ret = rte_validate_tx_offload(m);
if (ret != 0) {
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
-index 000c5b1194..20a8b291d4 100644
+index 505d344b9c..5e1ac44942 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -53,6 +53,8 @@
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (6 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: check for illegal Tx packets' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix matching for ICMP fragments' " luca.boccassi
` (32 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Matan Azrad; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 818e232a825a26d67a798cfa93566880857c82c7 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 13 Feb 2020 13:03:25 +0000
Subject: [PATCH] net/mlx5: fix tunnel flow priority
[ upstream commit 050bfe033c2dcaff1f6cfb3110aa90bf80071513 ]
The PMD manages internally the priority of the flows in addition to the
user configured priority.
So, 2 flows with the same user priority may get different priority.
The method:
As much as the flow is more specific it gets higher priority
(higher means first to be matched).
In addition, When the user creates a RSS flow the PMD splits the flows
according to the flow RSS layers as the HW requests for RSS TIR.
The internal priority for each flow is decided by the flow last layer.
L2, L3 and L4 (L2 low and L4 high).
The tunnel layer was wrongly decided to be L4 all the time, even when
the flow is configured with inner-RSS.
Hence, the first RSS split which takes the tunnel layer priority all the
time will be matched before the more specific splits.
Change the priority of tunnel layer to be L2 when inner-RSS is
configured.
Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0d902f89fe..57d3b1357d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7295,6 +7295,8 @@ cnt_err:
case RTE_FLOW_ITEM_TYPE_GRE:
flow_dv_translate_item_gre(match_mask, match_value,
items, tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_GRE;
break;
case RTE_FLOW_ITEM_TYPE_GRE_KEY:
@@ -7305,27 +7307,37 @@ cnt_err:
case RTE_FLOW_ITEM_TYPE_NVGRE:
flow_dv_translate_item_nvgre(match_mask, match_value,
items, tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_GRE;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN:
flow_dv_translate_item_vxlan(match_mask, match_value,
items, tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_VXLAN;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
flow_dv_translate_item_vxlan_gpe(match_mask,
match_value, items,
tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_VXLAN_GPE;
break;
case RTE_FLOW_ITEM_TYPE_GENEVE:
flow_dv_translate_item_geneve(match_mask, match_value,
items, tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_GENEVE;
break;
case RTE_FLOW_ITEM_TYPE_MPLS:
flow_dv_translate_item_mpls(match_mask, match_value,
items, last_item, tunnel);
+ matcher.priority = flow->rss.level >= 2 ?
+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_MPLS;
break;
case RTE_FLOW_ITEM_TYPE_MARK:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.139405981 +0000
+++ 0009-net-mlx5-fix-tunnel-flow-priority.patch 2020-02-27 09:31:55.679945463 +0000
@@ -1,8 +1,10 @@
-From 050bfe033c2dcaff1f6cfb3110aa90bf80071513 Mon Sep 17 00:00:00 2001
+From 818e232a825a26d67a798cfa93566880857c82c7 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 13 Feb 2020 13:03:25 +0000
Subject: [PATCH] net/mlx5: fix tunnel flow priority
+[ upstream commit 050bfe033c2dcaff1f6cfb3110aa90bf80071513 ]
+
The PMD manages internally the priority of the flows in addition to the
user configured priority.
@@ -27,19 +29,18 @@
configured.
Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
- drivers/net/mlx5/mlx5_flow_dv.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
+ drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index a9bb0b4f10..a8c8a585a4 100644
+index 0d902f89fe..57d3b1357d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -7620,6 +7620,8 @@ cnt_err:
+@@ -7295,6 +7295,8 @@ cnt_err:
case RTE_FLOW_ITEM_TYPE_GRE:
flow_dv_translate_item_gre(match_mask, match_value,
items, tunnel);
@@ -48,7 +49,7 @@
last_item = MLX5_FLOW_LAYER_GRE;
break;
case RTE_FLOW_ITEM_TYPE_GRE_KEY:
-@@ -7630,27 +7632,37 @@ cnt_err:
+@@ -7305,27 +7307,37 @@ cnt_err:
case RTE_FLOW_ITEM_TYPE_NVGRE:
flow_dv_translate_item_nvgre(match_mask, match_value,
items, tunnel);
@@ -86,15 +87,6 @@
last_item = MLX5_FLOW_LAYER_MPLS;
break;
case RTE_FLOW_ITEM_TYPE_MARK:
-@@ -7692,6 +7704,8 @@ cnt_err:
- case RTE_FLOW_ITEM_TYPE_GTP:
- flow_dv_translate_item_gtp(match_mask, match_value,
- items, tunnel);
-+ matcher.priority = flow->rss.level >= 2 ?
-+ MLX5_PRIORITY_MAP_L2 : MLX5_PRIORITY_MAP_L4;
- last_item = MLX5_FLOW_LAYER_GTP;
- break;
- default:
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix matching for ICMP fragments' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (7 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix flow control mode setting' " luca.boccassi
` (31 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Bing Zhao; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 2d8874356471c962a855fe674506dfe8387ea2ef Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Mon, 17 Feb 2020 22:10:55 +0800
Subject: [PATCH] net/mlx5: fix matching for ICMP fragments
[ upstream commit 72dcb9177367e84f2566a067dc3c65ec2a800c13 ]
The hardware can recognize and mark the layer 4 protocol type for TCP,
UDP and IPSec non-fragmented packets. For all the fragmented packets,
L4 type will be considered as None. This can be used when creating a
flow with L4 matching, then hops number will be reduced and a better
performance could be gained.
But for ICMP packets, it cannot be recognized correctly because it is
not a L4 protocol in the stack, even if the packet format is similar.
All the fragmented and non-fragmented ICMP will have the None L4 type.
Fragmented packets with incomplete headers could not hit the flow,
even for the first fragment. Because then it will make it complex to
defragment for both HW and SW. For other types, the implicit rules
could be used directly and all the fragments will miss the flow.
For ICMP packets, this should be done explicitly because all packets
have None type. The first fragment will still hit the flow if there is
no explicit rule.
All ICMP fragments will still hit the rules like ETH, ETH + IP, and
ETH + IP + "ICMP protocol" only since they are wildcard rules, and
there is no next layer protocol specified field in such rules.
Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6")
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 57d3b1357d..cace0f31b5 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6181,6 +6181,12 @@ flow_dv_translate_item_icmp6(void *matcher, void *key,
return;
if (!icmp6_m)
icmp6_m = &rte_flow_item_icmp6_mask;
+ /*
+ * Force flow only to match the non-fragmented IPv6 ICMPv6 packets.
+ * If only the protocol is specified, no need to match the frag.
+ */
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, frag, 1);
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag, 0);
MLX5_SET(fte_match_set_misc3, misc3_m, icmpv6_type, icmp6_m->type);
MLX5_SET(fte_match_set_misc3, misc3_v, icmpv6_type,
icmp6_v->type & icmp6_m->type);
@@ -6228,6 +6234,12 @@ flow_dv_translate_item_icmp(void *matcher, void *key,
return;
if (!icmp_m)
icmp_m = &rte_flow_item_icmp_mask;
+ /*
+ * Force flow only to match the non-fragmented IPv4 ICMP packets.
+ * If only the protocol is specified, no need to match the frag.
+ */
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, frag, 1);
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag, 0);
MLX5_SET(fte_match_set_misc3, misc3_m, icmp_type,
icmp_m->hdr.icmp_type);
MLX5_SET(fte_match_set_misc3, misc3_v, icmp_type,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.175527120 +0000
+++ 0010-net-mlx5-fix-matching-for-ICMP-fragments.patch 2020-02-27 09:31:55.687945522 +0000
@@ -1,8 +1,10 @@
-From 72dcb9177367e84f2566a067dc3c65ec2a800c13 Mon Sep 17 00:00:00 2001
+From 2d8874356471c962a855fe674506dfe8387ea2ef Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Mon, 17 Feb 2020 22:10:55 +0800
Subject: [PATCH] net/mlx5: fix matching for ICMP fragments
+[ upstream commit 72dcb9177367e84f2566a067dc3c65ec2a800c13 ]
+
The hardware can recognize and mark the layer 4 protocol type for TCP,
UDP and IPSec non-fragmented packets. For all the fragmented packets,
L4 type will be considered as None. This can be used when creating a
@@ -27,7 +29,6 @@
there is no next layer protocol specified field in such rules.
Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6")
-Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -36,10 +37,10 @@
1 file changed, 12 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index a8c8a585a4..341d51152a 100644
+index 57d3b1357d..cace0f31b5 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -6403,6 +6403,12 @@ flow_dv_translate_item_icmp6(void *matcher, void *key,
+@@ -6181,6 +6181,12 @@ flow_dv_translate_item_icmp6(void *matcher, void *key,
return;
if (!icmp6_m)
icmp6_m = &rte_flow_item_icmp6_mask;
@@ -52,7 +53,7 @@
MLX5_SET(fte_match_set_misc3, misc3_m, icmpv6_type, icmp6_m->type);
MLX5_SET(fte_match_set_misc3, misc3_v, icmpv6_type,
icmp6_v->type & icmp6_m->type);
-@@ -6450,6 +6456,12 @@ flow_dv_translate_item_icmp(void *matcher, void *key,
+@@ -6228,6 +6234,12 @@ flow_dv_translate_item_icmp(void *matcher, void *key,
return;
if (!icmp_m)
icmp_m = &rte_flow_item_icmp_mask;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix flow control mode setting' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (8 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix matching for ICMP fragments' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: fix setup error path' " luca.boccassi
` (30 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Guinan Sun; +Cc: Tomasz Konieczny, Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ccbd09be2352fde2afd9f4692cca6eb01b23f88d Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 18 Feb 2020 03:39:31 +0000
Subject: [PATCH] net/ixgbe: fix flow control mode setting
[ upstream commit a524f550da6e6c7a308ce7c2f4b6c3be60b5cbfa ]
When the port restarts, the flow ctrl register will be reset,
we need to make sure it can be configured the same as previous setting,
otherwise a register read error would occur. This patch fixes this
issue.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Tested-by: Tomasz Konieczny <tomaszx.konieczny@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 76 +++++++++++++++++++++-----------
drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
2 files changed, 51 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 51fc0ff09f..3f66b490ed 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1174,8 +1174,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
memset(dcb_config, 0, sizeof(struct ixgbe_dcb_config));
ixgbe_dcb_init(hw, dcb_config);
/* Get Hardware Flow Control setting */
- hw->fc.requested_mode = ixgbe_fc_full;
- hw->fc.current_mode = ixgbe_fc_full;
+ hw->fc.requested_mode = ixgbe_fc_none;
+ hw->fc.current_mode = ixgbe_fc_none;
hw->fc.pause_time = IXGBE_FC_PAUSE;
for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
hw->fc.low_water[i] = IXGBE_FC_LO;
@@ -2536,6 +2536,39 @@ ixgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf,
return 0;
}
+static int
+ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct ixgbe_hw *hw)
+{
+ struct ixgbe_adapter *adapter = dev->data->dev_private;
+ int err;
+ uint32_t mflcn;
+
+ err = ixgbe_fc_enable(hw);
+
+ /* Not negotiated is not an error case */
+ if (err == IXGBE_SUCCESS || err == IXGBE_ERR_FC_NOT_NEGOTIATED) {
+ /*
+ *check if we want to forward MAC frames - driver doesn't
+ *have native capability to do that,
+ *so we'll write the registers ourselves
+ */
+
+ mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN);
+
+ /* set or clear MFLCN.PMCF bit depending on configuration */
+ if (adapter->mac_ctrl_frame_fwd != 0)
+ mflcn |= IXGBE_MFLCN_PMCF;
+ else
+ mflcn &= ~IXGBE_MFLCN_PMCF;
+
+ IXGBE_WRITE_REG(hw, IXGBE_MFLCN, mflcn);
+ IXGBE_WRITE_FLUSH(hw);
+
+ return 0;
+ }
+ return err;
+}
+
/*
* Configure device link speed and setup link.
* It returns 0 on success.
@@ -2661,6 +2694,12 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
ixgbe_restore_statistics_mapping(dev);
+ err = ixgbe_flow_ctrl_enable(dev, hw);
+ if (err < 0) {
+ PMD_INIT_LOG(ERR, "enable flow ctrl err");
+ goto error;
+ }
+
err = ixgbe_dev_rxtx_start(dev);
if (err < 0) {
PMD_INIT_LOG(ERR, "Unable to start rxtx queues");
@@ -2897,6 +2936,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
adapter->rss_reta_updated = 0;
+ adapter->mac_ctrl_frame_fwd = 0;
+
hw->adapter_stopped = true;
}
@@ -4714,10 +4755,10 @@ static int
ixgbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
{
struct ixgbe_hw *hw;
+ struct ixgbe_adapter *adapter = dev->data->dev_private;
int err;
uint32_t rx_buf_size;
uint32_t max_high_water;
- uint32_t mflcn;
enum ixgbe_fc_mode rte_fcmode_2_ixgbe_fcmode[] = {
ixgbe_fc_none,
ixgbe_fc_rx_pause,
@@ -4750,31 +4791,14 @@ ixgbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
hw->fc.low_water[0] = fc_conf->low_water;
hw->fc.send_xon = fc_conf->send_xon;
hw->fc.disable_fc_autoneg = !fc_conf->autoneg;
+ adapter->mac_ctrl_frame_fwd = fc_conf->mac_ctrl_frame_fwd;
- err = ixgbe_fc_enable(hw);
-
- /* Not negotiated is not an error case */
- if ((err == IXGBE_SUCCESS) || (err == IXGBE_ERR_FC_NOT_NEGOTIATED)) {
-
- /* check if we want to forward MAC frames - driver doesn't have native
- * capability to do that, so we'll write the registers ourselves */
-
- mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN);
-
- /* set or clear MFLCN.PMCF bit depending on configuration */
- if (fc_conf->mac_ctrl_frame_fwd != 0)
- mflcn |= IXGBE_MFLCN_PMCF;
- else
- mflcn &= ~IXGBE_MFLCN_PMCF;
-
- IXGBE_WRITE_REG(hw, IXGBE_MFLCN, mflcn);
- IXGBE_WRITE_FLUSH(hw);
-
- return 0;
+ err = ixgbe_flow_ctrl_enable(dev, hw);
+ if (err < 0) {
+ PMD_INIT_LOG(ERR, "ixgbe_flow_ctrl_enable = 0x%x", err);
+ return -EIO;
}
-
- PMD_INIT_LOG(ERR, "ixgbe_fc_enable = 0x%x", err);
- return -EIO;
+ return err;
}
/**
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 318fbe6215..0334c226be 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -510,6 +510,7 @@ struct ixgbe_adapter {
* mailbox status) link status.
*/
uint8_t pflink_fullchk;
+ uint8_t mac_ctrl_frame_fwd;
rte_atomic32_t link_thread_running;
pthread_t link_thread_tid;
};
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.209775167 +0000
+++ 0011-net-ixgbe-fix-flow-control-mode-setting.patch 2020-02-27 09:31:55.699945610 +0000
@@ -1,15 +1,16 @@
-From a524f550da6e6c7a308ce7c2f4b6c3be60b5cbfa Mon Sep 17 00:00:00 2001
+From ccbd09be2352fde2afd9f4692cca6eb01b23f88d Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 18 Feb 2020 03:39:31 +0000
Subject: [PATCH] net/ixgbe: fix flow control mode setting
+[ upstream commit a524f550da6e6c7a308ce7c2f4b6c3be60b5cbfa ]
+
When the port restarts, the flow ctrl register will be reset,
we need to make sure it can be configured the same as previous setting,
otherwise a register read error would occur. This patch fixes this
issue.
Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Tested-by: Tomasz Konieczny <tomaszx.konieczny@intel.com>
@@ -20,10 +21,10 @@
2 files changed, 51 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 0ef84a2861..23b3f5b0cd 100644
+index 51fc0ff09f..3f66b490ed 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -1176,8 +1176,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1174,8 +1174,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
memset(dcb_config, 0, sizeof(struct ixgbe_dcb_config));
ixgbe_dcb_init(hw, dcb_config);
/* Get Hardware Flow Control setting */
@@ -34,7 +35,7 @@
hw->fc.pause_time = IXGBE_FC_PAUSE;
for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
hw->fc.low_water[i] = IXGBE_FC_LO;
-@@ -2538,6 +2538,39 @@ ixgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf,
+@@ -2536,6 +2536,39 @@ ixgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf,
return 0;
}
@@ -74,7 +75,7 @@
/*
* Configure device link speed and setup link.
* It returns 0 on success.
-@@ -2664,6 +2697,12 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
+@@ -2661,6 +2694,12 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
ixgbe_restore_statistics_mapping(dev);
@@ -87,7 +88,7 @@
err = ixgbe_dev_rxtx_start(dev);
if (err < 0) {
PMD_INIT_LOG(ERR, "Unable to start rxtx queues");
-@@ -2900,6 +2939,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2897,6 +2936,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
adapter->rss_reta_updated = 0;
@@ -96,7 +97,7 @@
hw->adapter_stopped = true;
}
-@@ -4718,10 +4759,10 @@ static int
+@@ -4714,10 +4755,10 @@ static int
ixgbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
{
struct ixgbe_hw *hw;
@@ -108,7 +109,7 @@
enum ixgbe_fc_mode rte_fcmode_2_ixgbe_fcmode[] = {
ixgbe_fc_none,
ixgbe_fc_rx_pause,
-@@ -4754,31 +4795,14 @@ ixgbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -4750,31 +4791,14 @@ ixgbe_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
hw->fc.low_water[0] = fc_conf->low_water;
hw->fc.send_xon = fc_conf->send_xon;
hw->fc.disable_fc_autoneg = !fc_conf->autoneg;
@@ -147,10 +148,10 @@
/**
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
-index 5089347a7e..b8df756575 100644
+index 318fbe6215..0334c226be 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
-@@ -511,6 +511,7 @@ struct ixgbe_adapter {
+@@ -510,6 +510,7 @@ struct ixgbe_adapter {
* mailbox status) link status.
*/
uint8_t pflink_fullchk;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: fix setup error path' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (9 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix flow control mode setting' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' " luca.boccassi
` (29 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: David Marchand, Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From a222f3ee7145254de7847e9c4c7d4cb3e2ea42ce Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 18 Feb 2020 18:22:39 +0100
Subject: [PATCH] net/vhost: fix setup error path
[ upstream commit 3e00307549ef7c90a9752f58f1d423542399267c ]
If for some reason vhost_driver_setup() fails, the list
element for the device may be freed without being removed
from the internal list of devices.
This patch fixes all the error paths, by unregistering the
device from Vhost library it has been registered, remove
the device from the list, reset device vring_state pointer
from the global table and only free vring state if it had
been allocated.
Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/vhost/rte_eth_vhost.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 307de2c682..c1b3dffeec 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -879,12 +879,12 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
if (list == NULL)
- goto error;
+ return -1;
vring_state = rte_zmalloc_socket(name, sizeof(*vring_state),
0, numa_node);
if (vring_state == NULL)
- goto error;
+ goto free_list;
list->eth_dev = eth_dev;
pthread_mutex_lock(&internal_list_lock);
@@ -895,30 +895,37 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
vring_states[eth_dev->data->port_id] = vring_state;
if (rte_vhost_driver_register(internal->iface_name, internal->flags))
- goto error;
+ goto list_remove;
if (internal->disable_flags) {
if (rte_vhost_driver_disable_features(internal->iface_name,
internal->disable_flags))
- goto error;
+ goto drv_unreg;
}
if (rte_vhost_driver_callback_register(internal->iface_name,
&vhost_ops) < 0) {
VHOST_LOG(ERR, "Can't register callbacks\n");
- goto error;
+ goto drv_unreg;
}
if (rte_vhost_driver_start(internal->iface_name) < 0) {
VHOST_LOG(ERR, "Failed to start driver for %s\n",
internal->iface_name);
- goto error;
+ goto drv_unreg;
}
return 0;
-error:
+drv_unreg:
+ rte_vhost_driver_unregister(internal->iface_name);
+list_remove:
+ vring_states[eth_dev->data->port_id] = NULL;
+ pthread_mutex_lock(&internal_list_lock);
+ TAILQ_REMOVE(&internal_list, list, next);
+ pthread_mutex_unlock(&internal_list_lock);
rte_free(vring_state);
+free_list:
rte_free(list);
return -1;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.244283332 +0000
+++ 0012-net-vhost-fix-setup-error-path.patch 2020-02-27 09:31:55.699945610 +0000
@@ -1,8 +1,10 @@
-From 3e00307549ef7c90a9752f58f1d423542399267c Mon Sep 17 00:00:00 2001
+From a222f3ee7145254de7847e9c4c7d4cb3e2ea42ce Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 18 Feb 2020 18:22:39 +0100
Subject: [PATCH] net/vhost: fix setup error path
+[ upstream commit 3e00307549ef7c90a9752f58f1d423542399267c ]
+
If for some reason vhost_driver_setup() fails, the list
element for the device may be freed without being removed
from the internal list of devices.
@@ -14,7 +16,6 @@
been allocated.
Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
-Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -24,10 +25,10 @@
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
-index 90263ae77c..4a7b1b608c 100644
+index 307de2c682..c1b3dffeec 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
-@@ -878,12 +878,12 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
+@@ -879,12 +879,12 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
if (list == NULL)
@@ -42,7 +43,7 @@
list->eth_dev = eth_dev;
pthread_mutex_lock(&internal_list_lock);
-@@ -894,30 +894,37 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
+@@ -895,30 +895,37 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
vring_states[eth_dev->data->port_id] = vring_state;
if (rte_vhost_driver_register(internal->iface_name, internal->flags))
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (10 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: fix setup error path' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: add module EEPROM dump to mlx5 features' " luca.boccassi
` (28 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Yinan Wang, David Marchand, Tiwei Bie, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 238736d729ee8c509297836f80b41f0034239587 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 18 Feb 2020 18:22:40 +0100
Subject: [PATCH] net/vhost: prevent multiple setups on reconfiguration
[ upstream commit 366a0500f432a862f37ab2ca220e60f5654eadd7 ]
Ethdev's .dev_configure callback can be called multiple
time during a device life-time, but Vhost makes the
wrong assumption that it is not the case and try to
setup again the device on reconfiguration.
This patch ensures the device hasn't been already setup
before proceeding.
Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/vhost/rte_eth_vhost.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index c1b3dffeec..c5e3fa229a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -877,6 +877,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
unsigned int numa_node = eth_dev->device->numa_node;
const char *name = eth_dev->device->name;
+ /* Don't try to setup again if it has already been done. */
+ list = find_internal_resource(internal->iface_name);
+ if (list)
+ return 0;
+
list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
if (list == NULL)
return -1;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.272868935 +0000
+++ 0013-net-vhost-prevent-multiple-setups-on-reconfiguration.patch 2020-02-27 09:31:55.703945639 +0000
@@ -1,8 +1,10 @@
-From 366a0500f432a862f37ab2ca220e60f5654eadd7 Mon Sep 17 00:00:00 2001
+From 238736d729ee8c509297836f80b41f0034239587 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 18 Feb 2020 18:22:40 +0100
Subject: [PATCH] net/vhost: prevent multiple setups on reconfiguration
+[ upstream commit 366a0500f432a862f37ab2ca220e60f5654eadd7 ]
+
Ethdev's .dev_configure callback can be called multiple
time during a device life-time, but Vhost makes the
wrong assumption that it is not the case and try to
@@ -12,7 +14,6 @@
before proceeding.
Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
-Cc: stable@dpdk.org
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -24,10 +25,10 @@
1 file changed, 5 insertions(+)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
-index 4a7b1b608c..458ed58f5f 100644
+index c1b3dffeec..c5e3fa229a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
-@@ -876,6 +876,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
+@@ -877,6 +877,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
unsigned int numa_node = eth_dev->device->numa_node;
const char *name = eth_dev->device->name;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: add module EEPROM dump to mlx5 features' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (11 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite action validation' " luca.boccassi
` (27 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Gal Cohen, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e44d4a077611a27d51d5a669d94a10dcee7a96dd Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 19 Feb 2020 11:11:25 +0100
Subject: [PATCH] doc: add module EEPROM dump to mlx5 features
[ upstream commit b32081a0975fb06d5ae085772b66cd55a5a3833a ]
The dev_ops .get_module_info and .get_module_eeprom
were implemented in mlx5 in DPDK 19.11.
Fixes: 8a6a09f853a0 ("net/mlx5: support reading module EEPROM data")
Reported-by: Gal Cohen <galco@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/nics/features/mlx5.ini | 1 +
1 file changed, 1 insertion(+)
diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
index b0a2f8e5f7..30a4d80ead 100644
--- a/doc/guides/nics/features/mlx5.ini
+++ b/doc/guides/nics/features/mlx5.ini
@@ -41,6 +41,7 @@ Basic stats = Y
Extended stats = Y
Stats per queue = Y
FW version = Y
+Module EEPROM dump = Y
Multiprocess aware = Y
Other kdrv = Y
ARMv8 = Y
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.299698979 +0000
+++ 0014-doc-add-module-EEPROM-dump-to-mlx5-features.patch 2020-02-27 09:31:55.703945639 +0000
@@ -1,13 +1,14 @@
-From b32081a0975fb06d5ae085772b66cd55a5a3833a Mon Sep 17 00:00:00 2001
+From e44d4a077611a27d51d5a669d94a10dcee7a96dd Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 19 Feb 2020 11:11:25 +0100
Subject: [PATCH] doc: add module EEPROM dump to mlx5 features
+[ upstream commit b32081a0975fb06d5ae085772b66cd55a5a3833a ]
+
The dev_ops .get_module_info and .get_module_eeprom
were implemented in mlx5 in DPDK 19.11.
Fixes: 8a6a09f853a0 ("net/mlx5: support reading module EEPROM data")
-Cc: stable@dpdk.org
Reported-by: Gal Cohen <galco@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
@@ -16,10 +17,10 @@
1 file changed, 1 insertion(+)
diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini
-index 3d1c5d61f3..54ec95db7f 100644
+index b0a2f8e5f7..30a4d80ead 100644
--- a/doc/guides/nics/features/mlx5.ini
+++ b/doc/guides/nics/features/mlx5.ini
-@@ -42,6 +42,7 @@ Basic stats = Y
+@@ -41,6 +41,7 @@ Basic stats = Y
Extended stats = Y
Stats per queue = Y
FW version = Y
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite action validation' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (12 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: add module EEPROM dump to mlx5 features' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix flow match on GRE key' " luca.boccassi
` (26 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Shiri Kuzin; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6076d4d16c9e7d1168c8be8c4035d6fa076db498 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Tue, 18 Feb 2020 13:52:54 +0200
Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite action validation
[ upstream commit e649994972cda23fc777f45f7b40c528313543ed ]
ICMPv6 header contains the checksum field, that includes the IP
addresses from IP header.
The ConnectX-5 hardware does not support ICMPv6 checksum calculation
and in case of IP header modification the checksum will contain
the wrong value.
The patch rejects the header modification actions related to IP
addresses if ICMPv6 protocol is detected in pattern.
This issue was also partly fixed in commit below which rejects
flows with the pattern "ipv6 proto is 58".
Fixes: 0e2ceb639d8a ("net/mlx5: fix ICMPv6 header rewrite actions")
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index cace0f31b5..7b5471b54a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4464,6 +4464,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
+ item_ipv6_proto = IPPROTO_ICMPV6;
last_item = MLX5_FLOW_LAYER_ICMP6;
break;
case RTE_FLOW_ITEM_TYPE_TAG:
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.326220026 +0000
+++ 0015-net-mlx5-fix-ICMPv6-header-rewrite-action-validation.patch 2020-02-27 09:31:55.711945697 +0000
@@ -1,8 +1,10 @@
-From e649994972cda23fc777f45f7b40c528313543ed Mon Sep 17 00:00:00 2001
+From 6076d4d16c9e7d1168c8be8c4035d6fa076db498 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Tue, 18 Feb 2020 13:52:54 +0200
Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite action validation
+[ upstream commit e649994972cda23fc777f45f7b40c528313543ed ]
+
ICMPv6 header contains the checksum field, that includes the IP
addresses from IP header.
@@ -16,7 +18,6 @@
flows with the pattern "ipv6 proto is 58".
Fixes: 0e2ceb639d8a ("net/mlx5: fix ICMPv6 header rewrite actions")
-Cc: stable@dpdk.org
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -26,10 +27,10 @@
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 341d51152a..1c01269117 100644
+index cace0f31b5..7b5471b54a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -4621,6 +4621,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4464,6 +4464,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix flow match on GRE key' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (13 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite action validation' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix GENEVE tunnel flow validation' " luca.boccassi
` (25 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Matan Azrad; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From d8858ade2807f6a34397c4ec211a1a78053d0035 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Tue, 18 Feb 2020 14:45:20 +0000
Subject: [PATCH] net/mlx5: fix flow match on GRE key
[ upstream commit 38ad946892830c9fb5f8fe221bf677ee8e9bc819 ]
The RTE_FLOW_ITEM_TYPE_GRE_KEY means that GRE key should
be present on the flow and in addition can explicitly match on the GRE
key field itself.
When no value is set in this item any GRE key should match the flow.
The match on GRE key wrongly was not added if the item fields are NULL
while at least the GRE key should be present in the flow.
Add the GRE key present match when RTE_FLOW_ITEM_TYPE_GRE_KEY is in
the flow item list.
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7b5471b54a..f3d9ae5bc4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5372,13 +5372,13 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
rte_be32_t gre_key_default_mask = RTE_BE32(UINT32_MAX);
- if (!key_v)
- return;
- if (!key_m)
- key_m = &gre_key_default_mask;
/* GRE K bit must be on and should already be validated */
MLX5_SET(fte_match_set_misc, misc_m, gre_k_present, 1);
MLX5_SET(fte_match_set_misc, misc_v, gre_k_present, 1);
+ if (!key_v)
+ return;
+ if (!key_m)
+ key_m = &gre_key_default_mask;
MLX5_SET(fte_match_set_misc, misc_m, gre_key_h,
rte_be_to_cpu_32(*key_m) >> 8);
MLX5_SET(fte_match_set_misc, misc_v, gre_key_h,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.359803386 +0000
+++ 0016-net-mlx5-fix-flow-match-on-GRE-key.patch 2020-02-27 09:31:55.719945756 +0000
@@ -1,8 +1,10 @@
-From 38ad946892830c9fb5f8fe221bf677ee8e9bc819 Mon Sep 17 00:00:00 2001
+From d8858ade2807f6a34397c4ec211a1a78053d0035 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Tue, 18 Feb 2020 14:45:20 +0000
Subject: [PATCH] net/mlx5: fix flow match on GRE key
+[ upstream commit 38ad946892830c9fb5f8fe221bf677ee8e9bc819 ]
+
The RTE_FLOW_ITEM_TYPE_GRE_KEY means that GRE key should
be present on the flow and in addition can explicitly match on the GRE
key field itself.
@@ -16,7 +18,6 @@
the flow item list.
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -25,10 +26,10 @@
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 1c01269117..467d1ce6b1 100644
+index 7b5471b54a..f3d9ae5bc4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5594,13 +5594,13 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
+@@ -5372,13 +5372,13 @@ flow_dv_translate_item_gre_key(void *matcher, void *key,
void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
rte_be32_t gre_key_default_mask = RTE_BE32(UINT32_MAX);
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix GENEVE tunnel flow validation' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (14 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix flow match on GRE key' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix hairpin queue capacity' " luca.boccassi
` (24 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Matan Azrad; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bd75bec91e91ff32d9f4fcecfcb0823c9562b780 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 19 Feb 2020 06:52:11 +0000
Subject: [PATCH] net/mlx5: fix GENEVE tunnel flow validation
[ upstream commit 5693233823b09b527376e94ce24df71918632dfa ]
The new Mellanox devices support GENEVE tunnel stateless offloads by
native HW parsers, FW doesn't need to configure flex parser to support
it.
The FW capability for GENEVE flex parser is not set for the above
devices, hence the GENEVE flow validation failed for them.
Remove the flex parser validation for GENEVE, stay only with the direct
FW capability for GENEVE support.
Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 07979a09cb..b2ab5491ce 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2131,9 +2131,7 @@ mlx5_flow_validate_item_geneve(const struct rte_flow_item *item,
.protocol = RTE_BE16(UINT16_MAX),
};
- if (!(priv->config.hca_attr.flex_parser_protocols &
- MLX5_HCA_FLEX_GENEVE_ENABLED) ||
- !priv->config.hca_attr.tunnel_stateless_geneve_rx)
+ if (!priv->config.hca_attr.tunnel_stateless_geneve_rx)
return rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"L3 Geneve is not enabled by device"
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.393497810 +0000
+++ 0017-net-mlx5-fix-GENEVE-tunnel-flow-validation.patch 2020-02-27 09:31:55.727945815 +0000
@@ -1,8 +1,10 @@
-From 5693233823b09b527376e94ce24df71918632dfa Mon Sep 17 00:00:00 2001
+From bd75bec91e91ff32d9f4fcecfcb0823c9562b780 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 19 Feb 2020 06:52:11 +0000
Subject: [PATCH] net/mlx5: fix GENEVE tunnel flow validation
+[ upstream commit 5693233823b09b527376e94ce24df71918632dfa ]
+
The new Mellanox devices support GENEVE tunnel stateless offloads by
native HW parsers, FW doesn't need to configure flex parser to support
it.
@@ -14,7 +16,6 @@
FW capability for GENEVE support.
Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -23,10 +24,10 @@
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 25482010d8..eb6bd274e5 100644
+index 07979a09cb..b2ab5491ce 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2135,9 +2135,7 @@ mlx5_flow_validate_item_geneve(const struct rte_flow_item *item,
+@@ -2131,9 +2131,7 @@ mlx5_flow_validate_item_geneve(const struct rte_flow_item *item,
.protocol = RTE_BE16(UINT16_MAX),
};
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix hairpin queue capacity' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (15 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix GENEVE tunnel flow validation' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix L3 VXLAN RSS expansion' " luca.boccassi
` (23 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Bing Zhao; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6455e561a6becf768147f4749074d3b90ad6e39c Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Wed, 19 Feb 2020 16:28:39 +0800
Subject: [PATCH] net/mlx5: fix hairpin queue capacity
[ upstream commit c288d7b5ebc645e45c0477e6f0263020c033abc2 ]
The hairpin TX/RX queue depth and packet size is fixed in the past.
When the firmware has some fix or improvement, the PMD will not
make full use of it. And also, 32 packets for a single queue will not
guarantee a good performance for hairpin flows. It will make the
stride size larger and for small packets, it is a waste of memory.
The recommended stride size is 64B now.
The parameter of hairpin queue setup needs to be adjusted.
1. A proper buffer size should support the standard jumbo frame with
9KB, and also more than 1 jumbo frame packet for performance.
2. Number of packets of a single queue should be the maximum
supported value (total buffer size / stride size).
There is no need to support the max capacity of total buffer size
because the memory consumption should also be taken into
consideration.
Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_defs.h | 4 ++++
drivers/net/mlx5/mlx5_rxq.c | 13 +++++++++----
drivers/net/mlx5/mlx5_txq.c | 13 +++++++++----
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 042e1f31ee..330666cd60 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -176,6 +176,10 @@
#define MLX5_FLOW_MREG_HNAME "MARK_COPY_TABLE"
#define MLX5_DEFAULT_COPY_ID UINT32_MAX
+/* Hairpin TX/RX queue configuration parameters. */
+#define MLX5_HAIRPIN_QUEUE_STRIDE 6
+#define MLX5_HAIRPIN_JUMBO_LOG_SIZE (15 + 2)
+
/* Definition of static_assert found in /usr/include/assert.h */
#ifndef HAVE_STATIC_ASSERT
#define static_assert _Static_assert
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index da020a0aa0..5f3740b812 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1261,6 +1261,7 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_devx_create_rq_attr attr = { 0 };
struct mlx5_rxq_obj *tmpl = NULL;
int ret = 0;
+ uint32_t max_wq_data;
assert(rxq_data);
assert(!rxq_ctrl->obj);
@@ -1276,11 +1277,15 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
tmpl->type = MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN;
tmpl->rxq_ctrl = rxq_ctrl;
attr.hairpin = 1;
- /* Workaround for hairpin startup */
- attr.wq_attr.log_hairpin_num_packets = log2above(32);
- /* Workaround for packets larger than 1KB */
+ max_wq_data = priv->config.hca_attr.log_max_hairpin_wq_data_sz;
+ /* Jumbo frames > 9KB should be supported, and more packets. */
attr.wq_attr.log_hairpin_data_sz =
- priv->config.hca_attr.log_max_hairpin_wq_data_sz;
+ (max_wq_data < MLX5_HAIRPIN_JUMBO_LOG_SIZE) ?
+ max_wq_data : MLX5_HAIRPIN_JUMBO_LOG_SIZE;
+ /* Set the packets number to the maximum value for performance. */
+ attr.wq_attr.log_hairpin_num_packets =
+ attr.wq_attr.log_hairpin_data_sz -
+ MLX5_HAIRPIN_QUEUE_STRIDE;
tmpl->rq = mlx5_devx_cmd_create_rq(priv->sh->ctx, &attr,
rxq_ctrl->socket);
if (!tmpl->rq) {
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1a76f6ea83..50d2464fa3 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -491,6 +491,7 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_devx_create_sq_attr attr = { 0 };
struct mlx5_txq_obj *tmpl = NULL;
int ret = 0;
+ uint32_t max_wq_data;
assert(txq_data);
assert(!txq_ctrl->obj);
@@ -507,11 +508,15 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
tmpl->txq_ctrl = txq_ctrl;
attr.hairpin = 1;
attr.tis_lst_sz = 1;
- /* Workaround for hairpin startup */
- attr.wq_attr.log_hairpin_num_packets = log2above(32);
- /* Workaround for packets larger than 1KB */
+ max_wq_data = priv->config.hca_attr.log_max_hairpin_wq_data_sz;
+ /* Jumbo frames > 9KB should be supported, and more packets. */
attr.wq_attr.log_hairpin_data_sz =
- priv->config.hca_attr.log_max_hairpin_wq_data_sz;
+ (max_wq_data < MLX5_HAIRPIN_JUMBO_LOG_SIZE) ?
+ max_wq_data : MLX5_HAIRPIN_JUMBO_LOG_SIZE;
+ /* Set the packets number to the maximum value for performance. */
+ attr.wq_attr.log_hairpin_num_packets =
+ attr.wq_attr.log_hairpin_data_sz -
+ MLX5_HAIRPIN_QUEUE_STRIDE;
attr.tis_num = priv->sh->tis->id;
tmpl->sq = mlx5_devx_cmd_create_sq(priv->sh->ctx, &attr);
if (!tmpl->sq) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.426157115 +0000
+++ 0018-net-mlx5-fix-hairpin-queue-capacity.patch 2020-02-27 09:31:55.731945844 +0000
@@ -1,8 +1,10 @@
-From c288d7b5ebc645e45c0477e6f0263020c033abc2 Mon Sep 17 00:00:00 2001
+From 6455e561a6becf768147f4749074d3b90ad6e39c Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Wed, 19 Feb 2020 16:28:39 +0800
Subject: [PATCH] net/mlx5: fix hairpin queue capacity
+[ upstream commit c288d7b5ebc645e45c0477e6f0263020c033abc2 ]
+
The hairpin TX/RX queue depth and packet size is fixed in the past.
When the firmware has some fix or improvement, the PMD will not
make full use of it. And also, 32 packets for a single queue will not
@@ -21,7 +23,6 @@
consideration.
Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
-Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
@@ -32,10 +33,10 @@
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
-index 9b392ed036..83ca367dba 100644
+index 042e1f31ee..330666cd60 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
-@@ -173,6 +173,10 @@
+@@ -176,6 +176,10 @@
#define MLX5_FLOW_MREG_HNAME "MARK_COPY_TABLE"
#define MLX5_DEFAULT_COPY_ID UINT32_MAX
@@ -47,18 +48,18 @@
#ifndef HAVE_STATIC_ASSERT
#define static_assert _Static_assert
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index dc0fd82113..8a6b410eff 100644
+index da020a0aa0..5f3740b812 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -1268,6 +1268,7 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1261,6 +1261,7 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_devx_create_rq_attr attr = { 0 };
struct mlx5_rxq_obj *tmpl = NULL;
int ret = 0;
+ uint32_t max_wq_data;
- MLX5_ASSERT(rxq_data);
- MLX5_ASSERT(!rxq_ctrl->obj);
-@@ -1283,11 +1284,15 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
+ assert(rxq_data);
+ assert(!rxq_ctrl->obj);
+@@ -1276,11 +1277,15 @@ mlx5_rxq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
tmpl->type = MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN;
tmpl->rxq_ctrl = rxq_ctrl;
attr.hairpin = 1;
@@ -79,18 +80,18 @@
rxq_ctrl->socket);
if (!tmpl->rq) {
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index bc13abfe63..2ad849a229 100644
+index 1a76f6ea83..50d2464fa3 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -493,6 +493,7 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
+@@ -491,6 +491,7 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_devx_create_sq_attr attr = { 0 };
struct mlx5_txq_obj *tmpl = NULL;
int ret = 0;
+ uint32_t max_wq_data;
- MLX5_ASSERT(txq_data);
- MLX5_ASSERT(!txq_ctrl->obj);
-@@ -509,11 +510,15 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
+ assert(txq_data);
+ assert(!txq_ctrl->obj);
+@@ -507,11 +508,15 @@ mlx5_txq_obj_hairpin_new(struct rte_eth_dev *dev, uint16_t idx)
tmpl->txq_ctrl = txq_ctrl;
attr.hairpin = 1;
attr.tis_lst_sz = 1;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix L3 VXLAN RSS expansion' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (16 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix hairpin queue capacity' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/sfc: fix log format specifiers' " luca.boccassi
` (22 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Matan Azrad; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 17d61f47de846dc3901cabfef961afc5e48cb7a6 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 19 Feb 2020 08:29:36 +0000
Subject: [PATCH] net/mlx5: fix L3 VXLAN RSS expansion
[ upstream commit cd04052475995caffc1d59a199260b86f32242cc ]
The RSS expansion feature was introduced to split RSS flows according to
the adjustment between the RSS types and the flow items.
The expansion function gets an item tree for the above adjustment from
the caller which reflects the HW needs.
The standard vxlan header next protocol is always Ethernet while there
are some Mellanox customers who use their own method to allow L3
headers after the vxlan tunnel header.
The expansion tree of mlx5 PMD didn't expect to get L3 headers after the
vxlan header what caused a failure in flow creation when inner RSS is
requested on L3 after vxlan flow.
Add IPV4 and IPV6 as optional headers after vxlan in the RSS expansion
tree to allow L3 tunnel support for vxlan.
Fixes: f4f06e361516 ("net/mlx5: add flow VXLAN item")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b2ab5491ce..a7ddc161c8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -165,7 +165,9 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
},
[MLX5_EXPANSION_VXLAN] = {
- .next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH),
+ .next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH,
+ MLX5_EXPANSION_IPV4,
+ MLX5_EXPANSION_IPV6),
.type = RTE_FLOW_ITEM_TYPE_VXLAN,
},
[MLX5_EXPANSION_VXLAN_GPE] = {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.456237294 +0000
+++ 0019-net-mlx5-fix-L3-VXLAN-RSS-expansion.patch 2020-02-27 09:31:55.739945903 +0000
@@ -1,8 +1,10 @@
-From cd04052475995caffc1d59a199260b86f32242cc Mon Sep 17 00:00:00 2001
+From 17d61f47de846dc3901cabfef961afc5e48cb7a6 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 19 Feb 2020 08:29:36 +0000
Subject: [PATCH] net/mlx5: fix L3 VXLAN RSS expansion
+[ upstream commit cd04052475995caffc1d59a199260b86f32242cc ]
+
The RSS expansion feature was introduced to split RSS flows according to
the adjustment between the RSS types and the flow items.
@@ -21,7 +23,6 @@
tree to allow L3 tunnel support for vxlan.
Fixes: f4f06e361516 ("net/mlx5: add flow VXLAN item")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -30,10 +31,10 @@
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index eb6bd274e5..ce5adede30 100644
+index b2ab5491ce..a7ddc161c8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -167,7 +167,9 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
+@@ -165,7 +165,9 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
},
[MLX5_EXPANSION_VXLAN] = {
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix log format specifiers' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (17 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix L3 VXLAN RSS expansion' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/fm10k: fix non-x86 build' " luca.boccassi
` (21 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ee28c99af06906940710a339254063cbb08354e1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 19 Feb 2020 14:04:57 +0000
Subject: [PATCH] net/sfc: fix log format specifiers
[ upstream commit 6b9a30d9e93da9f6c167249ba4d79fd5470b7e17 ]
The format specifier for the 'size_t' format should be '%z'.
Also this fix enables compiling PMD for 32bit architecture.
Fixes: ba641f207642 ("net/sfc: add init on attach")
Fixes: 82faef507608 ("net/sfc: set RSS key and hash types config")
Fixes: 7803554a9e38 ("net/sfc: process RSS settings on Rx configure step")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc.c | 2 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_rx.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 141c767f09..c6b514ac2f 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -30,7 +30,7 @@ sfc_dma_alloc(const struct sfc_adapter *sa, const char *name, uint16_t id,
{
const struct rte_memzone *mz;
- sfc_log_init(sa, "name=%s id=%u len=%lu socket_id=%d",
+ sfc_log_init(sa, "name=%s id=%u len=%zu socket_id=%d",
name, id, len, socket_id);
mz = rte_eth_dma_zone_reserve(sa->eth_dev, name, id, len,
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 454b8956a2..098038fbc0 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1520,7 +1520,7 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
if ((rss_conf->rss_key != NULL) &&
(rss_conf->rss_key_len != sizeof(rss->key))) {
- sfc_err(sa, "RSS key size is wrong (should be %lu)",
+ sfc_err(sa, "RSS key size is wrong (should be %zu)",
sizeof(rss->key));
return -EINVAL;
}
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 74218296cd..7afd2c8b33 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1403,7 +1403,7 @@ sfc_rx_process_adv_conf_rss(struct sfc_adapter *sa,
if (conf->rss_key != NULL) {
if (conf->rss_key_len != sizeof(rss->key)) {
- sfc_err(sa, "RSS key size is wrong (should be %lu)",
+ sfc_err(sa, "RSS key size is wrong (should be %zu)",
sizeof(rss->key));
return EINVAL;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.487412817 +0000
+++ 0020-net-sfc-fix-log-format-specifiers.patch 2020-02-27 09:31:55.739945903 +0000
@@ -1,8 +1,10 @@
-From 6b9a30d9e93da9f6c167249ba4d79fd5470b7e17 Mon Sep 17 00:00:00 2001
+From ee28c99af06906940710a339254063cbb08354e1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 19 Feb 2020 14:04:57 +0000
Subject: [PATCH] net/sfc: fix log format specifiers
+[ upstream commit 6b9a30d9e93da9f6c167249ba4d79fd5470b7e17 ]
+
The format specifier for the 'size_t' format should be '%z'.
Also this fix enables compiling PMD for 32bit architecture.
@@ -10,7 +12,6 @@
Fixes: ba641f207642 ("net/sfc: add init on attach")
Fixes: 82faef507608 ("net/sfc: set RSS key and hash types config")
Fixes: 7803554a9e38 ("net/sfc: process RSS settings on Rx configure step")
-Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/fm10k: fix non-x86 build' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (18 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/sfc: fix log format specifiers' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'ci: fix Travis config warnings' " luca.boccassi
` (20 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Xiao Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 6f40b87129e48df2e7bb8e498515182eb18511c1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 19 Feb 2020 14:16:42 +0000
Subject: [PATCH] net/fm10k: fix non-x86 build
[ upstream commit b565280d45022292e566cf98f8ccf926d8048d2c ]
'fm10k_rxtx_vec.c' is SSE vector instructions implementation and should
be compiled only for x86.
The vector PMD support controlled by
'CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR' config option, but it is enabled by
default, safer to add x86 checks too.
Fixes: 10eb9ce8dccd ("fm10k: allow to disable vector driver")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/fm10k/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
index 722bf1ee04..338de40f23 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
@@ -73,6 +73,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_common.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_mbx.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_vf.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_api.c
+ifeq ($(CONFIG_RTE_ARCH_X86), y)
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR) += fm10k_rxtx_vec.c
+endif
include $(RTE_SDK)/mk/rte.lib.mk
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.517432540 +0000
+++ 0021-net-fm10k-fix-non-x86-build.patch 2020-02-27 09:31:55.743945932 +0000
@@ -1,8 +1,10 @@
-From b565280d45022292e566cf98f8ccf926d8048d2c Mon Sep 17 00:00:00 2001
+From 6f40b87129e48df2e7bb8e498515182eb18511c1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 19 Feb 2020 14:16:42 +0000
Subject: [PATCH] net/fm10k: fix non-x86 build
+[ upstream commit b565280d45022292e566cf98f8ccf926d8048d2c ]
+
'fm10k_rxtx_vec.c' is SSE vector instructions implementation and should
be compiled only for x86.
@@ -11,7 +13,6 @@
default, safer to add x86 checks too.
Fixes: 10eb9ce8dccd ("fm10k: allow to disable vector driver")
-Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -20,10 +21,10 @@
1 file changed, 2 insertions(+)
diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
-index 0271bcb15e..29e659da8a 100644
+index 722bf1ee04..338de40f23 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
-@@ -71,6 +71,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_common.c
+@@ -73,6 +73,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_common.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_mbx.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_vf.c
SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_api.c
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'ci: fix Travis config warnings' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (19 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/fm10k: fix non-x86 build' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/tep_term: remove redundant info get' " luca.boccassi
` (19 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: David Marchand; +Cc: Aaron Conole, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 166fc9016ebf61793ab32d608924508c49f6fcd3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 19 Feb 2020 10:38:03 +0100
Subject: [PATCH] ci: fix Travis config warnings
[ upstream commit 9135705bb81df0b529821a121004c41f176995ff ]
Reading https://config.travis-ci.com/ and using
https://config.travis-ci.com/explore to check changes, we can cleanup
some warnings reported by the config validation options in Travis.
Example on a job in master:
https://travis-ci.com/DPDK/dpdk/builds/149537002/config
Build config validation:
root: deprecated key doc_packages (anchor on a non-private key)
root: deprecated key build_32b_packages (anchor on a non-private key)
root: deprecated key libabigail_build_packages (anchor on a non-private key)
root: deprecated key extra_packages (anchor on a non-private key)
root: deprecated key aarch64_packages (anchor on a non-private key)
root: key matrix is an alias for jobs, using jobs
For the "(anchor on a non-private key)" warnings, the Travis
documentation [1] recommends prefixing private keys with _ (Travis
schema is available at [2]).
The use of the "matrix" key is allowed, but it is just an alias to the
"jobs" key.
1: https://docs.travis-ci.com/user/build-config-yaml#private-keys-as-yaml-anchors-and-aliases-and-external-tooling
2: https://github.com/travis-ci/travis-yml/blob/730a77f4028b91293a55c8c1c52fc72e64379dde/schema.json
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
.travis.yml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 8f90d06f28..0bb47c191e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,19 +15,19 @@ addons:
packages: &required_packages
- [libnuma-dev, linux-headers-$(uname -r), python3-setuptools, python3-wheel, python3-pip, ninja-build]
-aarch64_packages: &aarch64_packages
+_aarch64_packages: &aarch64_packages
- *required_packages
- [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
-extra_packages: &extra_packages
+_extra_packages: &extra_packages
- *required_packages
- [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]
-build_32b_packages: &build_32b_packages
+_build_32b_packages: &build_32b_packages
- *required_packages
- [gcc-multilib]
-doc_packages: &doc_packages
+_doc_packages: &doc_packages
- [doxygen, graphviz, python3-sphinx]
before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
@@ -39,7 +39,7 @@ env:
- DEF_LIB="shared" OPTS="-Denable_kmods=false"
- DEF_LIB="shared" RUN_TESTS=1
-matrix:
+jobs:
include:
- env: DEF_LIB="static" BUILD_32BIT=1
compiler: gcc
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.544106484 +0000
+++ 0022-ci-fix-Travis-config-warnings.patch 2020-02-27 09:31:55.743945932 +0000
@@ -1,8 +1,10 @@
-From 9135705bb81df0b529821a121004c41f176995ff Mon Sep 17 00:00:00 2001
+From 166fc9016ebf61793ab32d608924508c49f6fcd3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 19 Feb 2020 10:38:03 +0100
Subject: [PATCH] ci: fix Travis config warnings
+[ upstream commit 9135705bb81df0b529821a121004c41f176995ff ]
+
Reading https://config.travis-ci.com/ and using
https://config.travis-ci.com/explore to check changes, we can cleanup
some warnings reported by the config validation options in Travis.
@@ -31,16 +33,16 @@
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
- .travis.yml | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
+ .travis.yml | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.travis.yml b/.travis.yml
-index 671447ee86..7c1b2ff1b4 100644
+index 8f90d06f28..0bb47c191e 100644
--- a/.travis.yml
+++ b/.travis.yml
-@@ -19,22 +19,22 @@ addons:
+@@ -15,19 +15,19 @@ addons:
packages: &required_packages
- - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, ninja-build]
+ - [libnuma-dev, linux-headers-$(uname -r), python3-setuptools, python3-wheel, python3-pip, ninja-build]
-aarch64_packages: &aarch64_packages
+_aarch64_packages: &aarch64_packages
@@ -50,11 +52,7 @@
-extra_packages: &extra_packages
+_extra_packages: &extra_packages
- *required_packages
- - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson4]
-
--libabigail_build_packages: &libabigail_build_packages
-+_libabigail_build_packages: &libabigail_build_packages
- - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
+ - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]
-build_32b_packages: &build_32b_packages
+_build_32b_packages: &build_32b_packages
@@ -66,8 +64,8 @@
- [doxygen, graphviz, python3-sphinx]
before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
-@@ -44,7 +44,7 @@ env:
- - DEF_LIB="shared"
+@@ -39,7 +39,7 @@ env:
+ - DEF_LIB="shared" OPTS="-Denable_kmods=false"
- DEF_LIB="shared" RUN_TESTS=1
-matrix:
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'examples/tep_term: remove redundant info get' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (20 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'ci: fix Travis config warnings' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ice: fix queue MSI-X interrupt binding' " luca.boccassi
` (18 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Xiaolong Ye, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f94726915ef28f85d13b307a43d879f71b0c2f23 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 17 Feb 2020 09:41:15 +0800
Subject: [PATCH] examples/tep_term: remove redundant info get
[ upstream commit d0e160a00233b00ba6d242d5fc054438caae6873 ]
Removed redundant function call of 'rte_eth_dev_info_get()' since it has
already been called earlier.
Coverity issue: 349922
Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
examples/tep_termination/vxlan_setup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index eca119a728..4b44ccc143 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -194,8 +194,6 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
ports_eth_addr[port].addr_bytes[5]);
if (tso_segsz != 0) {
- struct rte_eth_dev_info dev_info;
- rte_eth_dev_info_get(port, &dev_info);
if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) == 0)
RTE_LOG(WARNING, PORT,
"hardware TSO offload is not supported\n");
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.569965975 +0000
+++ 0023-examples-tep_term-remove-redundant-info-get.patch 2020-02-27 09:31:55.743945932 +0000
@@ -1,14 +1,15 @@
-From d0e160a00233b00ba6d242d5fc054438caae6873 Mon Sep 17 00:00:00 2001
+From f94726915ef28f85d13b307a43d879f71b0c2f23 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 17 Feb 2020 09:41:15 +0800
Subject: [PATCH] examples/tep_term: remove redundant info get
+[ upstream commit d0e160a00233b00ba6d242d5fc054438caae6873 ]
+
Removed redundant function call of 'rte_eth_dev_info_get()' since it has
already been called earlier.
Coverity issue: 349922
Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/ice: fix queue MSI-X interrupt binding' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (21 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/tep_term: remove redundant info get' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix crash in port stop while handling events' " luca.boccassi
` (17 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Tao Zhu; +Cc: Xiaolong Ye, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From bbf8f4015138f24afcb828e95ec1e0cd5da78391 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 19 Feb 2020 18:17:12 +0800
Subject: [PATCH] net/ice: fix queue MSI-X interrupt binding
[ upstream commit 8b0add355f4a38aefc272c995b949f1fe6f1a512 ]
Operator '<<' should be used instead of '<' for shifting value to be
set in MSI-X configuration register.
Old code adds 1 on even MSI-X interrupt vector index used by queue,
resulting in interrupt mapping error.
Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/ice/ice_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 94a8277688..52cd20ed9e 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2599,9 +2599,9 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
for (i = 0; i < nb_queue; i++) {
/*do actual bind*/
val = (msix_vect & QINT_RQCTL_MSIX_INDX_M) |
- (0 < QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M;
+ (0 << QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M;
val_tx = (msix_vect & QINT_TQCTL_MSIX_INDX_M) |
- (0 < QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M;
+ (0 << QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M;
PMD_DRV_LOG(INFO, "queue %d is binding to vect %d",
base_queue + i, msix_vect);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.595800836 +0000
+++ 0024-net-ice-fix-queue-MSI-X-interrupt-binding.patch 2020-02-27 09:31:55.747945962 +0000
@@ -1,8 +1,10 @@
-From 8b0add355f4a38aefc272c995b949f1fe6f1a512 Mon Sep 17 00:00:00 2001
+From bbf8f4015138f24afcb828e95ec1e0cd5da78391 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 19 Feb 2020 18:17:12 +0800
Subject: [PATCH] net/ice: fix queue MSI-X interrupt binding
+[ upstream commit 8b0add355f4a38aefc272c995b949f1fe6f1a512 ]
+
Operator '<<' should be used instead of '<' for shifting value to be
set in MSI-X configuration register.
@@ -10,7 +12,6 @@
resulting in interrupt mapping error.
Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
-Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -19,10 +20,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index 8e9369e0a8..85ef83e926 100644
+index 94a8277688..52cd20ed9e 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
-@@ -2605,9 +2605,9 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
+@@ -2599,9 +2599,9 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
for (i = 0; i < nb_queue; i++) {
/*do actual bind*/
val = (msix_vect & QINT_RQCTL_MSIX_INDX_M) |
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix crash in port stop while handling events' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (22 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ice: fix queue MSI-X interrupt binding' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix race condition when port is stopped' " luca.boccassi
` (16 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 4af75ac529860ef485fe3fb04f3b789eb7d017ec Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Feb 2020 09:42:13 +0530
Subject: [PATCH] net/bnxt: fix crash in port stop while handling events
[ upstream commit 0732bcb40f2f54397b70b6c63e0b1c7bdc03b8db ]
Check for bp->hwrm_cmd_resp_addr before using it in HWRM_PREP to avoid
segmentation fault when stop port and meanwhile receive events from FW.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ad9ca7c6f1..7408412c9b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -184,6 +184,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
*/
#define HWRM_PREP(req, type, kong) do { \
rte_spinlock_lock(&bp->hwrm_lock); \
+ if (bp->hwrm_cmd_resp_addr == NULL) { \
+ rte_spinlock_unlock(&bp->hwrm_lock); \
+ return -EACCES; \
+ } \
memset(bp->hwrm_cmd_resp_addr, 0, bp->max_resp_len); \
req.req_type = rte_cpu_to_le_16(HWRM_##type); \
req.cmpl_ring = rte_cpu_to_le_16(-1); \
@@ -3087,9 +3091,9 @@ static void add_random_mac_if_needed(struct bnxt *bp,
}
}
-static void reserve_resources_from_vf(struct bnxt *bp,
- struct hwrm_func_cfg_input *cfg_req,
- int vf)
+static int reserve_resources_from_vf(struct bnxt *bp,
+ struct hwrm_func_cfg_input *cfg_req,
+ int vf)
{
struct hwrm_func_qcaps_input req = {0};
struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
@@ -3123,6 +3127,8 @@ static void reserve_resources_from_vf(struct bnxt *bp,
bp->max_ring_grps -= rte_le_to_cpu_16(resp->max_hw_ring_grps);
HWRM_UNLOCK();
+
+ return 0;
}
int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.627338123 +0000
+++ 0025-net-bnxt-fix-crash-in-port-stop-while-handling-event.patch 2020-02-27 09:31:55.751945990 +0000
@@ -1,13 +1,14 @@
-From 0732bcb40f2f54397b70b6c63e0b1c7bdc03b8db Mon Sep 17 00:00:00 2001
+From 4af75ac529860ef485fe3fb04f3b789eb7d017ec Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Feb 2020 09:42:13 +0530
Subject: [PATCH] net/bnxt: fix crash in port stop while handling events
+[ upstream commit 0732bcb40f2f54397b70b6c63e0b1c7bdc03b8db ]
+
Check for bp->hwrm_cmd_resp_addr before using it in HWRM_PREP to avoid
segmentation fault when stop port and meanwhile receive events from FW.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -16,7 +17,7 @@
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index acecf27848..a9c9c7297c 100644
+index ad9ca7c6f1..7408412c9b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -184,6 +184,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
@@ -30,7 +31,7 @@
memset(bp->hwrm_cmd_resp_addr, 0, bp->max_resp_len); \
req.req_type = rte_cpu_to_le_16(HWRM_##type); \
req.cmpl_ring = rte_cpu_to_le_16(-1); \
-@@ -3096,9 +3100,9 @@ static void add_random_mac_if_needed(struct bnxt *bp,
+@@ -3087,9 +3091,9 @@ static void add_random_mac_if_needed(struct bnxt *bp,
}
}
@@ -43,7 +44,7 @@
{
struct hwrm_func_qcaps_input req = {0};
struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
-@@ -3132,6 +3136,8 @@ static void reserve_resources_from_vf(struct bnxt *bp,
+@@ -3123,6 +3127,8 @@ static void reserve_resources_from_vf(struct bnxt *bp,
bp->max_ring_grps -= rte_le_to_cpu_16(resp->max_hw_ring_grps);
HWRM_UNLOCK();
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix race condition when port is stopped' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (23 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix crash in port stop while handling events' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'app/testpmd: fix identifier size for port attach' " luca.boccassi
` (15 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Kalesh AP; +Cc: Rahul Gupta, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b28f36ddb0add0ee4501fbe1acf46bc70b9898fc Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Feb 2020 09:42:14 +0530
Subject: [PATCH] net/bnxt: fix race condition when port is stopped
[ upstream commit c696cc659337c682f1055e646600ab3dca733b0e ]
Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.
Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index bb316b9e05..c0e492e6c2 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
PMD_DRV_LOG(INFO, "Port conn async event\n");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
+ /* Ignore reset notify async events when stopping the port */
+ if (!bp->eth_dev->data->dev_started) {
+ bp->flags |= BNXT_FLAG_FATAL_ERROR;
+ return;
+ }
+
event_data = rte_le_to_cpu_32(async_cmp->event_data1);
/* timestamp_lo/hi values are in units of 100ms */
bp->fw_reset_max_msecs = async_cmp->timestamp_hi ?
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.658991623 +0000
+++ 0026-net-bnxt-fix-race-condition-when-port-is-stopped.patch 2020-02-27 09:31:55.755946020 +0000
@@ -1,8 +1,10 @@
-From c696cc659337c682f1055e646600ab3dca733b0e Mon Sep 17 00:00:00 2001
+From b28f36ddb0add0ee4501fbe1acf46bc70b9898fc Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Feb 2020 09:42:14 +0530
Subject: [PATCH] net/bnxt: fix race condition when port is stopped
+[ upstream commit c696cc659337c682f1055e646600ab3dca733b0e ]
+
Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
@@ -13,7 +15,6 @@
stopping port.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
@@ -23,7 +24,7 @@
1 file changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
-index 0f7b5e96ca..21565b1e24 100644
+index bb316b9e05..c0e492e6c2 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix identifier size for port attach' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (24 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix race condition when port is stopped' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID action offset' " luca.boccassi
` (14 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Wisam Jaddo; +Cc: Bernard Iremonger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e09cfe4dfedf417770c52776b990f32b7af3c4ab Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Wed, 19 Feb 2020 18:47:30 +0200
Subject: [PATCH] app/testpmd: fix identifier size for port attach
[ upstream commit f1cfa5687f2c7641e89cba60d1c2fb774e591cc7 ]
Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options
Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test-pmd/cmdline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f287deaf7c..f01cf31f70 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1437,7 +1437,7 @@ cmdline_parse_inst_t cmd_set_port_setup_on = {
struct cmd_operate_attach_port_result {
cmdline_fixed_string_t port;
cmdline_fixed_string_t keyword;
- cmdline_fixed_string_t identifier;
+ cmdline_multi_string_t identifier;
};
static void cmd_operate_attach_port_parsed(void *parsed_result,
@@ -1460,7 +1460,7 @@ cmdline_parse_token_string_t cmd_operate_attach_port_keyword =
keyword, "attach");
cmdline_parse_token_string_t cmd_operate_attach_port_identifier =
TOKEN_STRING_INITIALIZER(struct cmd_operate_attach_port_result,
- identifier, NULL);
+ identifier, TOKEN_STRING_MULTI);
cmdline_parse_inst_t cmd_operate_attach_port = {
.f = cmd_operate_attach_port_parsed,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.685649100 +0000
+++ 0027-app-testpmd-fix-identifier-size-for-port-attach.patch 2020-02-27 09:31:55.775946166 +0000
@@ -1,15 +1,16 @@
-From f1cfa5687f2c7641e89cba60d1c2fb774e591cc7 Mon Sep 17 00:00:00 2001
+From e09cfe4dfedf417770c52776b990f32b7af3c4ab Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Wed, 19 Feb 2020 18:47:30 +0200
Subject: [PATCH] app/testpmd: fix identifier size for port attach
+[ upstream commit f1cfa5687f2c7641e89cba60d1c2fb774e591cc7 ]
+
Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options
Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
-Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -18,10 +19,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 38b6d804c6..a037a55c6a 100644
+index f287deaf7c..f01cf31f70 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
-@@ -1446,7 +1446,7 @@ cmdline_parse_inst_t cmd_set_port_setup_on = {
+@@ -1437,7 +1437,7 @@ cmdline_parse_inst_t cmd_set_port_setup_on = {
struct cmd_operate_attach_port_result {
cmdline_fixed_string_t port;
cmdline_fixed_string_t keyword;
@@ -30,7 +31,7 @@
};
static void cmd_operate_attach_port_parsed(void *parsed_result,
-@@ -1469,7 +1469,7 @@ cmdline_parse_token_string_t cmd_operate_attach_port_keyword =
+@@ -1460,7 +1460,7 @@ cmdline_parse_token_string_t cmd_operate_attach_port_keyword =
keyword, "attach");
cmdline_parse_token_string_t cmd_operate_attach_port_identifier =
TOKEN_STRING_INITIALIZER(struct cmd_operate_attach_port_result,
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix VLAN ID action offset' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (25 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'app/testpmd: fix identifier size for port attach' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer validation with decapsulation' " luca.boccassi
` (13 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Suanming Mou; +Cc: Dekel Peled, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b79bdedd756d22a51d8eab75462b954b9c731971 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:15:17 +0200
Subject: [PATCH] net/mlx5: fix VLAN ID action offset
[ upstream commit bdcfb8a10bea8f56f5d89394ed1364735f1e3408 ]
Currently, the set VLAN ID header modify action has already got the
action pointer with offset from the header modify action array, but
the configuration saves the detail to the memory of action with the
offset again. It causes double offset to set the VLAN ID action to
the wrong place in the header modify array.
Remove the offset when get the action pointer to fix that issue.
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f3d9ae5bc4..2b37c1c353 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -568,7 +568,7 @@ flow_dv_convert_action_modify_vlan_vid
const struct rte_flow_action_of_set_vlan_vid *conf =
(const struct rte_flow_action_of_set_vlan_vid *)(action->conf);
int i = resource->actions_num;
- struct mlx5_modification_cmd *actions = &resource->actions[i];
+ struct mlx5_modification_cmd *actions = resource->actions;
struct field_modify_info *field = modify_vlan_out_first_vid;
if (i >= MLX5_MAX_MODIFY_NUM)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.730966370 +0000
+++ 0028-net-mlx5-fix-VLAN-ID-action-offset.patch 2020-02-27 09:31:55.783946225 +0000
@@ -1,8 +1,10 @@
-From bdcfb8a10bea8f56f5d89394ed1364735f1e3408 Mon Sep 17 00:00:00 2001
+From b79bdedd756d22a51d8eab75462b954b9c731971 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:15:17 +0200
Subject: [PATCH] net/mlx5: fix VLAN ID action offset
+[ upstream commit bdcfb8a10bea8f56f5d89394ed1364735f1e3408 ]
+
Currently, the set VLAN ID header modify action has already got the
action pointer with offset from the header modify action array, but
the configuration saves the detail to the memory of action with the
@@ -12,7 +14,6 @@
Remove the offset when get the action pointer to fix that issue.
Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
-Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
@@ -22,10 +23,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 467d1ce6b1..99d668f5d3 100644
+index f3d9ae5bc4..2b37c1c353 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -573,7 +573,7 @@ flow_dv_convert_action_modify_vlan_vid
+@@ -568,7 +568,7 @@ flow_dv_convert_action_modify_vlan_vid
const struct rte_flow_action_of_set_vlan_vid *conf =
(const struct rte_flow_action_of_set_vlan_vid *)(action->conf);
int i = resource->actions_num;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix layer validation with decapsulation' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (26 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID action offset' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer type in header modify action' " luca.boccassi
` (12 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Suanming Mou; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f9cb01862aabf54ab0b88cd755602fe966a73c2a Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:26:19 +0200
Subject: [PATCH] net/mlx5: fix layer validation with decapsulation
[ upstream commit e505ac7f91b59e1165c143f14b208885658d2f94 ]
Currently, the flow validate function only validate the outermost layer
with the header modify actions. If there is decapsulation action before
the header modify action, the validation should choose the inner layer
for validation.
Add decapsulation check when validate with the header modify actions.
Choose the inner layer once there is decapsulation action.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 36 +++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2b37c1c353..9a79e6e7a4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3015,10 +3015,14 @@ flow_dv_validate_action_modify_ipv4(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV4))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV4 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV4;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
@@ -3049,10 +3053,14 @@ flow_dv_validate_action_modify_ipv6(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV6))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L3_IPV6 :
+ MLX5_FLOW_LAYER_OUTER_L3_IPV6;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
@@ -3083,10 +3091,14 @@ flow_dv_validate_action_modify_tp(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_L4))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L4 :
+ MLX5_FLOW_LAYER_OUTER_L4;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no transport layer "
@@ -3118,10 +3130,14 @@ flow_dv_validate_action_modify_tcp_seq(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L4_TCP :
+ MLX5_FLOW_LAYER_OUTER_L4_TCP;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
@@ -3163,10 +3179,14 @@ flow_dv_validate_action_modify_tcp_ack(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L4_TCP :
+ MLX5_FLOW_LAYER_OUTER_L4_TCP;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
@@ -3207,10 +3227,14 @@ flow_dv_validate_action_modify_ttl(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
+ uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- if (!(item_flags & MLX5_FLOW_LAYER_L3))
+ layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
+ MLX5_FLOW_LAYER_INNER_L3 :
+ MLX5_FLOW_LAYER_OUTER_L3;
+ if (!(item_flags & layer))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.765128296 +0000
+++ 0029-net-mlx5-fix-layer-validation-with-decapsulation.patch 2020-02-27 09:31:55.787946255 +0000
@@ -1,8 +1,10 @@
-From e505ac7f91b59e1165c143f14b208885658d2f94 Mon Sep 17 00:00:00 2001
+From f9cb01862aabf54ab0b88cd755602fe966a73c2a Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:26:19 +0200
Subject: [PATCH] net/mlx5: fix layer validation with decapsulation
+[ upstream commit e505ac7f91b59e1165c143f14b208885658d2f94 ]
+
Currently, the flow validate function only validate the outermost layer
with the header modify actions. If there is decapsulation action before
the header modify action, the validation should choose the inner layer
@@ -12,7 +14,6 @@
Choose the inner layer once there is decapsulation action.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
-Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -21,10 +22,10 @@
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 99d668f5d3..caa0ff8bad 100644
+index 2b37c1c353..9a79e6e7a4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -3096,10 +3096,14 @@ flow_dv_validate_action_modify_ipv4(const uint64_t action_flags,
+@@ -3015,10 +3015,14 @@ flow_dv_validate_action_modify_ipv4(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
@@ -40,7 +41,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
-@@ -3130,10 +3134,14 @@ flow_dv_validate_action_modify_ipv6(const uint64_t action_flags,
+@@ -3049,10 +3053,14 @@ flow_dv_validate_action_modify_ipv6(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
@@ -56,7 +57,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
-@@ -3164,10 +3172,14 @@ flow_dv_validate_action_modify_tp(const uint64_t action_flags,
+@@ -3083,10 +3091,14 @@ flow_dv_validate_action_modify_tp(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
@@ -72,7 +73,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no transport layer "
-@@ -3199,10 +3211,14 @@ flow_dv_validate_action_modify_tcp_seq(const uint64_t action_flags,
+@@ -3118,10 +3130,14 @@ flow_dv_validate_action_modify_tcp_seq(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
@@ -88,7 +89,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
-@@ -3244,10 +3260,14 @@ flow_dv_validate_action_modify_tcp_ack(const uint64_t action_flags,
+@@ -3163,10 +3179,14 @@ flow_dv_validate_action_modify_tcp_ack(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
@@ -104,7 +105,7 @@
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
-@@ -3288,10 +3308,14 @@ flow_dv_validate_action_modify_ttl(const uint64_t action_flags,
+@@ -3207,10 +3227,14 @@ flow_dv_validate_action_modify_ttl(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix layer type in header modify action' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (27 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer validation with decapsulation' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix match on ethertype and CVLAN tag' " luca.boccassi
` (11 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Suanming Mou; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 063e7d176d1b39241b780b33a79ce47515e3a730 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:26:20 +0200
Subject: [PATCH] net/mlx5: fix layer type in header modify action
[ upstream commit 04233f36c712ea35fe0f1d02c5c6f323a28ec588 ]
Currently, for header modify actions after tunnel decapsulation, the
header modify actions will still select the old outermost layer type.
It will cause header modify actions get the wrong layer type.
Add the tunnel decap flag to indicate the layer type to get for header
modify actions.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 68 +++++++++++++++++++++++++++------
1 file changed, 57 insertions(+), 11 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9a79e6e7a4..e06892b530 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -82,19 +82,55 @@ union flow_dv_attr {
* Pointer to item specification.
* @param[out] attr
* Pointer to flow attributes structure.
+ * @param[in] tunnel_decap
+ * Whether action is after tunnel decapsulation.
*/
static void
-flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr)
+flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
+ bool tunnel_decap)
{
for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+ uint8_t next_protocol = 0xff;
+
switch (item->type) {
+ case RTE_FLOW_ITEM_TYPE_GRE:
+ case RTE_FLOW_ITEM_TYPE_NVGRE:
+ case RTE_FLOW_ITEM_TYPE_VXLAN:
+ case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+ case RTE_FLOW_ITEM_TYPE_GENEVE:
+ case RTE_FLOW_ITEM_TYPE_MPLS:
+ if (tunnel_decap)
+ attr->attr = 0;
+ break;
case RTE_FLOW_ITEM_TYPE_IPV4:
if (!attr->ipv6)
attr->ipv4 = 1;
+ if (item->mask != NULL &&
+ ((const struct rte_flow_item_ipv4 *)
+ item->mask)->hdr.next_proto_id)
+ next_protocol =
+ ((const struct rte_flow_item_ipv4 *)
+ (item->spec))->hdr.next_proto_id &
+ ((const struct rte_flow_item_ipv4 *)
+ (item->mask))->hdr.next_proto_id;
+ if ((next_protocol == IPPROTO_IPIP ||
+ next_protocol == IPPROTO_IPV6) && tunnel_decap)
+ attr->attr = 0;
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
if (!attr->ipv4)
attr->ipv6 = 1;
+ if (item->mask != NULL &&
+ ((const struct rte_flow_item_ipv6 *)
+ item->mask)->hdr.proto)
+ next_protocol =
+ ((const struct rte_flow_item_ipv6 *)
+ (item->spec))->hdr.proto &
+ ((const struct rte_flow_item_ipv6 *)
+ (item->mask))->hdr.proto;
+ if ((next_protocol == IPPROTO_IPIP ||
+ next_protocol == IPPROTO_IPV6) && tunnel_decap)
+ attr->attr = 0;
break;
case RTE_FLOW_ITEM_TYPE_UDP:
if (!attr->tcp)
@@ -599,6 +635,8 @@ flow_dv_convert_action_modify_vlan_vid
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
+ * @param[in] tunnel_decap
+ * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -610,7 +648,7 @@ flow_dv_convert_action_modify_tp
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
- union flow_dv_attr *attr,
+ union flow_dv_attr *attr, bool tunnel_decap,
struct rte_flow_error *error)
{
const struct rte_flow_action_set_tp *conf =
@@ -623,7 +661,7 @@ flow_dv_convert_action_modify_tp
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr);
+ flow_dv_attr_init(items, attr, tunnel_decap);
if (attr->udp) {
memset(&udp, 0, sizeof(udp));
memset(&udp_mask, 0, sizeof(udp_mask));
@@ -673,6 +711,8 @@ flow_dv_convert_action_modify_tp
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
+ * @param[in] tunnel_decap
+ * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -684,7 +724,7 @@ flow_dv_convert_action_modify_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
- union flow_dv_attr *attr,
+ union flow_dv_attr *attr, bool tunnel_decap,
struct rte_flow_error *error)
{
const struct rte_flow_action_set_ttl *conf =
@@ -697,7 +737,7 @@ flow_dv_convert_action_modify_ttl
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr);
+ flow_dv_attr_init(items, attr, tunnel_decap);
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
@@ -733,6 +773,8 @@ flow_dv_convert_action_modify_ttl
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
+ * @param[in] tunnel_decap
+ * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -743,7 +785,7 @@ static int
flow_dv_convert_action_modify_dec_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_item *items,
- union flow_dv_attr *attr,
+ union flow_dv_attr *attr, bool tunnel_decap,
struct rte_flow_error *error)
{
struct rte_flow_item item;
@@ -754,7 +796,7 @@ flow_dv_convert_action_modify_dec_ttl
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr);
+ flow_dv_attr_init(items, attr, tunnel_decap);
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
@@ -7130,7 +7172,8 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
if (flow_dv_convert_action_modify_tp
(mhdr_res, actions, items,
- &flow_attr, error))
+ &flow_attr, !!(action_flags &
+ MLX5_FLOW_ACTION_DECAP), error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
@@ -7139,14 +7182,17 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_DEC_TTL:
if (flow_dv_convert_action_modify_dec_ttl
- (mhdr_res, items, &flow_attr, error))
+ (mhdr_res, items, &flow_attr,
+ !!(action_flags &
+ MLX5_FLOW_ACTION_DECAP), error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
break;
case RTE_FLOW_ACTION_TYPE_SET_TTL:
if (flow_dv_convert_action_modify_ttl
- (mhdr_res, actions, items,
- &flow_attr, error))
+ (mhdr_res, actions, items, &flow_attr,
+ !!(action_flags &
+ MLX5_FLOW_ACTION_DECAP), error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TTL;
break;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.800429736 +0000
+++ 0030-net-mlx5-fix-layer-type-in-header-modify-action.patch 2020-02-27 09:31:55.795946313 +0000
@@ -1,8 +1,10 @@
-From 04233f36c712ea35fe0f1d02c5c6f323a28ec588 Mon Sep 17 00:00:00 2001
+From 063e7d176d1b39241b780b33a79ce47515e3a730 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Wed, 19 Feb 2020 16:26:20 +0200
Subject: [PATCH] net/mlx5: fix layer type in header modify action
+[ upstream commit 04233f36c712ea35fe0f1d02c5c6f323a28ec588 ]
+
Currently, for header modify actions after tunnel decapsulation, the
header modify actions will still select the old outermost layer type.
It will cause header modify actions get the wrong layer type.
@@ -11,7 +13,6 @@
modify actions.
Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
-Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -20,10 +21,10 @@
1 file changed, 57 insertions(+), 11 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index caa0ff8bad..b6e50b14e1 100644
+index 9a79e6e7a4..e06892b530 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -85,19 +85,55 @@ union flow_dv_attr {
+@@ -82,19 +82,55 @@ union flow_dv_attr {
* Pointer to item specification.
* @param[out] attr
* Pointer to flow attributes structure.
@@ -80,7 +81,7 @@
break;
case RTE_FLOW_ITEM_TYPE_UDP:
if (!attr->tcp)
-@@ -604,6 +640,8 @@ flow_dv_convert_action_modify_vlan_vid
+@@ -599,6 +635,8 @@ flow_dv_convert_action_modify_vlan_vid
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
@@ -89,7 +90,7 @@
* @param[out] error
* Pointer to the error structure.
*
-@@ -615,7 +653,7 @@ flow_dv_convert_action_modify_tp
+@@ -610,7 +648,7 @@ flow_dv_convert_action_modify_tp
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
@@ -98,7 +99,7 @@
struct rte_flow_error *error)
{
const struct rte_flow_action_set_tp *conf =
-@@ -628,7 +666,7 @@ flow_dv_convert_action_modify_tp
+@@ -623,7 +661,7 @@ flow_dv_convert_action_modify_tp
struct field_modify_info *field;
if (!attr->valid)
@@ -107,7 +108,7 @@
if (attr->udp) {
memset(&udp, 0, sizeof(udp));
memset(&udp_mask, 0, sizeof(udp_mask));
-@@ -678,6 +716,8 @@ flow_dv_convert_action_modify_tp
+@@ -673,6 +711,8 @@ flow_dv_convert_action_modify_tp
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
@@ -116,7 +117,7 @@
* @param[out] error
* Pointer to the error structure.
*
-@@ -689,7 +729,7 @@ flow_dv_convert_action_modify_ttl
+@@ -684,7 +724,7 @@ flow_dv_convert_action_modify_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
@@ -125,7 +126,7 @@
struct rte_flow_error *error)
{
const struct rte_flow_action_set_ttl *conf =
-@@ -702,7 +742,7 @@ flow_dv_convert_action_modify_ttl
+@@ -697,7 +737,7 @@ flow_dv_convert_action_modify_ttl
struct field_modify_info *field;
if (!attr->valid)
@@ -134,7 +135,7 @@
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
-@@ -738,6 +778,8 @@ flow_dv_convert_action_modify_ttl
+@@ -733,6 +773,8 @@ flow_dv_convert_action_modify_ttl
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
@@ -143,7 +144,7 @@
* @param[out] error
* Pointer to the error structure.
*
-@@ -748,7 +790,7 @@ static int
+@@ -743,7 +785,7 @@ static int
flow_dv_convert_action_modify_dec_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_item *items,
@@ -152,7 +153,7 @@
struct rte_flow_error *error)
{
struct rte_flow_item item;
-@@ -759,7 +801,7 @@ flow_dv_convert_action_modify_dec_ttl
+@@ -754,7 +796,7 @@ flow_dv_convert_action_modify_dec_ttl
struct field_modify_info *field;
if (!attr->valid)
@@ -161,7 +162,7 @@
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
-@@ -7463,7 +7505,8 @@ cnt_err:
+@@ -7130,7 +7172,8 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
if (flow_dv_convert_action_modify_tp
(mhdr_res, actions, items,
@@ -171,7 +172,7 @@
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
-@@ -7472,14 +7515,17 @@ cnt_err:
+@@ -7139,14 +7182,17 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_DEC_TTL:
if (flow_dv_convert_action_modify_dec_ttl
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix match on ethertype and CVLAN tag' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (28 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer type in header modify action' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer type in header modify action"' " luca.boccassi
` (10 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Dekel Peled; +Cc: Matan Azrad, Raslan Darawsheh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From ee0179dbc7c20d6367a3dbafb193665c2ffe8eb4 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Thu, 20 Feb 2020 13:33:25 +0200
Subject: [PATCH] net/mlx5: fix match on ethertype and CVLAN tag
[ upstream commit 797329d6c4a1d054a6fce38c960811cb7878283d ]
HW supports match on one Ethertype, the Ethertype following the last
VLAN tag of the packet (see PRM).
Previous patch added specific handling for packets with VLAN tag,
after setting match on Ethertype.
This patch moves the handling of packets with VLAN tag, to be done
before and instead of setting match on Ethertype.
Previous patch also added, as part of specific handling for packets
with VLAN tag, the setting of cvlan_tag mask bit in translation of
L3 items.
In case of L3 tunnel there is no inner L2 header, so setting this
mask bit is wrong and causes match failures.
This patch adds check to make sure L2 header exists before setting
cvlan_tag mask bit for L3 items.
Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 42 ++++++++++++++++++++++++++-------
1 file changed, 33 insertions(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e06892b530..6d2e1318ba 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5057,19 +5057,27 @@ flow_dv_translate_item_eth(void *matcher, void *key,
/* The value must be in the range of the mask. */
for (i = 0; i < sizeof(eth_m->dst); ++i)
l24_v[i] = eth_m->src.addr_bytes[i] & eth_v->src.addr_bytes[i];
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, ethertype,
- rte_be_to_cpu_16(eth_m->type));
- l24_v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_v, ethertype);
- *(uint16_t *)(l24_v) = eth_m->type & eth_v->type;
if (eth_v->type) {
/* When ethertype is present set mask for tagged VLAN. */
MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
/* Set value for tagged VLAN if ethertype is 802.1Q. */
if (eth_v->type == RTE_BE16(RTE_ETHER_TYPE_VLAN) ||
- eth_v->type == RTE_BE16(RTE_ETHER_TYPE_QINQ))
+ eth_v->type == RTE_BE16(RTE_ETHER_TYPE_QINQ)) {
MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag,
1);
+ /* Return here to avoid setting match on ethertype. */
+ return;
+ }
}
+ /*
+ * HW supports match on one Ethertype, the Ethertype following the last
+ * VLAN tag of the packet (see PRM).
+ * Set match on ethertype only if ETH header is not followed by VLAN.
+ */
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, ethertype,
+ rte_be_to_cpu_16(eth_m->type));
+ l24_v = MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_v, ethertype);
+ *(uint16_t *)(l24_v) = eth_m->type & eth_v->type;
}
/**
@@ -5143,6 +5151,8 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
* Flow matcher value.
* @param[in] item
* Flow pattern to translate.
+ * @param[in] item_flags
+ * Bit-fields that holds the items detected until now.
* @param[in] inner
* Item is inner pattern.
* @param[in] group
@@ -5151,6 +5161,7 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
static void
flow_dv_translate_item_ipv4(void *matcher, void *key,
const struct rte_flow_item *item,
+ const uint64_t item_flags,
int inner, uint32_t group)
{
const struct rte_flow_item_ipv4 *ipv4_m = item->mask;
@@ -5210,7 +5221,12 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
ipv4_m->hdr.next_proto_id);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
+ /*
+ * On outer header (which must contains L2), or inner header with L2,
+ * set cvlan_tag mask bit to mark this packet as untagged.
+ */
+ if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
/**
@@ -5222,6 +5238,8 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
* Flow matcher value.
* @param[in] item
* Flow pattern to translate.
+ * @param[in] item_flags
+ * Bit-fields that holds the items detected until now.
* @param[in] inner
* Item is inner pattern.
* @param[in] group
@@ -5230,6 +5248,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
static void
flow_dv_translate_item_ipv6(void *matcher, void *key,
const struct rte_flow_item *item,
+ const uint64_t item_flags,
int inner, uint32_t group)
{
const struct rte_flow_item_ipv6 *ipv6_m = item->mask;
@@ -5315,7 +5334,12 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
ipv6_m->hdr.proto);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv6_v->hdr.proto & ipv6_m->hdr.proto);
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
+ /*
+ * On outer header (which must contains L2), or inner header with L2,
+ * set cvlan_tag mask bit to mark this packet as untagged.
+ */
+ if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
}
/**
@@ -7299,7 +7323,7 @@ cnt_err:
mlx5_flow_tunnel_ip_check(items, next_protocol,
&item_flags, &tunnel);
flow_dv_translate_item_ipv4(match_mask, match_value,
- items, tunnel,
+ items, item_flags, tunnel,
dev_flow->group);
matcher.priority = MLX5_PRIORITY_MAP_L3;
dev_flow->hash_fields |=
@@ -7327,7 +7351,7 @@ cnt_err:
mlx5_flow_tunnel_ip_check(items, next_protocol,
&item_flags, &tunnel);
flow_dv_translate_item_ipv6(match_mask, match_value,
- items, tunnel,
+ items, item_flags, tunnel,
dev_flow->group);
matcher.priority = MLX5_PRIORITY_MAP_L3;
dev_flow->hash_fields |=
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.834344429 +0000
+++ 0031-net-mlx5-fix-match-on-ethertype-and-CVLAN-tag.patch 2020-02-27 09:31:55.803946372 +0000
@@ -1,8 +1,10 @@
-From 797329d6c4a1d054a6fce38c960811cb7878283d Mon Sep 17 00:00:00 2001
+From ee0179dbc7c20d6367a3dbafb193665c2ffe8eb4 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Thu, 20 Feb 2020 13:33:25 +0200
Subject: [PATCH] net/mlx5: fix match on ethertype and CVLAN tag
+[ upstream commit 797329d6c4a1d054a6fce38c960811cb7878283d ]
+
HW supports match on one Ethertype, the Ethertype following the last
VLAN tag of the packet (see PRM).
Previous patch added specific handling for packets with VLAN tag,
@@ -21,7 +23,6 @@
cvlan_tag mask bit for L3 items.
Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -31,10 +32,10 @@
1 file changed, 33 insertions(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 3c6d90e349..06592b5340 100644
+index e06892b530..6d2e1318ba 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5306,19 +5306,27 @@ flow_dv_translate_item_eth(void *matcher, void *key,
+@@ -5057,19 +5057,27 @@ flow_dv_translate_item_eth(void *matcher, void *key,
/* The value must be in the range of the mask. */
for (i = 0; i < sizeof(eth_m->dst); ++i)
l24_v[i] = eth_m->src.addr_bytes[i] & eth_v->src.addr_bytes[i];
@@ -67,7 +68,7 @@
}
/**
-@@ -5392,6 +5400,8 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
+@@ -5143,6 +5151,8 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
* Flow matcher value.
* @param[in] item
* Flow pattern to translate.
@@ -76,7 +77,7 @@
* @param[in] inner
* Item is inner pattern.
* @param[in] group
-@@ -5400,6 +5410,7 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
+@@ -5151,6 +5161,7 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
static void
flow_dv_translate_item_ipv4(void *matcher, void *key,
const struct rte_flow_item *item,
@@ -84,7 +85,7 @@
int inner, uint32_t group)
{
const struct rte_flow_item_ipv4 *ipv4_m = item->mask;
-@@ -5459,7 +5470,12 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -5210,7 +5221,12 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
ipv4_m->hdr.next_proto_id);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
@@ -98,7 +99,7 @@
}
/**
-@@ -5471,6 +5487,8 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -5222,6 +5238,8 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
* Flow matcher value.
* @param[in] item
* Flow pattern to translate.
@@ -107,7 +108,7 @@
* @param[in] inner
* Item is inner pattern.
* @param[in] group
-@@ -5479,6 +5497,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -5230,6 +5248,7 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
static void
flow_dv_translate_item_ipv6(void *matcher, void *key,
const struct rte_flow_item *item,
@@ -115,7 +116,7 @@
int inner, uint32_t group)
{
const struct rte_flow_item_ipv6 *ipv6_m = item->mask;
-@@ -5564,7 +5583,12 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+@@ -5315,7 +5334,12 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
ipv6_m->hdr.proto);
MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
ipv6_v->hdr.proto & ipv6_m->hdr.proto);
@@ -129,7 +130,7 @@
}
/**
-@@ -7671,7 +7695,7 @@ cnt_err:
+@@ -7299,7 +7323,7 @@ cnt_err:
mlx5_flow_tunnel_ip_check(items, next_protocol,
&item_flags, &tunnel);
flow_dv_translate_item_ipv4(match_mask, match_value,
@@ -137,8 +138,8 @@
+ items, item_flags, tunnel,
dev_flow->group);
matcher.priority = MLX5_PRIORITY_MAP_L3;
- last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV4 :
-@@ -7694,7 +7718,7 @@ cnt_err:
+ dev_flow->hash_fields |=
+@@ -7327,7 +7351,7 @@ cnt_err:
mlx5_flow_tunnel_ip_check(items, next_protocol,
&item_flags, &tunnel);
flow_dv_translate_item_ipv6(match_mask, match_value,
@@ -146,7 +147,7 @@
+ items, item_flags, tunnel,
dev_flow->group);
matcher.priority = MLX5_PRIORITY_MAP_L3;
- last_item = tunnel ? MLX5_FLOW_LAYER_INNER_L3_IPV6 :
+ dev_flow->hash_fields |=
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'Revert "net/mlx5: fix layer type in header modify action"' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (29 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix match on ethertype and CVLAN tag' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' " luca.boccassi
` (9 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From e6271258db3f512835bad2cfd5ae104556995bcc Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Wed, 26 Feb 2020 20:04:38 +0000
Subject: [PATCH] Revert "net/mlx5: fix layer type in header modify action"
This reverts commit 063e7d176d1b39241b780b33a79ce47515e3a730.
---
drivers/net/mlx5/mlx5_flow_dv.c | 68 ++++++---------------------------
1 file changed, 11 insertions(+), 57 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6d2e1318ba..aa65300d9c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -82,55 +82,19 @@ union flow_dv_attr {
* Pointer to item specification.
* @param[out] attr
* Pointer to flow attributes structure.
- * @param[in] tunnel_decap
- * Whether action is after tunnel decapsulation.
*/
static void
-flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr,
- bool tunnel_decap)
+flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr)
{
for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
- uint8_t next_protocol = 0xff;
-
switch (item->type) {
- case RTE_FLOW_ITEM_TYPE_GRE:
- case RTE_FLOW_ITEM_TYPE_NVGRE:
- case RTE_FLOW_ITEM_TYPE_VXLAN:
- case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
- case RTE_FLOW_ITEM_TYPE_GENEVE:
- case RTE_FLOW_ITEM_TYPE_MPLS:
- if (tunnel_decap)
- attr->attr = 0;
- break;
case RTE_FLOW_ITEM_TYPE_IPV4:
if (!attr->ipv6)
attr->ipv4 = 1;
- if (item->mask != NULL &&
- ((const struct rte_flow_item_ipv4 *)
- item->mask)->hdr.next_proto_id)
- next_protocol =
- ((const struct rte_flow_item_ipv4 *)
- (item->spec))->hdr.next_proto_id &
- ((const struct rte_flow_item_ipv4 *)
- (item->mask))->hdr.next_proto_id;
- if ((next_protocol == IPPROTO_IPIP ||
- next_protocol == IPPROTO_IPV6) && tunnel_decap)
- attr->attr = 0;
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
if (!attr->ipv4)
attr->ipv6 = 1;
- if (item->mask != NULL &&
- ((const struct rte_flow_item_ipv6 *)
- item->mask)->hdr.proto)
- next_protocol =
- ((const struct rte_flow_item_ipv6 *)
- (item->spec))->hdr.proto &
- ((const struct rte_flow_item_ipv6 *)
- (item->mask))->hdr.proto;
- if ((next_protocol == IPPROTO_IPIP ||
- next_protocol == IPPROTO_IPV6) && tunnel_decap)
- attr->attr = 0;
break;
case RTE_FLOW_ITEM_TYPE_UDP:
if (!attr->tcp)
@@ -635,8 +599,6 @@ flow_dv_convert_action_modify_vlan_vid
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
- * @param[in] tunnel_decap
- * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -648,7 +610,7 @@ flow_dv_convert_action_modify_tp
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
- union flow_dv_attr *attr, bool tunnel_decap,
+ union flow_dv_attr *attr,
struct rte_flow_error *error)
{
const struct rte_flow_action_set_tp *conf =
@@ -661,7 +623,7 @@ flow_dv_convert_action_modify_tp
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr, tunnel_decap);
+ flow_dv_attr_init(items, attr);
if (attr->udp) {
memset(&udp, 0, sizeof(udp));
memset(&udp_mask, 0, sizeof(udp_mask));
@@ -711,8 +673,6 @@ flow_dv_convert_action_modify_tp
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
- * @param[in] tunnel_decap
- * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -724,7 +684,7 @@ flow_dv_convert_action_modify_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_action *action,
const struct rte_flow_item *items,
- union flow_dv_attr *attr, bool tunnel_decap,
+ union flow_dv_attr *attr,
struct rte_flow_error *error)
{
const struct rte_flow_action_set_ttl *conf =
@@ -737,7 +697,7 @@ flow_dv_convert_action_modify_ttl
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr, tunnel_decap);
+ flow_dv_attr_init(items, attr);
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
@@ -773,8 +733,6 @@ flow_dv_convert_action_modify_ttl
* Pointer to rte_flow_item objects list.
* @param[in] attr
* Pointer to flow attributes structure.
- * @param[in] tunnel_decap
- * Whether action is after tunnel decapsulation.
* @param[out] error
* Pointer to the error structure.
*
@@ -785,7 +743,7 @@ static int
flow_dv_convert_action_modify_dec_ttl
(struct mlx5_flow_dv_modify_hdr_resource *resource,
const struct rte_flow_item *items,
- union flow_dv_attr *attr, bool tunnel_decap,
+ union flow_dv_attr *attr,
struct rte_flow_error *error)
{
struct rte_flow_item item;
@@ -796,7 +754,7 @@ flow_dv_convert_action_modify_dec_ttl
struct field_modify_info *field;
if (!attr->valid)
- flow_dv_attr_init(items, attr, tunnel_decap);
+ flow_dv_attr_init(items, attr);
if (attr->ipv4) {
memset(&ipv4, 0, sizeof(ipv4));
memset(&ipv4_mask, 0, sizeof(ipv4_mask));
@@ -7196,8 +7154,7 @@ cnt_err:
case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
if (flow_dv_convert_action_modify_tp
(mhdr_res, actions, items,
- &flow_attr, !!(action_flags &
- MLX5_FLOW_ACTION_DECAP), error))
+ &flow_attr, error))
return -rte_errno;
action_flags |= actions->type ==
RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
@@ -7206,17 +7163,14 @@ cnt_err:
break;
case RTE_FLOW_ACTION_TYPE_DEC_TTL:
if (flow_dv_convert_action_modify_dec_ttl
- (mhdr_res, items, &flow_attr,
- !!(action_flags &
- MLX5_FLOW_ACTION_DECAP), error))
+ (mhdr_res, items, &flow_attr, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_DEC_TTL;
break;
case RTE_FLOW_ACTION_TYPE_SET_TTL:
if (flow_dv_convert_action_modify_ttl
- (mhdr_res, actions, items, &flow_attr,
- !!(action_flags &
- MLX5_FLOW_ACTION_DECAP), error))
+ (mhdr_res, actions, items,
+ &flow_attr, error))
return -rte_errno;
action_flags |= MLX5_FLOW_ACTION_SET_TTL;
break;
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (30 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer type in header modify action"' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 11:06 ` Luca Boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix running without Rx queue' " luca.boccassi
` (8 subsequent siblings)
40 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 14ecda7bce99cf45330ab89bda35d4b35342e987 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Wed, 26 Feb 2020 20:05:15 +0000
Subject: [PATCH] Revert "net/mlx5: fix layer validation with decapsulation"
This reverts commit f9cb01862aabf54ab0b88cd755602fe966a73c2a.
---
drivers/net/mlx5/mlx5_flow_dv.c | 36 ++++++---------------------------
1 file changed, 6 insertions(+), 30 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index aa65300d9c..e39d3c4299 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3015,14 +3015,10 @@ flow_dv_validate_action_modify_ipv4(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L3_IPV4 :
- MLX5_FLOW_LAYER_OUTER_L3_IPV4;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV4))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
@@ -3053,14 +3049,10 @@ flow_dv_validate_action_modify_ipv6(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L3_IPV6 :
- MLX5_FLOW_LAYER_OUTER_L3_IPV6;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV6))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
@@ -3091,14 +3083,10 @@ flow_dv_validate_action_modify_tp(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L4 :
- MLX5_FLOW_LAYER_OUTER_L4;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_L4))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no transport layer "
@@ -3130,14 +3118,10 @@ flow_dv_validate_action_modify_tcp_seq(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L4_TCP :
- MLX5_FLOW_LAYER_OUTER_L4_TCP;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
@@ -3179,14 +3163,10 @@ flow_dv_validate_action_modify_tcp_ack(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L4_TCP :
- MLX5_FLOW_LAYER_OUTER_L4_TCP;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL, "no TCP item in"
@@ -3227,14 +3207,10 @@ flow_dv_validate_action_modify_ttl(const uint64_t action_flags,
struct rte_flow_error *error)
{
int ret = 0;
- uint64_t layer;
ret = flow_dv_validate_action_modify_hdr(action_flags, action, error);
if (!ret) {
- layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
- MLX5_FLOW_LAYER_INNER_L3 :
- MLX5_FLOW_LAYER_OUTER_L3;
- if (!(item_flags & layer))
+ if (!(item_flags & MLX5_FLOW_LAYER_L3))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix running without Rx queue' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (31 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix metadata split with encap action' " luca.boccassi
` (7 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Shiri Kuzin; +Cc: Sylvain Rodon, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b59c15173db24a5db8787f27af12bf3d6cb8bd39 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Thu, 20 Feb 2020 14:42:26 +0000
Subject: [PATCH] net/mlx5: fix running without Rx queue
[ upstream commit 606d690548983ef69560c20b21c1431d4ebc0ca2 ]
When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.
Before mlx5_dev_configure_rss_reta there isn't a check whether
there are rxq's and if rxq's are 0 the function fails.
For example, this command:
/build/app/test-pmd/testpmd -n 4 -w 0000:08:00.0,rx_vec_en=0
-- --burst=64 --mbcache=512 -i --nb-cores=27 --txd=2048 --rxd=2048
--vxlan-gpe-port=6081 --mp-alloc=xbuf --rxq 0 --forward-mode=txonly
would fail.
In order to fix this issue, we should call mlx5_dev_configure_rss_reta
only if we have rxq's.
Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
Reported-by: Sylvain Rodon <srn@nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/net/mlx5/mlx5_trigger.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 7e12cd5e8b..e3ea2862a5 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -272,11 +272,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
int ret;
DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
- ret = mlx5_dev_configure_rss_reta(dev);
- if (ret) {
- DRV_LOG(ERR, "port %u reta config failed: %s",
- dev->data->port_id, strerror(rte_errno));
- return -rte_errno;
+ if (dev->data->nb_rx_queues > 0) {
+ ret = mlx5_dev_configure_rss_reta(dev);
+ if (ret) {
+ DRV_LOG(ERR, "port %u reta config failed: %s",
+ dev->data->port_id, strerror(rte_errno));
+ return -rte_errno;
+ }
}
ret = mlx5_txq_start(dev);
if (ret) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.914960723 +0000
+++ 0034-net-mlx5-fix-running-without-Rx-queue.patch 2020-02-27 09:31:55.819946489 +0000
@@ -1,8 +1,10 @@
-From 606d690548983ef69560c20b21c1431d4ebc0ca2 Mon Sep 17 00:00:00 2001
+From b59c15173db24a5db8787f27af12bf3d6cb8bd39 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@mellanox.com>
Date: Thu, 20 Feb 2020 14:42:26 +0000
Subject: [PATCH] net/mlx5: fix running without Rx queue
+[ upstream commit 606d690548983ef69560c20b21c1431d4ebc0ca2 ]
+
When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.
@@ -18,7 +20,6 @@
only if we have rxq's.
Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
-Cc: stable@dpdk.org
Reported-by: Sylvain Rodon <srn@nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
@@ -28,13 +29,13 @@
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
-index be47df529f..571b7a003c 100644
+index 7e12cd5e8b..e3ea2862a5 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
-@@ -280,11 +280,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
- rte_net_mlx5_dynf_inline_mask = 1UL << fine_inline;
- else
- rte_net_mlx5_dynf_inline_mask = 0;
+@@ -272,11 +272,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
+ int ret;
+
+ DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
- ret = mlx5_dev_configure_rss_reta(dev);
- if (ret) {
- DRV_LOG(ERR, "port %u reta config failed: %s",
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix metadata split with encap action' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (32 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix running without Rx queue' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix inline packet size for ConnectX-4 Lx' " luca.boccassi
` (6 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Matan Azrad; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From f5d5f63d257f68d99fc9ef7482f02aadc04f5975 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 20 Feb 2020 14:43:30 +0000
Subject: [PATCH] net/mlx5: fix metadata split with encap action
[ upstream commit 35594a9b6f96ac6e45bbb851d9180c841c35cfff ]
In order to move the mbuf metadata from the WQE to the FDB steering
domain, the PMD add for each NIC TX flow a new action to copy the
metadata register REG_A to REG_C_0.
This copy action is considered as modify header action from HW
perspective.
The HW doesn't support to do modify header action after ant
encapsulation action.
The split metadata function wrongly added the copy action in the end of
the original actions list, hence, NIC egress flow with encapsulation
action failed when the PMD worked with dv_xmeta_en mode.
Move the copy action to be before and back to back with the
encapsulation action for the aforementioned case.
Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 66 +++++++++++++++++++++++++--------
drivers/net/mlx5/mlx5_flow.h | 3 ++
drivers/net/mlx5/mlx5_flow_dv.c | 2 -
3 files changed, 54 insertions(+), 17 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a7ddc161c8..aae687a948 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2723,7 +2723,7 @@ find_graph_root(const struct rte_flow_item pattern[], uint32_t rss_level)
}
/**
- * Get QUEUE/RSS action from the action list.
+ * Get metadata split action information.
*
* @param[in] actions
* Pointer to the list of actions.
@@ -2732,18 +2732,38 @@ find_graph_root(const struct rte_flow_item pattern[], uint32_t rss_level)
* @param[out] qrss_type
* Pointer to the action type to return. RTE_FLOW_ACTION_TYPE_END is returned
* if no QUEUE/RSS is found.
+ * @param[out] encap_idx
+ * Pointer to the index of the encap action if exists, otherwise the last
+ * action index.
*
* @return
* Total number of actions.
*/
static int
-flow_parse_qrss_action(const struct rte_flow_action actions[],
- const struct rte_flow_action **qrss)
+flow_parse_metadata_split_actions_info(const struct rte_flow_action actions[],
+ const struct rte_flow_action **qrss,
+ int *encap_idx)
{
+ const struct rte_flow_action_raw_encap *raw_encap;
int actions_n = 0;
+ int raw_decap_idx = -1;
+ *encap_idx = -1;
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
switch (actions->type) {
+ case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
+ case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
+ *encap_idx = actions_n;
+ break;
+ case RTE_FLOW_ACTION_TYPE_RAW_DECAP:
+ raw_decap_idx = actions_n;
+ break;
+ case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
+ raw_encap = actions->conf;
+ if (raw_encap->size > MLX5_ENCAPSULATION_DECISION_SIZE)
+ *encap_idx = raw_decap_idx != -1 ?
+ raw_decap_idx : actions_n;
+ break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_RSS:
*qrss = actions;
@@ -2753,6 +2773,8 @@ flow_parse_qrss_action(const struct rte_flow_action actions[],
}
actions_n++;
}
+ if (*encap_idx == -1)
+ *encap_idx = actions_n;
/* Count RTE_FLOW_ACTION_TYPE_END. */
return actions_n + 1;
}
@@ -3678,6 +3700,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
* Number of actions in the list.
* @param[out] error
* Perform verbose error reporting if not NULL.
+ * @param[in] encap_idx
+ * The encap action inndex.
*
* @return
* 0 on success, negative value otherwise
@@ -3686,7 +3710,8 @@ static int
flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
struct rte_flow_action *ext_actions,
const struct rte_flow_action *actions,
- int actions_n, struct rte_flow_error *error)
+ int actions_n, struct rte_flow_error *error,
+ int encap_idx)
{
struct mlx5_flow_action_copy_mreg *cp_mreg =
(struct mlx5_flow_action_copy_mreg *)
@@ -3701,15 +3726,24 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
cp_mreg->src = ret;
- memcpy(ext_actions, actions,
- sizeof(*ext_actions) * actions_n);
- ext_actions[actions_n - 1] = (struct rte_flow_action){
- .type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
- .conf = cp_mreg,
- };
- ext_actions[actions_n] = (struct rte_flow_action){
- .type = RTE_FLOW_ACTION_TYPE_END,
- };
+ if (encap_idx != 0)
+ memcpy(ext_actions, actions, sizeof(*ext_actions) * encap_idx);
+ if (encap_idx == actions_n - 1) {
+ ext_actions[actions_n - 1] = (struct rte_flow_action){
+ .type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+ .conf = cp_mreg,
+ };
+ ext_actions[actions_n] = (struct rte_flow_action){
+ .type = RTE_FLOW_ACTION_TYPE_END,
+ };
+ } else {
+ ext_actions[encap_idx] = (struct rte_flow_action){
+ .type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+ .conf = cp_mreg,
+ };
+ memcpy(ext_actions + encap_idx + 1, actions + encap_idx,
+ sizeof(*ext_actions) * (actions_n - encap_idx));
+ }
return 0;
}
@@ -3757,6 +3791,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
int mtr_sfx = 0;
size_t act_size;
int actions_n;
+ int encap_idx;
int ret;
/* Check whether extensive metadata feature is engaged. */
@@ -3765,7 +3800,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
!mlx5_flow_ext_mreg_supported(dev))
return flow_create_split_inner(dev, flow, NULL, attr, items,
actions, external, error);
- actions_n = flow_parse_qrss_action(actions, &qrss);
+ actions_n = flow_parse_metadata_split_actions_info(actions, &qrss,
+ &encap_idx);
if (qrss) {
/* Exclude hairpin flows from splitting. */
if (qrss->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
@@ -3840,7 +3876,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
"metadata flow");
/* Create the action list appended with copy register. */
ret = flow_mreg_tx_copy_prep(dev, ext_actions, actions,
- actions_n, error);
+ actions_n, error, encap_idx);
if (ret < 0)
goto exit;
}
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 0da1b5e318..9dcba4c108 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -334,6 +334,9 @@ enum mlx5_feature_name {
#define MLX5_GENEVE_OPT_LEN_0 14
#define MLX5_GENEVE_OPT_LEN_1 63
+#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
+ sizeof(struct rte_flow_item_ipv4))
+
enum mlx5_flow_drv_type {
MLX5_FLOW_TYPE_MIN,
MLX5_FLOW_TYPE_DV,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e39d3c4299..25848cb4ea 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -51,8 +51,6 @@
#define MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL 1
#endif
-#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
- sizeof(struct rte_flow_item_ipv4))
/* VLAN header definitions */
#define MLX5DV_FLOW_VLAN_PCP_SHIFT 13
#define MLX5DV_FLOW_VLAN_PCP_MASK (0x7 << MLX5DV_FLOW_VLAN_PCP_SHIFT)
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.940977697 +0000
+++ 0035-net-mlx5-fix-metadata-split-with-encap-action.patch 2020-02-27 09:31:55.831946576 +0000
@@ -1,8 +1,10 @@
-From 35594a9b6f96ac6e45bbb851d9180c841c35cfff Mon Sep 17 00:00:00 2001
+From f5d5f63d257f68d99fc9ef7482f02aadc04f5975 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 20 Feb 2020 14:43:30 +0000
Subject: [PATCH] net/mlx5: fix metadata split with encap action
+[ upstream commit 35594a9b6f96ac6e45bbb851d9180c841c35cfff ]
+
In order to move the mbuf metadata from the WQE to the FDB steering
domain, the PMD add for each NIC TX flow a new action to copy the
metadata register REG_A to REG_C_0.
@@ -21,19 +23,20 @@
encapsulation action for the aforementioned case.
Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
-Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
- drivers/net/mlx5/mlx5_flow.c | 66 ++++++++++++++++++++++++++++--------
- 1 file changed, 51 insertions(+), 15 deletions(-)
+ drivers/net/mlx5/mlx5_flow.c | 66 +++++++++++++++++++++++++--------
+ drivers/net/mlx5/mlx5_flow.h | 3 ++
+ drivers/net/mlx5/mlx5_flow_dv.c | 2 -
+ 3 files changed, 54 insertions(+), 17 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 49308e9c5d..16c1ef3532 100644
+index a7ddc161c8..aae687a948 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2744,7 +2744,7 @@ flow_get_prefix_layer_flags(struct mlx5_flow *dev_flow)
+@@ -2723,7 +2723,7 @@ find_graph_root(const struct rte_flow_item pattern[], uint32_t rss_level)
}
/**
@@ -42,7 +45,7 @@
*
* @param[in] actions
* Pointer to the list of actions.
-@@ -2753,18 +2753,38 @@ flow_get_prefix_layer_flags(struct mlx5_flow *dev_flow)
+@@ -2732,18 +2732,38 @@ find_graph_root(const struct rte_flow_item pattern[], uint32_t rss_level)
* @param[out] qrss_type
* Pointer to the action type to return. RTE_FLOW_ACTION_TYPE_END is returned
* if no QUEUE/RSS is found.
@@ -83,7 +86,7 @@
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_RSS:
*qrss = actions;
-@@ -2774,6 +2794,8 @@ flow_parse_qrss_action(const struct rte_flow_action actions[],
+@@ -2753,6 +2773,8 @@ flow_parse_qrss_action(const struct rte_flow_action actions[],
}
actions_n++;
}
@@ -92,7 +95,7 @@
/* Count RTE_FLOW_ACTION_TYPE_END. */
return actions_n + 1;
}
-@@ -3739,6 +3761,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
+@@ -3678,6 +3700,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
* Number of actions in the list.
* @param[out] error
* Perform verbose error reporting if not NULL.
@@ -101,7 +104,7 @@
*
* @return
* 0 on success, negative value otherwise
-@@ -3747,7 +3771,8 @@ static int
+@@ -3686,7 +3710,8 @@ static int
flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
struct rte_flow_action *ext_actions,
const struct rte_flow_action *actions,
@@ -111,7 +114,7 @@
{
struct mlx5_flow_action_copy_mreg *cp_mreg =
(struct mlx5_flow_action_copy_mreg *)
-@@ -3762,15 +3787,24 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
+@@ -3701,15 +3726,24 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
if (ret < 0)
return ret;
cp_mreg->src = ret;
@@ -145,7 +148,7 @@
return 0;
}
-@@ -3821,6 +3855,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -3757,6 +3791,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
int mtr_sfx = 0;
size_t act_size;
int actions_n;
@@ -153,17 +156,17 @@
int ret;
/* Check whether extensive metadata feature is engaged. */
-@@ -3830,7 +3865,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
- return flow_create_split_inner(dev, flow, NULL, prefix_layers,
- attr, items, actions, external,
- error);
+@@ -3765,7 +3800,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+ !mlx5_flow_ext_mreg_supported(dev))
+ return flow_create_split_inner(dev, flow, NULL, attr, items,
+ actions, external, error);
- actions_n = flow_parse_qrss_action(actions, &qrss);
+ actions_n = flow_parse_metadata_split_actions_info(actions, &qrss,
+ &encap_idx);
if (qrss) {
/* Exclude hairpin flows from splitting. */
if (qrss->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
-@@ -3905,7 +3941,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -3840,7 +3876,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
"metadata flow");
/* Create the action list appended with copy register. */
ret = flow_mreg_tx_copy_prep(dev, ext_actions, actions,
@@ -172,6 +175,33 @@
if (ret < 0)
goto exit;
}
+diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
+index 0da1b5e318..9dcba4c108 100644
+--- a/drivers/net/mlx5/mlx5_flow.h
++++ b/drivers/net/mlx5/mlx5_flow.h
+@@ -334,6 +334,9 @@ enum mlx5_feature_name {
+ #define MLX5_GENEVE_OPT_LEN_0 14
+ #define MLX5_GENEVE_OPT_LEN_1 63
+
++#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
++ sizeof(struct rte_flow_item_ipv4))
++
+ enum mlx5_flow_drv_type {
+ MLX5_FLOW_TYPE_MIN,
+ MLX5_FLOW_TYPE_DV,
+diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
+index e39d3c4299..25848cb4ea 100644
+--- a/drivers/net/mlx5/mlx5_flow_dv.c
++++ b/drivers/net/mlx5/mlx5_flow_dv.c
+@@ -51,8 +51,6 @@
+ #define MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL 1
+ #endif
+
+-#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
+- sizeof(struct rte_flow_item_ipv4))
+ /* VLAN header definitions */
+ #define MLX5DV_FLOW_VLAN_PCP_SHIFT 13
+ #define MLX5DV_FLOW_VLAN_PCP_MASK (0x7 << MLX5DV_FLOW_VLAN_PCP_SHIFT)
--
2.20.1
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix inline packet size for ConnectX-4 Lx' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (33 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix metadata split with encap action' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix devargs in OCTEON TX2 event device guide' " luca.boccassi
` (5 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From cbfff4f37acaaf508c9701a8901c570186feacd8 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 20 Feb 2020 21:18:33 +0000
Subject: [PATCH] net/mlx5: fix inline packet size for ConnectX-4 Lx
[ upstream commit 21e59432dfe0dc9bbcaec3d9d80c372834d6264b ]
This patch does extra inline packet size check to tune
the ConnectX-4 Lx performance in the legacy Multi-Packet Write
mode.
Fixes: 7593cf1d3500 ("net/mlx5: fix legacy multi-packet write session")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.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 a69729f010..4a9c44dc61 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -4149,6 +4149,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
if (dlen > txq->inlen_empw)
goto pointer_empw;
if (MLX5_TXOFF_CONFIG(MPW)) {
+ if (dlen > txq->inlen_send)
+ goto pointer_empw;
tlen = dlen;
if (part == room) {
/* Open new inline MPW session. */
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:56.972246093 +0000
+++ 0036-net-mlx5-fix-inline-packet-size-for-ConnectX-4-Lx.patch 2020-02-27 09:31:55.835946606 +0000
@@ -1,14 +1,15 @@
-From 21e59432dfe0dc9bbcaec3d9d80c372834d6264b Mon Sep 17 00:00:00 2001
+From cbfff4f37acaaf508c9701a8901c570186feacd8 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 20 Feb 2020 21:18:33 +0000
Subject: [PATCH] net/mlx5: fix inline packet size for ConnectX-4 Lx
+[ upstream commit 21e59432dfe0dc9bbcaec3d9d80c372834d6264b ]
+
This patch does extra inline packet size check to tune
the ConnectX-4 Lx performance in the legacy Multi-Packet Write
mode.
Fixes: 7593cf1d3500 ("net/mlx5: fix legacy multi-packet write session")
-Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
@@ -17,11 +18,11 @@
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 9de6a5028a..2b4fc2ae06 100644
+index a69729f010..4a9c44dc61 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -4286,6 +4286,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
- loc->mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
+@@ -4149,6 +4149,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
+ if (dlen > txq->inlen_empw)
goto pointer_empw;
if (MLX5_TXOFF_CONFIG(MPW)) {
+ if (dlen > txq->inlen_send)
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix devargs in OCTEON TX2 event device guide' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (34 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix inline packet size for ConnectX-4 Lx' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix quiescent state description in RCU " luca.boccassi
` (4 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 1d49777826ae6fa414581199b8a870a52a02ca5e Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 19 Feb 2020 12:25:11 +0530
Subject: [PATCH] doc: fix devargs in OCTEON TX2 event device guide
[ upstream commit 9e991f217fc8719e38a812dc280dba5f84db9f59 ]
Fix OCTEON TX2 event device devargs examples.
Fixes: 55e778ca4648 ("event/octeontx2: add devargs for inflight buffer count")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
doc/guides/eventdevs/octeontx2.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/eventdevs/octeontx2.rst b/doc/guides/eventdevs/octeontx2.rst
index fad84cf42d..d4b2515ce5 100644
--- a/doc/guides/eventdevs/octeontx2.rst
+++ b/doc/guides/eventdevs/octeontx2.rst
@@ -66,7 +66,7 @@ Runtime Config Options
upper limit for in-flight events.
For example::
- --dev "0002:0e:00.0,xae_cnt=16384"
+ -w 0002:0e:00.0,xae_cnt=16384
- ``Force legacy mode``
@@ -74,7 +74,7 @@ Runtime Config Options
single workslot mode in SSO and disable the default dual workslot mode.
For example::
- --dev "0002:0e:00.0,single_ws=1"
+ -w 0002:0e:00.0,single_ws=1
- ``Event Group QoS support``
@@ -89,7 +89,7 @@ Runtime Config Options
default.
For example::
- --dev "0002:0e:00.0,qos=[1-50-50-50]"
+ -w 0002:0e:00.0,qos=[1-50-50-50]
- ``Selftest``
@@ -98,7 +98,7 @@ Runtime Config Options
The tests are run once the vdev creation is successfully complete.
For example::
- --dev "0002:0e:00.0,selftest=1"
+ -w 0002:0e:00.0,selftest=1
- ``TIM disable NPA``
@@ -107,7 +107,7 @@ Runtime Config Options
parameter disables NPA and uses software mempool to manage chunks
For example::
- --dev "0002:0e:00.0,tim_disable_npa=1"
+ -w 0002:0e:00.0,tim_disable_npa=1
- ``TIM modify chunk slots``
@@ -118,7 +118,7 @@ Runtime Config Options
to SSO. The default value is 255 and the max value is 4095.
For example::
- --dev "0002:0e:00.0,tim_chnk_slots=1023"
+ -w 0002:0e:00.0,tim_chnk_slots=1023
- ``TIM enable arm/cancel statistics``
@@ -126,7 +126,7 @@ Runtime Config Options
event timer adapter.
For example::
- --dev "0002:0e:00.0,tim_stats_ena=1"
+ -w 0002:0e:00.0,tim_stats_ena=1
- ``TIM limit max rings reserved``
@@ -136,7 +136,7 @@ Runtime Config Options
rings.
For example::
- --dev "0002:0e:00.0,tim_rings_lmt=5"
+ -w 0002:0e:00.0,tim_rings_lmt=5
- ``TIM ring control internal parameters``
@@ -146,7 +146,7 @@ Runtime Config Options
default values.
For Example::
- --dev "0002:0e:00.0,tim_ring_ctl=[2-1023-1-0]"
+ -w 0002:0e:00.0,tim_ring_ctl=[2-1023-1-0]
Debugging Options
~~~~~~~~~~~~~~~~~
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.002479720 +0000
+++ 0037-doc-fix-devargs-in-OCTEON-TX2-event-device-guide.patch 2020-02-27 09:31:55.839946635 +0000
@@ -1,12 +1,13 @@
-From 9e991f217fc8719e38a812dc280dba5f84db9f59 Mon Sep 17 00:00:00 2001
+From 1d49777826ae6fa414581199b8a870a52a02ca5e Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 19 Feb 2020 12:25:11 +0530
Subject: [PATCH] doc: fix devargs in OCTEON TX2 event device guide
+[ upstream commit 9e991f217fc8719e38a812dc280dba5f84db9f59 ]
+
Fix OCTEON TX2 event device devargs examples.
Fixes: 55e778ca4648 ("event/octeontx2: add devargs for inflight buffer count")
-Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix quiescent state description in RCU guide' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (35 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix devargs in OCTEON TX2 event device guide' " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix multi-producer enqueue figure in ring " luca.boccassi
` (3 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Prateek Agarwal; +Cc: Honnappa Nagarahalli, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 79e0f74ddba0a3c9bfb6d04fd4a5a2dfee9712a0 Mon Sep 17 00:00:00 2001
From: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Date: Wed, 19 Feb 2020 15:05:29 -0600
Subject: [PATCH] doc: fix quiescent state description in RCU guide
[ upstream commit 07d311cc355721438578c1e140b4b316abf64f18 ]
The quiescent state description refers to an incorrect
thread.
Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
doc/guides/prog_guide/rcu_lib.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/rcu_lib.rst b/doc/guides/prog_guide/rcu_lib.rst
index 8d0dfcf291..9b0bf138f6 100644
--- a/doc/guides/prog_guide/rcu_lib.rst
+++ b/doc/guides/prog_guide/rcu_lib.rst
@@ -61,7 +61,7 @@ wait till thread 2 enters quiescent state as well.
However, the writer does not need to wait for reader thread 3 to enter
quiescent state. Reader thread 3 was not accessing D1 when the delete
-operation happened. So, reader thread 1 will not have a reference to the
+operation happened. So, reader thread 3 will not have a reference to the
deleted entry.
It can be noted that, the critical sections for D2 is a quiescent state
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.028667300 +0000
+++ 0038-doc-fix-quiescent-state-description-in-RCU-guide.patch 2020-02-27 09:31:55.839946635 +0000
@@ -1,13 +1,14 @@
-From 07d311cc355721438578c1e140b4b316abf64f18 Mon Sep 17 00:00:00 2001
+From 79e0f74ddba0a3c9bfb6d04fd4a5a2dfee9712a0 Mon Sep 17 00:00:00 2001
From: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Date: Wed, 19 Feb 2020 15:05:29 -0600
Subject: [PATCH] doc: fix quiescent state description in RCU guide
+[ upstream commit 07d311cc355721438578c1e140b4b316abf64f18 ]
+
The quiescent state description refers to an incorrect
thread.
Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
-Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix multi-producer enqueue figure in ring guide' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (36 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix quiescent state description in RCU " luca.boccassi
@ 2020-02-27 9:33 ` luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix naming of Mellanox devices' " luca.boccassi
` (2 subsequent siblings)
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:33 UTC (permalink / raw)
To: Prateek Agarwal; +Cc: Honnappa Nagarahalli, dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 5654f42d4fa520144d8d692d0f70d855d1e0a917 Mon Sep 17 00:00:00 2001
From: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Date: Wed, 19 Feb 2020 15:05:30 -0600
Subject: [PATCH] doc: fix multi-producer enqueue figure in ring guide
[ upstream commit fa00525b9a546e166cca31f49f2512187ebe0db2 ]
The producer head pointer in multi producer enqueue fig.6.10
points to incorrect object in the ring array.
Fixes: fc1f2750a3ec ("doc: programmers guide")
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
.../prog_guide/img/ring-mp-enqueue3.svg | 193 +++++++++---------
1 file changed, 99 insertions(+), 94 deletions(-)
diff --git a/doc/guides/prog_guide/img/ring-mp-enqueue3.svg b/doc/guides/prog_guide/img/ring-mp-enqueue3.svg
index da483b031e..83ef7dba13 100644
--- a/doc/guides/prog_guide/img/ring-mp-enqueue3.svg
+++ b/doc/guides/prog_guide/img/ring-mp-enqueue3.svg
@@ -16,7 +16,7 @@
height="403.06647"
id="svg3388"
version="1.1"
- inkscape:version="0.48.4 r9939"
+ inkscape:version="0.92.4 (f8dce91, 2019-08-02)"
sodipodi:docname="ring-mp-enqueue3.svg">
<defs
id="defs3390">
@@ -359,15 +359,15 @@
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="201.35119"
- inkscape:cy="221.79811"
+ inkscape:cy="107.5124"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="958"
- inkscape:window-height="1002"
- inkscape:window-x="223"
- inkscape:window-y="22"
- inkscape:window-maximized="0"
+ inkscape:window-width="1313"
+ inkscape:window-height="713"
+ inkscape:window-x="53"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
inkscape:snap-grids="false"
inkscape:snap-to-guides="true"
showguides="false"
@@ -382,8 +382,10 @@
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
- originx="-162.97143px"
- originy="-370.03525px" />
+ originx="-162.97143"
+ originy="-370.03525"
+ spacingx="1"
+ spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata3393">
@@ -393,7 +395,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -490,37 +492,37 @@
</g>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="313.90488"
y="495.49646"
- id="text4269"
- sodipodi:linespacing="125%"><tspan
+ id="text4269"><tspan
sodipodi:role="line"
id="tspan4271"
x="313.90488"
- y="495.49646">obj1</tspan></text>
+ y="495.49646"
+ style="font-size:14px;line-height:1.25">obj1</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="368.95203"
y="495.49646"
- id="text4269-4"
- sodipodi:linespacing="125%"><tspan
+ id="text4269-4"><tspan
sodipodi:role="line"
id="tspan4271-5"
x="368.95203"
- y="495.49646">obj2</tspan></text>
+ y="495.49646"
+ style="font-size:14px;line-height:1.25">obj2</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="422.99518"
y="495.49646"
- id="text4269-5"
- sodipodi:linespacing="125%"><tspan
+ id="text4269-5"><tspan
sodipodi:role="line"
id="tspan4271-4"
x="422.99518"
- y="495.49646">obj3</tspan></text>
+ y="495.49646"
+ style="font-size:14px;line-height:1.25">obj3</tspan></text>
<path
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
d="m 323.57143,578.07647 0,-42.14286"
@@ -533,48 +535,48 @@
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="289.85715"
y="589.505"
- id="text4787"
- sodipodi:linespacing="125%"><tspan
+ id="text4787"><tspan
sodipodi:role="line"
id="tspan4789"
x="289.85715"
- y="589.505">cons_head</tspan></text>
+ y="589.505"
+ style="font-size:14px;line-height:1.25">cons_head</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="293.45334"
y="603.41034"
- id="text4787-3"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3"><tspan
sodipodi:role="line"
id="tspan4789-0"
x="293.45334"
- y="603.41034">cons_tail</tspan></text>
+ y="603.41034"
+ style="font-size:14px;line-height:1.25">cons_tail</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
- x="527.01239"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
+ x="567.01239"
y="587.9577"
- id="text4787-7"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-7"><tspan
sodipodi:role="line"
id="tspan4789-8"
- x="527.01239"
- y="587.9577">prod_head</tspan></text>
+ x="567.01239"
+ y="587.9577"
+ style="font-size:14px;line-height:1.25">prod_head</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="460.7514"
y="602.57739"
- id="text4787-3-6"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3-6"><tspan
sodipodi:role="line"
id="tspan4789-0-8"
x="460.7514"
- y="602.57739">prod_tail</tspan></text>
+ y="602.57739"
+ style="font-size:14px;line-height:1.25">prod_tail</tspan></text>
<rect
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 1;stroke-dashoffset:0;font-family:Arial;-inkscape-font-specification:Arial"
id="rect4889"
@@ -586,19 +588,20 @@
ry="11.631636" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="174.28571"
y="328.93362"
- id="text4891"
- sodipodi:linespacing="125%"><tspan
+ id="text4891"><tspan
sodipodi:role="line"
id="tspan4893"
x="174.28571"
- y="328.93362">local variables</tspan><tspan
+ y="328.93362"
+ style="font-size:14px;line-height:1.25">local variables</tspan><tspan
sodipodi:role="line"
x="174.28571"
y="346.43362"
- id="tspan4150">core 2</tspan></text>
+ id="tspan4150"
+ style="font-size:14px;line-height:1.25">core 2</tspan></text>
<rect
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 1;stroke-dashoffset:0;font-family:Arial;-inkscape-font-specification:Arial"
id="rect4889-8"
@@ -610,15 +613,15 @@
ry="11.631636" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="170.89287"
- y="682.09021"
- id="text4891-4"
- sodipodi:linespacing="125%"><tspan
+ y="664.09021"
+ id="text4891-4"><tspan
sodipodi:role="line"
id="tspan4893-3"
x="170.89287"
- y="682.09021">structure state</tspan></text>
+ y="664.09021"
+ style="font-size:14px;line-height:1.25">structure state</tspan></text>
<path
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
d="m 325.25296,407.43361 0,42.14286"
@@ -631,37 +634,37 @@
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="296.992"
y="401.48123"
- id="text4787-3-64"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3-64"><tspan
sodipodi:role="line"
id="tspan4789-0-9"
x="296.992"
- y="401.48123">cons_tail</tspan></text>
+ y="401.48123"
+ style="font-size:14px;line-height:1.25">cons_tail</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="440.26532"
y="401.48123"
- id="text4787-7-5"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-7-5"><tspan
sodipodi:role="line"
id="tspan4789-8-0"
x="440.26532"
- y="401.48123">prod_head</tspan></text>
+ y="401.48123"
+ style="font-size:14px;line-height:1.25">prod_head</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="522.43298"
y="401.48123"
- id="text4787-3-6-4"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3-6-4"><tspan
sodipodi:role="line"
id="tspan4789-0-8-8"
x="522.43298"
- y="401.48123">prod_next</tspan></text>
+ y="401.48123"
+ style="font-size:14px;line-height:1.25">prod_next</tspan></text>
<path
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
d="m 537.14285,407.43361 0,42.14286"
@@ -678,19 +681,20 @@
ry="11.631636" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="174.65646"
y="398.23306"
- id="text4891-3"
- sodipodi:linespacing="125%"><tspan
+ id="text4891-3"><tspan
sodipodi:role="line"
id="tspan4893-1"
x="174.65646"
- y="398.23306">local variables</tspan><tspan
+ y="398.23306"
+ style="font-size:14px;line-height:1.25">local variables</tspan><tspan
sodipodi:role="line"
x="174.65646"
y="415.73306"
- id="tspan4152">core 1</tspan></text>
+ id="tspan4152"
+ style="font-size:14px;line-height:1.25">core 1</tspan></text>
<path
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
d="m 326.73097,334.53006 0,42.14286"
@@ -703,37 +707,37 @@
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="298.47"
y="328.57767"
- id="text4787-3-64-5"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3-64-5"><tspan
sodipodi:role="line"
id="tspan4789-0-9-0"
x="298.47"
- y="328.57767">cons_tail</tspan></text>
+ y="328.57767"
+ style="font-size:14px;line-height:1.25">cons_tail</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="489.02905"
y="328.57767"
- id="text4787-7-5-3"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-7-5-3"><tspan
sodipodi:role="line"
id="tspan4789-8-0-6"
x="489.02905"
- y="328.57767">prod_head</tspan></text>
+ y="328.57767"
+ style="font-size:14px;line-height:1.25">prod_head</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="571.19672"
y="328.57767"
- id="text4787-3-6-4-1"
- sodipodi:linespacing="125%"><tspan
+ id="text4787-3-6-4-1"><tspan
sodipodi:role="line"
id="tspan4789-0-8-8-0"
x="571.19672"
- y="328.57767">prod_next</tspan></text>
+ y="328.57767"
+ style="font-size:14px;line-height:1.25">prod_next</tspan></text>
<path
style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
d="m 587.90657,334.53006 0,42.14286"
@@ -741,45 +745,46 @@
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="447.85715"
y="289.505"
- id="text3320"
- sodipodi:linespacing="125%"><tspan
+ id="text3320"><tspan
sodipodi:role="line"
id="tspan3322"
x="447.85715"
- y="289.505">compare and swap succeeds</tspan><tspan
+ y="289.505"
+ style="font-size:14px;line-height:1.25">compare and swap succeeds</tspan><tspan
sodipodi:role="line"
x="447.85715"
y="307.005"
- id="tspan3324">on core 2</tspan></text>
+ id="tspan3324"
+ style="font-size:14px;line-height:1.25">on core 2</tspan></text>
<path
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend);font-family:Arial;-inkscape-font-specification:Arial"
- d="m 542.85715,575.57647 0,-42.14286"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:125%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+ d="M 602.85715,575.57647 V 533.43361"
id="path4309-4-0"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="477.22983"
y="495.49646"
- id="text4269-5-5"
- sodipodi:linespacing="125%"><tspan
+ id="text4269-5-5"><tspan
sodipodi:role="line"
id="tspan4271-4-5"
x="477.22983"
- y="495.49646">obj4</tspan></text>
+ y="495.49646"
+ style="font-size:14px;line-height:1.25">obj4</tspan></text>
<text
xml:space="preserve"
- style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="531.27301"
y="496.00156"
- id="text4269-5-7"
- sodipodi:linespacing="125%"><tspan
+ id="text4269-5-7"><tspan
sodipodi:role="line"
id="tspan4271-4-6"
x="531.27301"
- y="496.00156">obj5</tspan></text>
+ y="496.00156"
+ style="font-size:14px;line-height:1.25">obj5</tspan></text>
</g>
</svg>
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.055537538 +0000
+++ 0039-doc-fix-multi-producer-enqueue-figure-in-ring-guide.patch 2020-02-27 09:31:55.839946635 +0000
@@ -1,13 +1,14 @@
-From fa00525b9a546e166cca31f49f2512187ebe0db2 Mon Sep 17 00:00:00 2001
+From 5654f42d4fa520144d8d692d0f70d855d1e0a917 Mon Sep 17 00:00:00 2001
From: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Date: Wed, 19 Feb 2020 15:05:30 -0600
Subject: [PATCH] doc: fix multi-producer enqueue figure in ring guide
+[ upstream commit fa00525b9a546e166cca31f49f2512187ebe0db2 ]
+
The producer head pointer in multi producer enqueue fig.6.10
points to incorrect object in the ring array.
Fixes: fc1f2750a3ec ("doc: programmers guide")
-Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix naming of Mellanox devices' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (37 preceding siblings ...)
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix multi-producer enqueue figure in ring " luca.boccassi
@ 2020-02-27 9:34 ` luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix typos in 19.11 release notes' " luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'devtools: add fixes flag to commit listing' " luca.boccassi
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:34 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From b4d4bcbf3a0d794f313b5d0d080dae5376263b13 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 24 Feb 2020 20:52:14 +0100
Subject: [PATCH] doc: fix naming of Mellanox devices
[ upstream commit ee76bddc768c81b342d3901c84206421113544ca ]
The devices of the family ConnectX may have two letters as suffix.
Such suffix is preceded with a space and the second x is lowercase:
- ConnectX-4 Lx
- ConnectX-5 Ex
- ConnectX-6 Dx
Uppercase of the device family name BlueField is also fixed.
The lists of supported devices are fixed.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
config/common_base | 2 +-
doc/guides/nics/mlx4.rst | 5 --
doc/guides/nics/mlx5.rst | 81 ++++++++++++++++----------
doc/guides/rel_notes/release_18_08.rst | 2 +-
doc/guides/rel_notes/release_19_02.rst | 2 +-
doc/guides/rel_notes/release_19_11.rst | 2 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_rxtx.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
9 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/config/common_base b/config/common_base
index 7dec7ed457..2e0c725988 100644
--- a/config/common_base
+++ b/config/common_base
@@ -352,7 +352,7 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
#
# Compile burst-oriented Mellanox ConnectX-4, ConnectX-5,
-# ConnectX-6 & Bluefield (MLX5) PMD
+# ConnectX-6 & BlueField (MLX5) PMD
#
CONFIG_RTE_LIBRTE_MLX5_PMD=n
CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index 4b1d1aceb2..1f1e2f6c77 100644
--- a/doc/guides/nics/mlx4.rst
+++ b/doc/guides/nics/mlx4.rst
@@ -298,11 +298,6 @@ Installing Mellanox OFED
5. Continue with :ref:`section 2 of the Quick Start Guide <QSG_2>`.
-Supported NICs
---------------
-
-* Mellanox(R) ConnectX(R)-3 Pro 40G MCX354A-FCC_Ax (2*40G)
-
.. _qsg:
Quick Start Guide
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 98d53b772b..54354fccd6 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -2,12 +2,14 @@
Copyright 2015 6WIND S.A.
Copyright 2015 Mellanox Technologies, Ltd
+.. include:: <isonum.txt>
+
MLX5 poll mode driver
=====================
The MLX5 poll mode driver library (**librte_pmd_mlx5**) provides support
for **Mellanox ConnectX-4**, **Mellanox ConnectX-4 Lx** , **Mellanox
-ConnectX-5**, **Mellanox ConnectX-6**, **Mellanox ConnectX-6DX** and
+ConnectX-5**, **Mellanox ConnectX-6**, **Mellanox ConnectX-6 Dx** and
**Mellanox BlueField** families of 10/25/40/50/100/200 Gb/s adapters
as well as their virtual functions (VF) in SR-IOV context.
@@ -316,9 +318,9 @@ Run-time configuration
Supported on:
- - x86_64 with ConnectX-4, ConnectX-4 LX, ConnectX-5, ConnectX-6, ConnectX-6 DX
+ - x86_64 with ConnectX-4, ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx
and BlueField.
- - POWER9 and ARMv8 with ConnectX-4 LX, ConnectX-5, ConnectX-6, ConnectX-6 DX
+ - POWER9 and ARMv8 with ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx
and BlueField.
- ``rxq_cqe_pad_en`` parameter [int]
@@ -349,9 +351,9 @@ Run-time configuration
Supported on:
- - x86_64 with ConnectX-4, ConnectX-4 LX, ConnectX-5, ConnectX-6, ConnectX-6 DX
+ - x86_64 with ConnectX-4, ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx
and BlueField.
- - POWER8 and ARMv8 with ConnectX-4 LX, ConnectX-5, ConnectX-6, ConnectX-6 DX
+ - POWER8 and ARMv8 with ConnectX-4 Lx, ConnectX-5, ConnectX-6, ConnectX-6 Dx
and BlueField.
- ``mprq_en`` parameter [int]
@@ -454,14 +456,14 @@ Run-time configuration
If ``txq_inline_min`` key is not present, the value may be queried by the
driver from the NIC via DevX if this feature is available. If there is no DevX
enabled/supported the value 18 (supposing L2 header including VLAN) is set
- for ConnectX-4 and ConnectX-4LX, and 0 is set by default for ConnectX-5
+ for ConnectX-4 and ConnectX-4 Lx, and 0 is set by default for ConnectX-5
and newer NICs. If packet is shorter the ``txq_inline_min`` value, the entire
packet is inlined.
For ConnectX-4 NIC, driver does not allow specifying value below 18
(minimal L2 header, including VLAN), error will be raised.
- For ConnectX-4LX NIC, it is allowed to specify values below 18, but
+ For ConnectX-4 Lx NIC, it is allowed to specify values below 18, but
it is not recommended and may prevent NIC from sending packets over
some configurations.
@@ -544,7 +546,7 @@ Run-time configuration
- ``txq_mpw_en`` parameter [int]
A nonzero value enables Enhanced Multi-Packet Write (eMPW) for ConnectX-5,
- ConnectX-6, ConnectX-6 DX and BlueField. eMPW allows the TX burst function to pack
+ ConnectX-6, ConnectX-6 Dx and BlueField. eMPW allows the TX burst function to pack
up multiple packets in a single descriptor session in order to save PCI bandwidth
and improve performance at the cost of a slightly higher CPU usage. When
``txq_inline_mpw`` is set along with ``txq_mpw_en``, TX burst function copies
@@ -590,7 +592,7 @@ Run-time configuration
- ``tx_vec_en`` parameter [int]
- A nonzero value enables Tx vector on ConnectX-5, ConnectX-6, ConnectX-6 DX
+ A nonzero value enables Tx vector on ConnectX-5, ConnectX-6, ConnectX-6 Dx
and BlueField NICs if the number of global Tx queues on the port is less than
``txqs_max_vec``. The parameter is deprecated and ignored.
@@ -887,7 +889,7 @@ Mellanox OFED/EN
- ConnectX-5: **16.21.1000** and above.
- ConnectX-5 Ex: **16.21.1000** and above.
- ConnectX-6: **20.99.5374** and above.
- - ConnectX-6 DX: **22.27.0090** and above.
+ - ConnectX-6 Dx: **22.27.0090** and above.
- BlueField: **18.25.1010** and above.
While these libraries and kernel modules are available on OpenFabrics
@@ -912,28 +914,43 @@ required from that distribution.
Supported NICs
--------------
-* Mellanox(R) ConnectX(R)-4 10G MCX4111A-XCAT (1x10G)
-* Mellanox(R) ConnectX(R)-4 10G MCX4121A-XCAT (2x10G)
-* Mellanox(R) ConnectX(R)-4 25G MCX4111A-ACAT (1x25G)
-* Mellanox(R) ConnectX(R)-4 25G MCX4121A-ACAT (2x25G)
-* Mellanox(R) ConnectX(R)-4 40G MCX4131A-BCAT (1x40G)
-* Mellanox(R) ConnectX(R)-4 40G MCX413A-BCAT (1x40G)
-* Mellanox(R) ConnectX(R)-4 40G MCX415A-BCAT (1x40G)
-* Mellanox(R) ConnectX(R)-4 50G MCX4131A-GCAT (1x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX413A-GCAT (1x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX414A-BCAT (2x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX415A-GCAT (2x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX416A-BCAT (2x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX416A-GCAT (2x50G)
-* Mellanox(R) ConnectX(R)-4 50G MCX415A-CCAT (1x100G)
-* Mellanox(R) ConnectX(R)-4 100G MCX416A-CCAT (2x100G)
-* Mellanox(R) ConnectX(R)-4 Lx 10G MCX4121A-XCAT (2x10G)
-* Mellanox(R) ConnectX(R)-4 Lx 25G MCX4121A-ACAT (2x25G)
-* Mellanox(R) ConnectX(R)-5 100G MCX556A-ECAT (2x100G)
-* Mellanox(R) ConnectX(R)-5 Ex EN 100G MCX516A-CDAT (2x100G)
-* Mellanox(R) ConnectX(R)-6 200G MCX654106A-HCAT (4x200G)
-* Mellanox(R) ConnectX(R)-6DX EN 100G MCX623106AN-CDAT (2*100g)
-* Mellanox(R) ConnectX(R)-6DX EN 200G MCX623105AN-VDAT (1*200g)
+The following Mellanox device families are supported by the same mlx5 driver:
+
+ - ConnectX-4
+ - ConnectX-4 Lx
+ - ConnectX-5
+ - ConnectX-5 Ex
+ - ConnectX-6
+ - ConnectX-6 Dx
+ - BlueField
+
+Below are detailed device names:
+
+* Mellanox\ |reg| ConnectX\ |reg|-4 10G MCX4111A-XCAT (1x10G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 10G MCX412A-XCAT (2x10G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 25G MCX4111A-ACAT (1x25G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 25G MCX412A-ACAT (2x25G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 40G MCX413A-BCAT (1x40G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 40G MCX4131A-BCAT (1x40G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 40G MCX415A-BCAT (1x40G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX413A-GCAT (1x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX4131A-GCAT (1x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX414A-BCAT (2x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX415A-GCAT (1x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX416A-BCAT (2x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX416A-GCAT (2x50G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 50G MCX415A-CCAT (1x100G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 100G MCX416A-CCAT (2x100G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 Lx 10G MCX4111A-XCAT (1x10G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 Lx 10G MCX4121A-XCAT (2x10G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 Lx 25G MCX4111A-ACAT (1x25G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 Lx 25G MCX4121A-ACAT (2x25G)
+* Mellanox\ |reg| ConnectX\ |reg|-4 Lx 40G MCX4131A-BCAT (1x40G)
+* Mellanox\ |reg| ConnectX\ |reg|-5 100G MCX556A-ECAT (2x100G)
+* Mellanox\ |reg| ConnectX\ |reg|-5 Ex EN 100G MCX516A-CDAT (2x100G)
+* Mellanox\ |reg| ConnectX\ |reg|-6 200G MCX654106A-HCAT (2x200G)
+* Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 100G MCX623106AN-CDAT (2x100G)
+* Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 200G MCX623105AN-VDAT (1x200G)
Quick Start Guide on OFED/EN
----------------------------
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 8a09dee95c..4ae388c331 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -546,4 +546,4 @@ Tested Platforms
* Mellanox MLNX_OFED 4.2-1.4.21.0
* DPDK application running on ARM cores inside SmartNIC
- * Bluefield representors support planned for next release.
+ * BlueField representors support planned for next release.
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index ace1534eff..87dfbf5c7d 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -109,7 +109,7 @@ New Features
``CONFIG_RTE_IBVERBS_LINK_DLOPEN`` for make and ``ibverbs_link`` for meson.
* Added static linkage of ``mlx`` dependency.
* Improved stability of E-Switch flow driver.
- * Added new make build configuration to set the cacheline size for Bluefield
+ * Added new make build configuration to set the cacheline size for BlueField
correctly - ``arm64-bluefield-linux-gcc``.
* **Updated the enic driver.**
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 84aa03a1f2..f0aee29477 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -206,7 +206,7 @@ New Features
* Added support for VLAN set VID offload command.
* Added support for matching on packets withe Geneve tunnel header.
* Added hairpin support.
- * Added ConnectX6-DX support.
+ * Added ConnectX-6 Dx support.
* Flow engine selected based on RDMA Core library version.
DV flow engine selected if version is rdma-core-24.0 or higher.
Verbs flow engine selected otherwise.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 646d50285b..5111057471 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1702,7 +1702,7 @@ out:
* key is specified in devargs
* - if DevX is enabled the inline mode is queried from the
* device (HCA attributes and NIC vport context if needed).
- * - otherwise L2 mode (18 bytes) is assumed for ConnectX-4/4LX
+ * - otherwise L2 mode (18 bytes) is assumed for ConnectX-4/4 Lx
* and none (0 bytes) for other NICs
*
* @param spawn
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 4a9c44dc61..ea1050f9cd 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -5037,7 +5037,7 @@ MLX5_TXOFF_DECL(iv,
/*
* Generate routines with Legacy Multi-Packet Write support.
- * This mode is supported by ConnectX-4LX only and imposes
+ * This mode is supported by ConnectX-4 Lx only and imposes
* offload limitations, not supported:
* - ACL/Flows (metadata are becoming meaningless)
* - WQE Inline headers
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 50d2464fa3..3e29613d4b 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -981,7 +981,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
* If there is requested minimal amount of data to inline
* we MUST enable inlining. This is a case for ConnectX-4
* which usually requires L2 inlined for correct operating
- * and ConnectX-4LX which requires L2-L4 inlined to
+ * and ConnectX-4 Lx which requires L2-L4 inlined to
* support E-Switch Flows.
*/
if (inlen_mode) {
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.081947689 +0000
+++ 0040-doc-fix-naming-of-Mellanox-devices.patch 2020-02-27 09:31:55.855946752 +0000
@@ -1,8 +1,10 @@
-From ee76bddc768c81b342d3901c84206421113544ca Mon Sep 17 00:00:00 2001
+From b4d4bcbf3a0d794f313b5d0d080dae5376263b13 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 24 Feb 2020 20:52:14 +0100
Subject: [PATCH] doc: fix naming of Mellanox devices
+[ upstream commit ee76bddc768c81b342d3901c84206421113544ca ]
+
The devices of the family ConnectX may have two letters as suffix.
Such suffix is preceded with a space and the second x is lowercase:
- ConnectX-4 Lx
@@ -15,23 +17,22 @@
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
- config/common_base | 4 +-
+ config/common_base | 2 +-
doc/guides/nics/mlx4.rst | 5 --
doc/guides/nics/mlx5.rst | 81 ++++++++++++++++----------
doc/guides/rel_notes/release_18_08.rst | 2 +-
doc/guides/rel_notes/release_19_02.rst | 2 +-
doc/guides/rel_notes/release_19_11.rst | 2 +-
- doc/guides/vdpadevs/mlx5.rst | 12 ++--
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5_rxtx.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
- 10 files changed, 64 insertions(+), 50 deletions(-)
+ 9 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/config/common_base b/config/common_base
-index 6ea9c63cc3..7ca2f28b19 100644
+index 7dec7ed457..2e0c725988 100644
--- a/config/common_base
+++ b/config/common_base
-@@ -361,13 +361,13 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
+@@ -352,7 +352,7 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
#
# Compile burst-oriented Mellanox ConnectX-4, ConnectX-5,
@@ -40,13 +41,6 @@
#
CONFIG_RTE_LIBRTE_MLX5_PMD=n
CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
-
- #
--# Compile vdpa-oriented Mellanox ConnectX-6 & Bluefield (MLX5) PMD
-+# Compile vdpa-oriented Mellanox ConnectX-6 & BlueField (MLX5) PMD
- #
- CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD=n
-
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index 4b1d1aceb2..1f1e2f6c77 100644
--- a/doc/guides/nics/mlx4.rst
@@ -64,7 +58,7 @@
Quick Start Guide
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index 006d075e86..4a9697941b 100644
+index 98d53b772b..54354fccd6 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -2,12 +2,14 @@
@@ -83,7 +77,7 @@
**Mellanox BlueField** families of 10/25/40/50/100/200 Gb/s adapters
as well as their virtual functions (VF) in SR-IOV context.
-@@ -336,9 +338,9 @@ Run-time configuration
+@@ -316,9 +318,9 @@ Run-time configuration
Supported on:
@@ -95,7 +89,7 @@
and BlueField.
- ``rxq_cqe_pad_en`` parameter [int]
-@@ -369,9 +371,9 @@ Run-time configuration
+@@ -349,9 +351,9 @@ Run-time configuration
Supported on:
@@ -107,7 +101,7 @@
and BlueField.
- ``mprq_en`` parameter [int]
-@@ -474,14 +476,14 @@ Run-time configuration
+@@ -454,14 +456,14 @@ Run-time configuration
If ``txq_inline_min`` key is not present, the value may be queried by the
driver from the NIC via DevX if this feature is available. If there is no DevX
enabled/supported the value 18 (supposing L2 header including VLAN) is set
@@ -124,7 +118,7 @@
it is not recommended and may prevent NIC from sending packets over
some configurations.
-@@ -564,7 +566,7 @@ Run-time configuration
+@@ -544,7 +546,7 @@ Run-time configuration
- ``txq_mpw_en`` parameter [int]
A nonzero value enables Enhanced Multi-Packet Write (eMPW) for ConnectX-5,
@@ -133,7 +127,7 @@
up multiple packets in a single descriptor session in order to save PCI bandwidth
and improve performance at the cost of a slightly higher CPU usage. When
``txq_inline_mpw`` is set along with ``txq_mpw_en``, TX burst function copies
-@@ -611,7 +613,7 @@ Run-time configuration
+@@ -590,7 +592,7 @@ Run-time configuration
- ``tx_vec_en`` parameter [int]
@@ -142,7 +136,7 @@
and BlueField NICs if the number of global Tx queues on the port is less than
``txqs_max_vec``. The parameter is deprecated and ignored.
-@@ -912,7 +914,7 @@ Mellanox OFED/EN
+@@ -887,7 +889,7 @@ Mellanox OFED/EN
- ConnectX-5: **16.21.1000** and above.
- ConnectX-5 Ex: **16.21.1000** and above.
- ConnectX-6: **20.99.5374** and above.
@@ -151,7 +145,7 @@
- BlueField: **18.25.1010** and above.
While these libraries and kernel modules are available on OpenFabrics
-@@ -937,28 +939,43 @@ required from that distribution.
+@@ -912,28 +914,43 @@ required from that distribution.
Supported NICs
--------------
@@ -253,46 +247,11 @@
* Flow engine selected based on RDMA Core library version.
DV flow engine selected if version is rdma-core-24.0 or higher.
Verbs flow engine selected otherwise.
-diff --git a/doc/guides/vdpadevs/mlx5.rst b/doc/guides/vdpadevs/mlx5.rst
-index 1660192221..dd377afda5 100644
---- a/doc/guides/vdpadevs/mlx5.rst
-+++ b/doc/guides/vdpadevs/mlx5.rst
-@@ -1,12 +1,14 @@
- .. SPDX-License-Identifier: BSD-3-Clause
- Copyright 2019 Mellanox Technologies, Ltd
-
-+.. include:: <isonum.txt>
-+
- MLX5 vDPA driver
- ================
-
- The MLX5 vDPA (vhost data path acceleration) driver library
- (**librte_pmd_mlx5_vdpa**) provides support for **Mellanox ConnectX-6**,
--**Mellanox ConnectX-6DX** and **Mellanox BlueField** families of
-+**Mellanox ConnectX-6 Dx** and **Mellanox BlueField** families of
- 10/25/40/50/100/200 Gb/s adapters as well as their virtual functions (VF) in
- SR-IOV context.
-
-@@ -48,10 +50,10 @@ By default, the mlx5 device will be probed by the net/mlx5 driver.
- Supported NICs
- --------------
-
--* Mellanox(R) ConnectX(R)-6 200G MCX654106A-HCAT (4x200G)
--* Mellanox(R) ConnectX(R)-6DX EN 100G MCX623106AN-CDAT (2*100G)
--* Mellanox(R) ConnectX(R)-6DX EN 200G MCX623105AN-VDAT (1*200G)
--* Mellanox(R) BlueField SmartNIC 25G MBF1M332A-ASCAT (2*25G)
-+* Mellanox\ |reg| ConnectX\ |reg|-6 200G MCX654106A-HCAT (2x200G)
-+* Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 100G MCX623106AN-CDAT (2x100G)
-+* Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 200G MCX623105AN-VDAT (1x200G)
-+* Mellanox\ |reg| BlueField SmartNIC 25G MBF1M332A-ASCAT (2x25G)
-
- Prerequisites
- -------------
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 4803760cab..94aaa60579 100644
+index 646d50285b..5111057471 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
-@@ -1724,7 +1724,7 @@ out:
+@@ -1702,7 +1702,7 @@ out:
* key is specified in devargs
* - if DevX is enabled the inline mode is queried from the
* device (HCA attributes and NIC vport context if needed).
@@ -302,10 +261,10 @@
*
* @param spawn
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 2b4fc2ae06..5ac63da803 100644
+index 4a9c44dc61..ea1050f9cd 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -5213,7 +5213,7 @@ MLX5_TXOFF_DECL(iv,
+@@ -5037,7 +5037,7 @@ MLX5_TXOFF_DECL(iv,
/*
* Generate routines with Legacy Multi-Packet Write support.
@@ -315,10 +274,10 @@
* - ACL/Flows (metadata are becoming meaningless)
* - WQE Inline headers
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 2ad849a229..57bc116450 100644
+index 50d2464fa3..3e29613d4b 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -983,7 +983,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -981,7 +981,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
* If there is requested minimal amount of data to inline
* we MUST enable inlining. This is a case for ConnectX-4
* which usually requires L2 inlined for correct operating
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'doc: fix typos in 19.11 release notes' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (38 preceding siblings ...)
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix naming of Mellanox devices' " luca.boccassi
@ 2020-02-27 9:34 ` luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'devtools: add fixes flag to commit listing' " luca.boccassi
40 siblings, 0 replies; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:34 UTC (permalink / raw)
To: Yong Wang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 303f530d86e79a66f621bfe6aab721ef85457e79 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Tue, 31 Dec 2019 15:36:47 +0800
Subject: [PATCH] doc: fix typos in 19.11 release notes
[ upstream commit debb8a7f94f817e72aa46aa709f00a13d1d2eba9 ]
Remove the redundant "when used". And modify "ans" to "and".
Fixes: b21302a10721 ("eventdev: add Tx flag for packets with same destination")
Fixes: 92c083915ade ("doc: update release notes for 19.11")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
doc/guides/rel_notes/release_19_11.rst | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index f0aee29477..eb05149f8f 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -474,9 +474,8 @@ API Changes
* event: The function ``rte_event_eth_tx_adapter_enqueue`` takes an additional
input as ``flags``. Flag ``RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST`` which
- has been introduced in this release is used when used when all the packets
- enqueued in the Tx adapter are destined for the same Ethernet port ans Tx
- queue.
+ has been introduced in this release is used when all the packets enqueued in
+ the Tx adapter are destined for the same Ethernet port and Tx queue.
* sched: The pipe nodes configuration parameters such as number of pipes,
pipe queue sizes, pipe profiles, etc., are moved from port level structure
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.121527526 +0000
+++ 0041-doc-fix-typos-in-19.11-release-notes.patch 2020-02-27 09:31:55.855946752 +0000
@@ -1,13 +1,14 @@
-From debb8a7f94f817e72aa46aa709f00a13d1d2eba9 Mon Sep 17 00:00:00 2001
+From 303f530d86e79a66f621bfe6aab721ef85457e79 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Tue, 31 Dec 2019 15:36:47 +0800
Subject: [PATCH] doc: fix typos in 19.11 release notes
+[ upstream commit debb8a7f94f817e72aa46aa709f00a13d1d2eba9 ]
+
Remove the redundant "when used". And modify "ans" to "and".
Fixes: b21302a10721 ("eventdev: add Tx flag for packets with same destination")
Fixes: 92c083915ade ("doc: update release notes for 19.11")
-Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
^ permalink raw reply [flat|nested] 310+ messages in thread
* [dpdk-stable] patch 'devtools: add fixes flag to commit listing' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
` (39 preceding siblings ...)
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix typos in 19.11 release notes' " luca.boccassi
@ 2020-02-27 9:34 ` luca.boccassi
2020-02-27 10:26 ` Kevin Traynor
40 siblings, 1 reply; 310+ messages in thread
From: luca.boccassi @ 2020-02-27 9:34 UTC (permalink / raw)
To: Kevin Traynor; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 19.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
From 13c926a42ad9634ac46aa7b6eec1d5bd7c72e71b Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Mon, 3 Feb 2020 15:59:55 +0000
Subject: [PATCH] devtools: add fixes flag to commit listing
[ upstream commit 8070d8fecb4ec263ce875d34e8093b973f250170 ]
During backporting, if the fixes or stable tag are missing,
it usually requires some investigation by stable maintainer
as to why.
The presence of a fixes tag may be known from whether the
originating release of the issue is printed at the end of the
line but with variable line lengths and nested partial fixes
it doesn't catch the eye.
When there are a large amount of commits, adding an aligned column
indicating the presence of a fixes tag beside the stable one makes
it easier to quickly see the patches requiring further investigation.
e.g.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04)
20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0)
20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08)
20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0)
20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
20.02 dcd05da0a S F app/testpmd: fix GENEVE flow item (18.02)
20.02 b0b9fdad2 S - net/bnx2x: support secondary process (N/A)
20.02 f8279f47d S F net/netvsc: fix crash in secondary process (18.08)
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
devtools/git-log-fixes.sh | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
index e37ee22600..6d468d6731 100755
--- a/devtools/git-log-fixes.sh
+++ b/devtools/git-log-fixes.sh
@@ -94,11 +94,23 @@ stable_tag () # <hash>
fi
}
+# print a marker for fixes tag presence
+fixes_tag () # <hash>
+{
+ if git log --format='%b' -1 $1 | grep -qi '^Fixes: *' ; then
+ echo 'F'
+ else
+ echo '-'
+ fi
+}
+
git log --oneline --reverse $range |
while read id headline ; do
origins=$(origin_filter $id)
stable=$(stable_tag $id)
- [ "$stable" = "S" ] || [ -n "$origins" ] || echo "$headline" | grep -q fix || continue
+ fixes=$(fixes_tag $id)
+ [ "$stable" = "S" ] || [ "$fixes" = "F" ] || [ -n "$origins" ] || \
+ echo "$headline" | grep -q fix || continue
version=$(commit_version $id)
if [ -n "$origins" ] ; then
origver="$(origin_version $origins)"
@@ -108,5 +120,5 @@ while read id headline ; do
else
origver='N/A'
fi
- printf '%s %7s %s %s (%s)\n' $version $id $stable "$headline" "$origver"
+ printf '%s %7s %s %s %s (%s)\n' $version $id $stable $fixes "$headline" "$origver"
done
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-27 09:31:57.147862593 +0000
+++ 0042-devtools-add-fixes-flag-to-commit-listing.patch 2020-02-27 09:31:55.855946752 +0000
@@ -1,8 +1,10 @@
-From 8070d8fecb4ec263ce875d34e8093b973f250170 Mon Sep 17 00:00:00 2001
+From 13c926a42ad9634ac46aa7b6eec1d5bd7c72e71b Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Mon, 3 Feb 2020 15:59:55 +0000
Subject: [PATCH] devtools: add fixes flag to commit listing
+[ upstream commit 8070d8fecb4ec263ce875d34e8093b973f250170 ]
+
During backporting, if the fixes or stable tag are missing,
it usually requires some investigation by stable maintainer
as to why.
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'devtools: add fixes flag to commit listing' has been queued to stable release 19.11.1
2020-02-27 9:34 ` [dpdk-stable] patch 'devtools: add fixes flag to commit listing' " luca.boccassi
@ 2020-02-27 10:26 ` Kevin Traynor
0 siblings, 0 replies; 310+ messages in thread
From: Kevin Traynor @ 2020-02-27 10:26 UTC (permalink / raw)
To: luca.boccassi; +Cc: dpdk stable
On 27/02/2020 09:34, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 02/29/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
Hi Luca,
I don't think there's a need to backport this. It won't do any harm, but
not sure anyone would be running git-log-fixes on the stable branch,
considering the fix tags reference master and stable tags will have been
removed. No objection though, if you have a case and want to take it.
thanks,
Kevin.
> ---
> From 13c926a42ad9634ac46aa7b6eec1d5bd7c72e71b Mon Sep 17 00:00:00 2001
> From: Kevin Traynor <ktraynor@redhat.com>
> Date: Mon, 3 Feb 2020 15:59:55 +0000
> Subject: [PATCH] devtools: add fixes flag to commit listing
>
> [ upstream commit 8070d8fecb4ec263ce875d34e8093b973f250170 ]
>
> During backporting, if the fixes or stable tag are missing,
> it usually requires some investigation by stable maintainer
> as to why.
>
> The presence of a fixes tag may be known from whether the
> originating release of the issue is printed at the end of the
> line but with variable line lengths and nested partial fixes
> it doesn't catch the eye.
>
> When there are a large amount of commits, adding an aligned column
> indicating the presence of a fixes tag beside the stable one makes
> it easier to quickly see the patches requiring further investigation.
>
> e.g.
> 20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04)
> 20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0)
> 20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08)
> 20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0)
> 20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
> 20.02 dcd05da0a S F app/testpmd: fix GENEVE flow item (18.02)
> 20.02 b0b9fdad2 S - net/bnx2x: support secondary process (N/A)
> 20.02 f8279f47d S F net/netvsc: fix crash in secondary process (18.08)
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
> devtools/git-log-fixes.sh | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/devtools/git-log-fixes.sh b/devtools/git-log-fixes.sh
> index e37ee22600..6d468d6731 100755
> --- a/devtools/git-log-fixes.sh
> +++ b/devtools/git-log-fixes.sh
> @@ -94,11 +94,23 @@ stable_tag () # <hash>
> fi
> }
>
> +# print a marker for fixes tag presence
> +fixes_tag () # <hash>
> +{
> + if git log --format='%b' -1 $1 | grep -qi '^Fixes: *' ; then
> + echo 'F'
> + else
> + echo '-'
> + fi
> +}
> +
> git log --oneline --reverse $range |
> while read id headline ; do
> origins=$(origin_filter $id)
> stable=$(stable_tag $id)
> - [ "$stable" = "S" ] || [ -n "$origins" ] || echo "$headline" | grep -q fix || continue
> + fixes=$(fixes_tag $id)
> + [ "$stable" = "S" ] || [ "$fixes" = "F" ] || [ -n "$origins" ] || \
> + echo "$headline" | grep -q fix || continue
> version=$(commit_version $id)
> if [ -n "$origins" ] ; then
> origver="$(origin_version $origins)"
> @@ -108,5 +120,5 @@ while read id headline ; do
> else
> origver='N/A'
> fi
> - printf '%s %7s %s %s (%s)\n' $version $id $stable "$headline" "$origver"
> + printf '%s %7s %s %s %s (%s)\n' $version $id $stable $fixes "$headline" "$origver"
> done
>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' " luca.boccassi
@ 2020-02-27 11:06 ` Luca Boccassi
0 siblings, 0 replies; 310+ messages in thread
From: Luca Boccassi @ 2020-02-27 11:06 UTC (permalink / raw)
To: stable; +Cc: suanmingm, rasland, matan
Gah, sorry I forgot to rebase and remove the patches - the reverts
shouldn't have been in the list. The patches:
net/mlx5: fix layer type in header modify action
net/mlx5: fix layer validation with decapsulation
cause build failures and were skipped.
On Thu, 2020-02-27 at 09:33 +0000, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to
> http://dpdk.org/browse/dpdk-stable
> yet.
> It will be pushed if I get no objections before 02/29/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit
> vs the
> patch applied to the branch. This will indicate if there was any
> rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase
> was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 14ecda7bce99cf45330ab89bda35d4b35342e987 Mon Sep 17 00:00:00
> 2001
> From: Luca Boccassi <
> luca.boccassi@microsoft.com
> >
> Date: Wed, 26 Feb 2020 20:05:15 +0000
> Subject: [PATCH] Revert "net/mlx5: fix layer validation with
> decapsulation"
>
> This reverts commit f9cb01862aabf54ab0b88cd755602fe966a73c2a.
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 36 ++++++-------------------------
> --
> 1 file changed, 6 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index aa65300d9c..e39d3c4299 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -3015,14 +3015,10 @@ flow_dv_validate_action_modify_ipv4(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L3_IPV4 :
> - MLX5_FLOW_LAYER_OUTER_L3_IPV4;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV4))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL,
> @@ -3053,14 +3049,10 @@ flow_dv_validate_action_modify_ipv6(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L3_IPV6 :
> - MLX5_FLOW_LAYER_OUTER_L3_IPV6;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_L3_IPV6))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL,
> @@ -3091,14 +3083,10 @@ flow_dv_validate_action_modify_tp(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L4 :
> - MLX5_FLOW_LAYER_OUTER_L4;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_L4))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL, "no transport
> layer "
> @@ -3130,14 +3118,10 @@ flow_dv_validate_action_modify_tcp_seq(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L4_TCP :
> - MLX5_FLOW_LAYER_OUTER_L4_TCP;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL, "no TCP item
> in"
> @@ -3179,14 +3163,10 @@ flow_dv_validate_action_modify_tcp_ack(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L4_TCP :
> - MLX5_FLOW_LAYER_OUTER_L4_TCP;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_TCP))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL, "no TCP item
> in"
> @@ -3227,14 +3207,10 @@ flow_dv_validate_action_modify_ttl(const
> uint64_t action_flags,
> struct rte_flow_error *error)
> {
> int ret = 0;
> - uint64_t layer;
>
> ret = flow_dv_validate_action_modify_hdr(action_flags, action,
> error);
> if (!ret) {
> - layer = (action_flags & MLX5_FLOW_ACTION_DECAP) ?
> - MLX5_FLOW_LAYER_INNER_L3 :
> - MLX5_FLOW_LAYER_OUTER_L3;
> - if (!(item_flags & layer))
> + if (!(item_flags & MLX5_FLOW_LAYER_L3))
> return rte_flow_error_set(error, EINVAL,
> RTE_FLOW_ERROR_TYPE_A
> CTION,
> NULL,
>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] [EXT] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' has been queued to stable release 19.11.1
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' " luca.boccassi
@ 2020-02-28 4:24 ` Anoob Joseph
2020-02-28 4:33 ` Akhil Goyal
0 siblings, 1 reply; 310+ messages in thread
From: Anoob Joseph @ 2020-02-28 4:24 UTC (permalink / raw)
To: luca.boccassi, Ankur Dwivedi; +Cc: Akhil Goyal, dpdk stable
Hi Luca,
The diff between upstream patch and dpdk-stable patch doesn't look right. I would say we can defer this change from merge to stable.
@Akhil, what's your take on this?
Thanks,
Anoob
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Thursday, February 27, 2020 3:03 PM
> To: Ankur Dwivedi <adwivedi@marvell.com>
> Cc: Anoob Joseph <anoobj@marvell.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; dpdk stable <stable@dpdk.org>
> Subject: [EXT] patch 'examples/ipsec-secgw: extend inline session to non
> AES-GCM' has been queued to stable release 19.11.1
>
> External Email
>
> ----------------------------------------------------------------------
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.1
>
> Note it hasn't been pushed to
> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__dpdk.org_browse_dpdk-
> 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs
> 2n6B-WYLn1v9SyTMrT5EQqh2TU&m=uIvPnv-
> I27twfm1d6XD0AMFwcH8L4mBZAQxhhR9PzDw&s=-
> O8xzMfTZw5m9whfatE2Ma7_ub-QaoVc1uZWrbWRSKU&e= yet.
> It will be pushed if I get no objections before 02/29/20. So please shout if
> anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00
> 2001
> From: Ankur Dwivedi <adwivedi@marvell.com>
> Date: Fri, 14 Feb 2020 12:08:18 +0530
> Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-
> GCM
>
> [ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
>
> This patch extends creation of inline session to all the algorithms.
> Previously the inline session was enabled only for AES-GCM cipher.
>
> Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> crypto")
>
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
> examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> 1 file changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index
> c75a5a15f5..04827d7e11 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> @@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> ipsec_sa entries[],
> }
>
> if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
> - struct rte_ipsec_session *ips;
> iv_length = 12;
>
> sa_ctx->xf[idx].a.type =
> RTE_CRYPTO_SYM_XFORM_AEAD; @@ -1014,18 +1013,6 @@
> sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
>
> sa->xforms = &sa_ctx->xf[idx].a;
>
> - ips = ipsec_get_primary_session(sa);
> - if (ips->type ==
> -
> RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> - ips->type ==
> -
> RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> - rc = create_inline_session(skt_ctx, sa, ips);
> - if (rc != 0) {
> - RTE_LOG(ERR, IPSEC_ESP,
> - "create_inline_session()
> failed\n");
> - return -EINVAL;
> - }
> - }
> print_one_sa_rule(sa, inbound);
> } else {
> switch (sa->cipher_algo) {
> @@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> ipsec_sa entries[],
>
> print_one_sa_rule(sa, inbound);
> }
> +
> + if (ips->type ==
> + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> + ips->type ==
> + RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> + rc = create_inline_session(skt_ctx, sa, ips);
> + if (rc != 0) {
> + RTE_LOG(ERR, IPSEC_ESP,
> + "create_inline_session() failed\n");
> + return -EINVAL;
> + }
> + }
> }
>
> return 0;
> --
> 2.20.1
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2020-02-27 09:31:55.915137861 +0000
> +++ 0002-examples-ipsec-secgw-extend-inline-session-to-non-AE.patch
> 2020-02-27 09:31:55.631945112 +0000
> @@ -1,26 +1,27 @@
> -From b685f931e1ce33d287e3891d4f19ab07f8d2aa79 Mon Sep 17 00:00:00
> 2001
> +From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00
> 2001
> From: Ankur Dwivedi <adwivedi@marvell.com>
> Date: Fri, 14 Feb 2020 12:08:18 +0530
> Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-
> GCM
>
> +[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> +
> This patch extends creation of inline session to all the algorithms.
> Previously the inline session was enabled only for AES-GCM cipher.
>
> Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> crypto")
> -Cc: stable@dpdk.org
>
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
> - examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
> - 1 file changed, 12 insertions(+), 14 deletions(-)
> + examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> + 1 file changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c -index
> e75b687c46..4822d6bdaa 100644
> +index c75a5a15f5..04827d7e11 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> -@@ -1057,7 +1057,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> ipsec_sa entries[],
> +@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> +ipsec_sa entries[],
> }
>
> if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) { @@ -
> 28,11 +29,10 @@
> iv_length = 12;
>
> sa_ctx->xf[idx].a.type =
> RTE_CRYPTO_SYM_XFORM_AEAD; -@@ -1077,19 +1076,6 @@
> sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
> - sa->digest_len;
> +@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> +ipsec_sa entries[],
>
> sa->xforms = &sa_ctx->xf[idx].a;
> --
> +
> - ips = ipsec_get_primary_session(sa);
> - if (ips->type ==
> -
> RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> @@ -45,13 +45,14 @@
> - return -EINVAL;
> - }
> - }
> + print_one_sa_rule(sa, inbound);
> } else {
> switch (sa->cipher_algo) {
> - case RTE_CRYPTO_CIPHER_NULL:
> -@@ -1156,6 +1142,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> ipsec_sa entries[],
> - sa->xforms = &sa_ctx->xf[idx].a;
> - }
> +@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> +ipsec_sa entries[],
>
> + print_one_sa_rule(sa, inbound);
> + }
> ++
> + if (ips->type ==
> + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> + ips->type ==
> @@ -63,10 +64,9 @@
> + return -EINVAL;
> + }
> + }
> -+
> - print_one_sa_rule(sa, inbound);
> }
>
> + return 0;
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] [EXT] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' has been queued to stable release 19.11.1
2020-02-28 4:24 ` [dpdk-stable] [EXT] " Anoob Joseph
@ 2020-02-28 4:33 ` Akhil Goyal
2020-02-28 5:37 ` Anoob Joseph
0 siblings, 1 reply; 310+ messages in thread
From: Akhil Goyal @ 2020-02-28 4:33 UTC (permalink / raw)
To: Anoob Joseph, luca.boccassi, Ankur Dwivedi; +Cc: dpdk stable
>
> Hi Luca,
>
> The diff between upstream patch and dpdk-stable patch doesn't look right. I
> would say we can defer this change from merge to stable.
>
> @Akhil, what's your take on this?
Why do we need to defer this patch?
I think the only thing is declaration of ips is missing. The compilation will be broken.
Can you send the appropriate patch to stable?
>
> Thanks,
> Anoob
>
> > -----Original Message-----
> > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> > Sent: Thursday, February 27, 2020 3:03 PM
> > To: Ankur Dwivedi <adwivedi@marvell.com>
> > Cc: Anoob Joseph <anoobj@marvell.com>; Akhil Goyal
> > <akhil.goyal@nxp.com>; dpdk stable <stable@dpdk.org>
> > Subject: [EXT] patch 'examples/ipsec-secgw: extend inline session to non
> > AES-GCM' has been queued to stable release 19.11.1
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Hi,
> >
> > FYI, your patch has been queued to stable release 19.11.1
> >
> > Note it hasn't been pushed to
> >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefens
> e.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-
> &data=02%7C01%7Cakhil.goyal%40nxp.com%7C0d2ac7af89ca48357a110
> 8d7bc062ce6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6371846
> 07019183710&sdata=tSi80Em79D5Nvv3YUVa5HlUfyStN5MOf5eCyOs2e2b
> o%3D&reserved=0
> > 3A__dpdk.org_browse_dpdk-
> > 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs
> > 2n6B-WYLn1v9SyTMrT5EQqh2TU&m=uIvPnv-
> > I27twfm1d6XD0AMFwcH8L4mBZAQxhhR9PzDw&s=-
> > O8xzMfTZw5m9whfatE2Ma7_ub-QaoVc1uZWrbWRSKU&e= yet.
> > It will be pushed if I get no objections before 02/29/20. So please shout if
> > anyone has objections.
> >
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for
> > rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> >
> > Thanks.
> >
> > Luca Boccassi
> >
> > ---
> > From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00
> > 2001
> > From: Ankur Dwivedi <adwivedi@marvell.com>
> > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-
> > GCM
> >
> > [ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> >
> > This patch extends creation of inline session to all the algorithms.
> > Previously the inline session was enabled only for AES-GCM cipher.
> >
> > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> > crypto")
> >
> > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > ---
> > examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > 1 file changed, 12 insertions(+), 13 deletions(-)
> >
> > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index
> > c75a5a15f5..04827d7e11 100644
> > --- a/examples/ipsec-secgw/sa.c
> > +++ b/examples/ipsec-secgw/sa.c
> > @@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > ipsec_sa entries[],
> > }
> >
> > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
> > - struct rte_ipsec_session *ips;
> > iv_length = 12;
> >
> > sa_ctx->xf[idx].a.type =
> > RTE_CRYPTO_SYM_XFORM_AEAD; @@ -1014,18 +1013,6 @@
> > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
> >
> > sa->xforms = &sa_ctx->xf[idx].a;
> >
> > - ips = ipsec_get_primary_session(sa);
> > - if (ips->type ==
> > -
> > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > - ips->type ==
> > -
> > RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> > - rc = create_inline_session(skt_ctx, sa, ips);
> > - if (rc != 0) {
> > - RTE_LOG(ERR, IPSEC_ESP,
> > - "create_inline_session()
> > failed\n");
> > - return -EINVAL;
> > - }
> > - }
> > print_one_sa_rule(sa, inbound);
> > } else {
> > switch (sa->cipher_algo) {
> > @@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > ipsec_sa entries[],
> >
> > print_one_sa_rule(sa, inbound);
> > }
> > +
> > + if (ips->type ==
> > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > + ips->type ==
> > + RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> > + rc = create_inline_session(skt_ctx, sa, ips);
> > + if (rc != 0) {
> > + RTE_LOG(ERR, IPSEC_ESP,
> > + "create_inline_session() failed\n");
> > + return -EINVAL;
> > + }
> > + }
> > }
> >
> > return 0;
> > --
> > 2.20.1
> >
> > ---
> > Diff of the applied patch vs upstream commit (please double-check if non-
> > empty:
> > ---
> > --- - 2020-02-27 09:31:55.915137861 +0000
> > +++ 0002-examples-ipsec-secgw-extend-inline-session-to-non-AE.patch
> > 2020-02-27 09:31:55.631945112 +0000
> > @@ -1,26 +1,27 @@
> > -From b685f931e1ce33d287e3891d4f19ab07f8d2aa79 Mon Sep 17 00:00:00
> > 2001
> > +From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00
> > 2001
> > From: Ankur Dwivedi <adwivedi@marvell.com>
> > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > Subject: [PATCH] examples/ipsec-secgw: extend inline session to non AES-
> > GCM
> >
> > +[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> > +
> > This patch extends creation of inline session to all the algorithms.
> > Previously the inline session was enabled only for AES-GCM cipher.
> >
> > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline
> > crypto")
> > -Cc: stable@dpdk.org
> >
> > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > ---
> > - examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
> > - 1 file changed, 12 insertions(+), 14 deletions(-)
> > + examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > + 1 file changed, 12 insertions(+), 13 deletions(-)
> >
> > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c -index
> > e75b687c46..4822d6bdaa 100644
> > +index c75a5a15f5..04827d7e11 100644
> > --- a/examples/ipsec-secgw/sa.c
> > +++ b/examples/ipsec-secgw/sa.c
> > -@@ -1057,7 +1057,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > ipsec_sa entries[],
> > +@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > +ipsec_sa entries[],
> > }
> >
> > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) { @@ -
> > 28,11 +29,10 @@
> > iv_length = 12;
> >
> > sa_ctx->xf[idx].a.type =
> > RTE_CRYPTO_SYM_XFORM_AEAD; -@@ -1077,19 +1076,6 @@
> > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
> > - sa->digest_len;
> > +@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > +ipsec_sa entries[],
> >
> > sa->xforms = &sa_ctx->xf[idx].a;
> > --
> > +
> > - ips = ipsec_get_primary_session(sa);
> > - if (ips->type ==
> > -
> > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > @@ -45,13 +45,14 @@
> > - return -EINVAL;
> > - }
> > - }
> > + print_one_sa_rule(sa, inbound);
> > } else {
> > switch (sa->cipher_algo) {
> > - case RTE_CRYPTO_CIPHER_NULL:
> > -@@ -1156,6 +1142,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > ipsec_sa entries[],
> > - sa->xforms = &sa_ctx->xf[idx].a;
> > - }
> > +@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > +ipsec_sa entries[],
> >
> > + print_one_sa_rule(sa, inbound);
> > + }
> > ++
> > + if (ips->type ==
> > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > + ips->type ==
> > @@ -63,10 +64,9 @@
> > + return -EINVAL;
> > + }
> > + }
> > -+
> > - print_one_sa_rule(sa, inbound);
> > }
> >
> > + return 0;
> > --
> > 2.20.1
> >
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] [EXT] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' has been queued to stable release 19.11.1
2020-02-28 4:33 ` Akhil Goyal
@ 2020-02-28 5:37 ` Anoob Joseph
2020-02-28 11:07 ` Luca Boccassi
0 siblings, 1 reply; 310+ messages in thread
From: Anoob Joseph @ 2020-02-28 5:37 UTC (permalink / raw)
To: Akhil Goyal, luca.boccassi, Ankur Dwivedi; +Cc: dpdk stable
Hi Akhil,
Will send the appropriate patch after verifying build etc.
Thanks,
Anoob
> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: Friday, February 28, 2020 10:03 AM
> To: Anoob Joseph <anoobj@marvell.com>; luca.boccassi@gmail.com; Ankur
> Dwivedi <adwivedi@marvell.com>
> Cc: dpdk stable <stable@dpdk.org>
> Subject: RE: [EXT] patch 'examples/ipsec-secgw: extend inline session to non
> AES-GCM' has been queued to stable release 19.11.1
>
>
>
> >
> > Hi Luca,
> >
> > The diff between upstream patch and dpdk-stable patch doesn't look
> > right. I would say we can defer this change from merge to stable.
> >
> > @Akhil, what's your take on this?
>
> Why do we need to defer this patch?
> I think the only thing is declaration of ips is missing. The compilation will be
> broken.
> Can you send the appropriate patch to stable?
>
> >
> > Thanks,
> > Anoob
> >
> > > -----Original Message-----
> > > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> > > Sent: Thursday, February 27, 2020 3:03 PM
> > > To: Ankur Dwivedi <adwivedi@marvell.com>
> > > Cc: Anoob Joseph <anoobj@marvell.com>; Akhil Goyal
> > > <akhil.goyal@nxp.com>; dpdk stable <stable@dpdk.org>
> > > Subject: [EXT] patch 'examples/ipsec-secgw: extend inline session to
> > > non AES-GCM' has been queued to stable release 19.11.1
> > >
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > --
> > > Hi,
> > >
> > > FYI, your patch has been queued to stable release 19.11.1
> > >
> > > Note it hasn't been pushed to
> > >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__eur01.safelinks.p
> > rotection.outlook.com_-3Furl-3Dhttps-253A-252F-
> 252Furldefens&d=DwIFAg&
> > c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs2n6B-
> WYLn1v9SyTMrT5EQqh2TU
> >
> &m=eOnW_NUoUMFWqoaBTOmC7zVyaSoWZB_hVr6nQKboVm8&s=mu21
> wyPbS7W4bBgKdfTO4
> > xfLokZ_8cS6b8m5O7tOKd0&e=
> > e.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-
> >
> &data=02%7C01%7Cakhil.goyal%40nxp.com%7C0d2ac7af89ca48357a110
> >
> 8d7bc062ce6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6371846
> >
> 07019183710&sdata=tSi80Em79D5Nvv3YUVa5HlUfyStN5MOf5eCyOs2e2
> b
> > o%3D&reserved=0
> > > 3A__dpdk.org_browse_dpdk-
> > >
> 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs
> > > 2n6B-WYLn1v9SyTMrT5EQqh2TU&m=uIvPnv-
> > > I27twfm1d6XD0AMFwcH8L4mBZAQxhhR9PzDw&s=-
> > > O8xzMfTZw5m9whfatE2Ma7_ub-QaoVc1uZWrbWRSKU&e= yet.
> > > It will be pushed if I get no objections before 02/29/20. So please
> > > shout if anyone has objections.
> > >
> > > Also note that after the patch there's a diff of the upstream commit
> > > vs the patch applied to the branch. This will indicate if there was
> > > any rebasing needed to apply to the stable branch. If there were
> > > code changes for rebasing
> > > (ie: not only metadata diffs), please double check that the rebase
> > > was correctly done.
> > >
> > > Thanks.
> > >
> > > Luca Boccassi
> > >
> > > ---
> > > From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17 00:00:00
> > > 2001
> > > From: Ankur Dwivedi <adwivedi@marvell.com>
> > > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > > Subject: [PATCH] examples/ipsec-secgw: extend inline session to non
> > > AES- GCM
> > >
> > > [ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> > >
> > > This patch extends creation of inline session to all the algorithms.
> > > Previously the inline session was enabled only for AES-GCM cipher.
> > >
> > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with
> > > inline
> > > crypto")
> > >
> > > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > > ---
> > > examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > > 1 file changed, 12 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> > > index
> > > c75a5a15f5..04827d7e11 100644
> > > --- a/examples/ipsec-secgw/sa.c
> > > +++ b/examples/ipsec-secgw/sa.c
> > > @@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct
> > > ipsec_sa entries[],
> > > }
> > >
> > > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
> > > - struct rte_ipsec_session *ips;
> > > iv_length = 12;
> > >
> > > sa_ctx->xf[idx].a.type =
> > > RTE_CRYPTO_SYM_XFORM_AEAD; @@ -1014,18 +1013,6 @@
> > > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
> > >
> > > sa->xforms = &sa_ctx->xf[idx].a;
> > >
> > > - ips = ipsec_get_primary_session(sa);
> > > - if (ips->type ==
> > > -
> > > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > > - ips->type ==
> > > -
> > > RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> > > - rc = create_inline_session(skt_ctx, sa, ips);
> > > - if (rc != 0) {
> > > - RTE_LOG(ERR, IPSEC_ESP,
> > > - "create_inline_session()
> > > failed\n");
> > > - return -EINVAL;
> > > - }
> > > - }
> > > print_one_sa_rule(sa, inbound);
> > > } else {
> > > switch (sa->cipher_algo) {
> > > @@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > struct ipsec_sa entries[],
> > >
> > > print_one_sa_rule(sa, inbound);
> > > }
> > > +
> > > + if (ips->type ==
> > > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > > + ips->type ==
> > > + RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> > > + rc = create_inline_session(skt_ctx, sa, ips);
> > > + if (rc != 0) {
> > > + RTE_LOG(ERR, IPSEC_ESP,
> > > + "create_inline_session() failed\n");
> > > + return -EINVAL;
> > > + }
> > > + }
> > > }
> > >
> > > return 0;
> > > --
> > > 2.20.1
> > >
> > > ---
> > > Diff of the applied patch vs upstream commit (please double-check
> > > if non-
> > > empty:
> > > ---
> > > --- - 2020-02-27 09:31:55.915137861 +0000
> > > +++ 0002-examples-ipsec-secgw-extend-inline-session-to-non-AE.patch
> > > 2020-02-27 09:31:55.631945112 +0000 @@ -1,26 +1,27 @@ -From
> > > b685f931e1ce33d287e3891d4f19ab07f8d2aa79 Mon Sep 17 00:00:00
> > > 2001
> > > +From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17
> 00:00:00
> > > 2001
> > > From: Ankur Dwivedi <adwivedi@marvell.com>
> > > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > > Subject: [PATCH] examples/ipsec-secgw: extend inline session to non
> > > AES- GCM
> > >
> > > +[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> > > +
> > > This patch extends creation of inline session to all the algorithms.
> > > Previously the inline session was enabled only for AES-GCM cipher.
> > >
> > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with
> > > inline
> > > crypto")
> > > -Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> > > ---
> > > - examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
> > > - 1 file changed, 12 insertions(+), 14 deletions(-)
> > > + examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > > + 1 file changed, 12 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> > > -index e75b687c46..4822d6bdaa 100644
> > > +index c75a5a15f5..04827d7e11 100644
> > > --- a/examples/ipsec-secgw/sa.c
> > > +++ b/examples/ipsec-secgw/sa.c
> > > -@@ -1057,7 +1057,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > struct ipsec_sa entries[],
> > > +@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > +struct ipsec_sa entries[],
> > > }
> > >
> > > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) { @@ -
> > > 28,11 +29,10 @@
> > > iv_length = 12;
> > >
> > > sa_ctx->xf[idx].a.type =
> > > RTE_CRYPTO_SYM_XFORM_AEAD; -@@ -1077,19 +1076,6 @@
> > > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[],
> > > - sa->digest_len;
> > > +@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > +struct ipsec_sa entries[],
> > >
> > > sa->xforms = &sa_ctx->xf[idx].a;
> > > --
> > > +
> > > - ips = ipsec_get_primary_session(sa);
> > > - if (ips->type ==
> > > -
> > > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL || @@ -45,13
> +45,14 @@
> > > - return -EINVAL;
> > > - }
> > > - }
> > > + print_one_sa_rule(sa, inbound);
> > > } else {
> > > switch (sa->cipher_algo) {
> > > - case RTE_CRYPTO_CIPHER_NULL:
> > > -@@ -1156,6 +1142,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > struct ipsec_sa entries[],
> > > - sa->xforms = &sa_ctx->xf[idx].a;
> > > - }
> > > +@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > +struct ipsec_sa entries[],
> > >
> > > + print_one_sa_rule(sa, inbound);
> > > + }
> > > ++
> > > + if (ips->type ==
> > > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > > + ips->type ==
> > > @@ -63,10 +64,9 @@
> > > + return -EINVAL;
> > > + }
> > > + }
> > > -+
> > > - print_one_sa_rule(sa, inbound);
> > > }
> > >
> > > + return 0;
> > > --
> > > 2.20.1
> > >
^ permalink raw reply [flat|nested] 310+ messages in thread
* Re: [dpdk-stable] [EXT] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' has been queued to stable release 19.11.1
2020-02-28 5:37 ` Anoob Joseph
@ 2020-02-28 11:07 ` Luca Boccassi
0 siblings, 0 replies; 310+ messages in thread
From: Luca Boccassi @ 2020-02-28 11:07 UTC (permalink / raw)
To: Anoob Joseph, Akhil Goyal, Ankur Dwivedi; +Cc: dpdk stable
Thanks for catching that! I thought this example build was enabled by
default, so I didn't spot the missing line.
On Fri, 2020-02-28 at 05:37 +0000, Anoob Joseph wrote:
> Hi Akhil,
>
> Will send the appropriate patch after verifying build etc.
>
> Thanks,
> Anoob
>
> > -----Original Message-----
> > From: Akhil Goyal <
> > akhil.goyal@nxp.com
> > >
> > Sent: Friday, February 28, 2020 10:03 AM
> > To: Anoob Joseph <
> > anoobj@marvell.com
> > >;
> > luca.boccassi@gmail.com
> > ; Ankur
> > Dwivedi <
> > adwivedi@marvell.com
> > >
> > Cc: dpdk stable <
> > stable@dpdk.org
> > >
> > Subject: RE: [EXT] patch 'examples/ipsec-secgw: extend inline
> > session to non
> > AES-GCM' has been queued to stable release 19.11.1
> >
> >
> >
> > > Hi Luca,
> > >
> > > The diff between upstream patch and dpdk-stable patch doesn't
> > > look
> > > right. I would say we can defer this change from merge to stable.
> > >
> > > @Akhil, what's your take on this?
> >
> > Why do we need to defer this patch?
> > I think the only thing is declaration of ips is missing. The
> > compilation will be
> > broken.
> > Can you send the appropriate patch to stable?
> >
> > > Thanks,
> > > Anoob
> > >
> > > > -----Original Message-----
> > > > From:
> > > > luca.boccassi@gmail.com
> > > > <
> > > > luca.boccassi@gmail.com
> > > > >
> > > > Sent: Thursday, February 27, 2020 3:03 PM
> > > > To: Ankur Dwivedi <
> > > > adwivedi@marvell.com
> > > > >
> > > > Cc: Anoob Joseph <
> > > > anoobj@marvell.com
> > > > >; Akhil Goyal
> > > > <
> > > > akhil.goyal@nxp.com
> > > > >; dpdk stable <
> > > > stable@dpdk.org
> > > > >
> > > > Subject: [EXT] patch 'examples/ipsec-secgw: extend inline
> > > > session to
> > > > non AES-GCM' has been queued to stable release 19.11.1
> > > >
> > > > External Email
> > > >
> > > > -------------------------------------------------------------
> > > > -------
> > > > --
> > > > Hi,
> > > >
> > > > FYI, your patch has been queued to stable release 19.11.1
> > > >
> > > > Note it hasn't been pushed to
> > > >
> > >
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__eur01.safelinks.p
> > >
> > > rotection.outlook.com_-3Furl-3Dhttps-253A-252F-
> >
> > 252Furldefens&d=DwIFAg&
> > > c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs2n6B-
> >
> > WYLn1v9SyTMrT5EQqh2TU
> >
> > &m=eOnW_NUoUMFWqoaBTOmC7zVyaSoWZB_hVr6nQKboVm8&s=mu21
> > wyPbS7W4bBgKdfTO4
> > > xfLokZ_8cS6b8m5O7tOKd0&e=
> > > e.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-
> > >
> >
> > &data=02%7C01%7Cakhil.goyal%40nxp.com%7C0d2ac7af89ca48357a110
> >
> > 8d7bc062ce6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6371846
> >
> > 07019183710&sdata=tSi80Em79D5Nvv3YUVa5HlUfyStN5MOf5eCyOs2e2
> > b
> > > o%3D&reserved=0
> > > > 3A__dpdk.org_browse_dpdk-
> > > >
> >
> > 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxyLWs
> > > > 2n6B-WYLn1v9SyTMrT5EQqh2TU&m=uIvPnv-
> > > > I27twfm1d6XD0AMFwcH8L4mBZAQxhhR9PzDw&s=-
> > > > O8xzMfTZw5m9whfatE2Ma7_ub-QaoVc1uZWrbWRSKU&e= yet.
> > > > It will be pushed if I get no objections before 02/29/20. So
> > > > please
> > > > shout if anyone has objections.
> > > >
> > > > Also note that after the patch there's a diff of the upstream
> > > > commit
> > > > vs the patch applied to the branch. This will indicate if there
> > > > was
> > > > any rebasing needed to apply to the stable branch. If there
> > > > were
> > > > code changes for rebasing
> > > > (ie: not only metadata diffs), please double check that the
> > > > rebase
> > > > was correctly done.
> > > >
> > > > Thanks.
> > > >
> > > > Luca Boccassi
> > > >
> > > > ---
> > > > From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17
> > > > 00:00:00
> > > > 2001
> > > > From: Ankur Dwivedi <
> > > > adwivedi@marvell.com
> > > > >
> > > > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > > > Subject: [PATCH] examples/ipsec-secgw: extend inline session to
> > > > non
> > > > AES- GCM
> > > >
> > > > [ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> > > >
> > > > This patch extends creation of inline session to all the
> > > > algorithms.
> > > > Previously the inline session was enabled only for AES-GCM
> > > > cipher.
> > > >
> > > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet
> > > > with
> > > > inline
> > > > crypto")
> > > >
> > > > Signed-off-by: Ankur Dwivedi <
> > > > adwivedi@marvell.com
> > > > >
> > > > Acked-by: Anoob Joseph <
> > > > anoobj@marvell.com
> > > > >
> > > > Acked-by: Akhil Goyal <
> > > > akhil.goyal@nxp.com
> > > > >
> > > > ---
> > > > examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > > > 1 file changed, 12 insertions(+), 13 deletions(-)
> > > >
> > > > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-
> > > > secgw/sa.c
> > > > index
> > > > c75a5a15f5..04827d7e11 100644
> > > > --- a/examples/ipsec-secgw/sa.c
> > > > +++ b/examples/ipsec-secgw/sa.c
> > > > @@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > > struct
> > > > ipsec_sa entries[],
> > > > }
> > > >
> > > > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
> > > > - struct rte_ipsec_session *ips;
> > > > iv_length = 12;
> > > >
> > > > sa_ctx->xf[idx].a.type =
> > > > RTE_CRYPTO_SYM_XFORM_AEAD; @@ -1014,18 +1013,6 @@
> > > > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa
> > > > entries[],
> > > >
> > > > sa->xforms = &sa_ctx->xf[idx].a;
> > > >
> > > > - ips = ipsec_get_primary_session(sa);
> > > > - if (ips->type ==
> > > > -
> > > > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL ||
> > > > - ips->type ==
> > > > -
> > > > RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO) {
> > > > - rc =
> > > > create_inline_session(skt_ctx, sa, ips);
> > > > - if (rc != 0) {
> > > > - RTE_LOG(ERR, IPSEC_ESP,
> > > > - "create_inline_
> > > > session()
> > > > failed\n");
> > > > - return -EINVAL;
> > > > - }
> > > > - }
> > > > print_one_sa_rule(sa, inbound);
> > > > } else {
> > > > switch (sa->cipher_algo) {
> > > > @@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx,
> > > > const
> > > > struct ipsec_sa entries[],
> > > >
> > > > print_one_sa_rule(sa, inbound);
> > > > }
> > > > +
> > > > + if (ips->type ==
> > > > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCO
> > > > L ||
> > > > + ips->type ==
> > > > + RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO)
> > > > {
> > > > + rc = create_inline_session(skt_ctx, sa,
> > > > ips);
> > > > + if (rc != 0) {
> > > > + RTE_LOG(ERR, IPSEC_ESP,
> > > > + "create_inline_session(
> > > > ) failed\n");
> > > > + return -EINVAL;
> > > > + }
> > > > + }
> > > > }
> > > >
> > > > return 0;
> > > > --
> > > > 2.20.1
> > > >
> > > > ---
> > > > Diff of the applied patch vs upstream commit (please double-
> > > > check
> > > > if non-
> > > > empty:
> > > > ---
> > > > --- - 2020-02-27 09:31:55.915137861 +0000
> > > > +++ 0002-examples-ipsec-secgw-extend-inline-session-to-non-
> > > > AE.patch
> > > > 2020-02-27 09:31:55.631945112 +0000 @@ -1,26 +1,27 @@
> > > > -From
> > > > b685f931e1ce33d287e3891d4f19ab07f8d2aa79 Mon Sep 17 00:00:00
> > > > 2001
> > > > +From 42b568622cf6345e311aee821d755963e786a704 Mon Sep 17
> >
> > 00:00:00
> > > > 2001
> > > > From: Ankur Dwivedi <
> > > > adwivedi@marvell.com
> > > > >
> > > > Date: Fri, 14 Feb 2020 12:08:18 +0530
> > > > Subject: [PATCH] examples/ipsec-secgw: extend inline session
> > > > to non
> > > > AES- GCM
> > > >
> > > > +[ upstream commit b685f931e1ce33d287e3891d4f19ab07f8d2aa79 ]
> > > > +
> > > > This patch extends creation of inline session to all the
> > > > algorithms.
> > > > Previously the inline session was enabled only for AES-GCM
> > > > cipher.
> > > >
> > > > Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet
> > > > with
> > > > inline
> > > > crypto")
> > > > -Cc:
> > > > stable@dpdk.org
> > > >
> > > >
> > > > Signed-off-by: Ankur Dwivedi <
> > > > adwivedi@marvell.com
> > > > >
> > > > Acked-by: Anoob Joseph <
> > > > anoobj@marvell.com
> > > > >
> > > > Acked-by: Akhil Goyal <
> > > > akhil.goyal@nxp.com
> > > > >
> > > > ---
> > > > - examples/ipsec-secgw/sa.c | 26 ++++++++++++--------------
> > > > - 1 file changed, 12 insertions(+), 14 deletions(-)
> > > > + examples/ipsec-secgw/sa.c | 25 ++++++++++++-------------
> > > > + 1 file changed, 12 insertions(+), 13 deletions(-)
> > > >
> > > > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-
> > > > secgw/sa.c
> > > > -index e75b687c46..4822d6bdaa 100644
> > > > +index c75a5a15f5..04827d7e11 100644
> > > > --- a/examples/ipsec-secgw/sa.c
> > > > +++ b/examples/ipsec-secgw/sa.c
> > > > -@@ -1057,7 +1057,6 @@ sa_add_rules(struct sa_ctx *sa_ctx,
> > > > const
> > > > struct ipsec_sa entries[],
> > > > +@@ -993,7 +993,6 @@ sa_add_rules(struct sa_ctx *sa_ctx, const
> > > > +struct ipsec_sa entries[],
> > > > }
> > > >
> > > > if (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {
> > > > @@ -
> > > > 28,11 +29,10 @@
> > > > iv_length = 12;
> > > >
> > > > sa_ctx->xf[idx].a.type =
> > > > RTE_CRYPTO_SYM_XFORM_AEAD; -@@ -1077,19 +1076,6 @@
> > > > sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa
> > > > entries[],
> > > > - sa->digest_len;
> > > > +@@ -1014,18 +1013,6 @@ sa_add_rules(struct sa_ctx *sa_ctx,
> > > > const
> > > > +struct ipsec_sa entries[],
> > > >
> > > > sa->xforms = &sa_ctx->xf[idx].a;
> > > > --
> > > > +
> > > > - ips = ipsec_get_primary_session(sa);
> > > > - if (ips->type ==
> > > > -
> > > > RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL || @@ -45,13
> >
> > +45,14 @@
> > > > - return -EINVAL;
> > > > - }
> > > > - }
> > > > + print_one_sa_rule(sa, inbound);
> > > > } else {
> > > > switch (sa->cipher_algo) {
> > > > - case RTE_CRYPTO_CIPHER_NULL:
> > > > -@@ -1156,6 +1142,18 @@ sa_add_rules(struct sa_ctx *sa_ctx,
> > > > const
> > > > struct ipsec_sa entries[],
> > > > - sa->xforms = &sa_ctx->xf[idx].a;
> > > > - }
> > > > +@@ -1094,6 +1081,18 @@ sa_add_rules(struct sa_ctx *sa_ctx,
> > > > const
> > > > +struct ipsec_sa entries[],
> > > >
> > > > + print_one_sa_rule(sa, inbound);
> > > > + }
> > > > ++
> > > > + if (ips->type ==
> > > > + RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCO
> > > > L ||
> > > > + ips->type ==
> > > > @@ -63,10 +64,9 @@
> > > > + return -EINVAL;
> > > > + }
> > > > + }
> > > > -+
> > > > - print_one_sa_rule(sa, inbound);
> > > > }
> > > >
> > > > + return 0;
> > > > --
> > > > 2.20.1
> > > >
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 310+ messages in thread
end of thread, other threads:[~2020-02-28 11:07 UTC | newest]
Thread overview: 310+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 11:19 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to stable release 19.11.1 luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx: fix build with clang 9' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'devtools: fix debug build test' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/common: fix log2 check' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'build: fix libm detection in " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'ci: use meson 0.47.1' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: fix warning with meson' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'doc: reduce indentation " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix event device config' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/l2fwd-event: fix ethdev RSS setup' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix unintended vdev creation' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/event: fix OCTEON TX2 event device name' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'event/octeontx2: fix device name in device info' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'test/crypto: fix missing operation status check' " luca.boccassi
2020-02-11 11:37 ` Dybkowski, AdamX
2020-02-11 11:52 ` Luca Boccassi
2020-02-11 12:10 ` Kevin Traynor
2020-02-12 11:19 ` Dybkowski, AdamX
2020-02-12 11:21 ` Dybkowski, AdamX
2020-02-12 13:43 ` Kevin Traynor
2020-02-11 11:19 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: disable TSO offload in vector path' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: fix RSS offload flag' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/netvsc: disable before changing RSS parameters' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix packet type table' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix meson build' " luca.boccassi
2020-02-11 13:11 ` Xu, Rosen
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix port close in FreeBSD' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix crash when setting hairpin queues' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: clean up redundant assignment' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix multiple flow table hash list' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix request for hot reset support' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix setting of Rx hash fields' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/mlx5: fix item flag on GENEVE item validation' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'ethdev: fix flow API doxygen comment' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ice: fix VSI context' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ipn3ke: fix line side statistics register read' " luca.boccassi
2020-02-11 13:12 ` Xu, Rosen
2020-02-11 11:19 ` [dpdk-stable] patch 'net/iavf: fix virtual channel return' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/i40e: set fixed flag for exact link speed' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " luca.boccassi
2020-02-11 11:19 ` [dpdk-stable] patch 'net/bnxt: fix Tx queue profile selection' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix flow flush to sync with flow destroy' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix non matching flow hitting filter rule' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix reusing L2 filter' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnxt: fix overwriting error message' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix crash when meter action conf is null' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: fix loop limit' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice/base: increase PF reset wait timeout' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/af_xdp: fix redundant check for wakeup need' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/vhost_blk: check unused value on init' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/vhost: check creation failure' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix socket initial value' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix VF configuration' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix getting supported packet types' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix missing link modes' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: fix display of FEC settings' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/i40e/base: add new link speed constants' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: use ethernet copy API to do MAC assignment' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix Tx burst routines set' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'app/testpmd: fix GENEVE flow item' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix Rx queue search with broadcast packet' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix crash when closing port' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix ring vector related mailbox command format' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix dumping VF register information' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix link status on failed query' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/qede/base: fix number of ports per engine' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/bnx2x: support secondary process' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool/octeontx: fix error handling in initialization' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/octeontx2: fix PTP and HIGIG2 coexistence' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/virtio-user: fix packed ring server mode' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix doorbell register offset type' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ice: fix Tx when TSO is enabled' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix shared metadata matcher field setup' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix matcher field usage for metadata entities' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'net/mlx5: fix metadata item endianness conversion' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'eal/linux: fix build when VFIO is disabled' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'raw/ntb: fix write memory barrier' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'doc: fix igb_uio parameter in ntb guide' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'examples/ntb: fix mempool ops setting' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " luca.boccassi
2020-02-11 11:20 ` [dpdk-stable] patch 'mempool: fix slow allocation of large pools' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'mempool: fix populate with small virtual chunks' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/test: remove meson dependency on file in /sys' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: move Tx complete request routine' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: update Tx error handling " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: add free on completion queue' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: engage " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: optimize Rx hash fields conversion' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix meter suffix flow' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix modify actions support limitation' " luca.boccassi
2020-02-11 13:48 ` Bing Zhao
2020-02-11 14:22 ` Luca Boccassi
2020-02-13 9:06 ` Bing Zhao
2020-02-13 9:36 ` Luca Boccassi
2020-02-13 11:23 ` Bing Zhao
2020-02-13 17:45 ` Luca Boccassi
2020-02-14 7:23 ` Bing Zhao
2020-02-11 11:21 ` [dpdk-stable] patch 'eal/windows: fix cpuset macro name' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix meson headers packaging' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'hash: fix lock-free flag doxygen' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'build: remove unneeded function versioning' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'vfio: fix mapping failures in ppc64le' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix probe in FreeBSD' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix IOVA mapping' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix enable/disable VLAN filtering' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix max rings calculation' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director flag' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow FDIR/switch memory leak' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix VLAN strip flags in SSE Rx' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix flow director GTP-U pattern' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: add outer IPv4 matching for GTP-U flow' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix masks of encap and decap actions' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix check for VLAN " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix bit mask to validate push VLAN' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: allow push VLAN without VID' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block push VLAN action on Rx' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: block pop VLAN action on Tx' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix pop VLAN action validation' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VLAN VID " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix build with clang 3.4.2' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix zero out UDP checksum in encap data' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix setting of port ID for egress rules' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite actions' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix RFC addresses for Tx only' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: fix bumping of L2 filter reference count' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: allow group ID 0 for RSS action' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove redundant macro' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary structure variable' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: make FDB default rule optional' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/ice: fix GTP-U rule conflict' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx2: fix Tx flow control for HIGIG' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " luca.boccassi
2020-02-11 11:21 ` [dpdk-stable] patch 'net/mlx5: fix memory regions release deadlock' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'net/mlx5: fix dirty array of actions' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'net/virtio-user: do not reset virtqueues for split ring' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: flush shadow Tx if no more packets' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix IOVA conversions' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " luca.boccassi
2020-02-11 11:22 ` [dpdk-stable] patch 'fib: fix possible integer overflow' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'acl: fix 32-bit match for range field' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ethtool: fix unchecked return value' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix failure check for ioat dequeue' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/ioat: fix invalid link status check' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'examples/power: fix ack for enable/disable turbo' " luca.boccassi
2020-02-17 17:44 ` [dpdk-stable] patch 'kni: fix build with Linux 5.6' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'fix Mellanox copyright and SPDX tag' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'kni: fix not contiguous FIFO' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix a typo' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l3fwd-power: fix interrupt disable' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/fips_validation: fix AES-GCM cipher length parsing' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'lib: fix unnecessary double negation' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/octeontx2: add kmod dependency info' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'crypto/ccp: fix queue alignment' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'test/compress: replace test vector' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'drivers/crypto: fix session-less mode' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary delay in port stop' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix default timeout for getting FW version' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix port stop on error recovery failure' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/bnxt: fix buffer allocation reattempt' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix flow director passthru' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/netvsc: initialize link state' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix legacy multi-packet write session' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ixgbe: remove dead code' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: fix txonly flow generation entropy' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix blocker for push VLAN on Rx' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix VLAN match for DV mode' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx5: fix meter header modify before decap' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix umem frame size and headroom' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix fill queue addresses' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/af_xdp: fix maximum MTU' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: rename meson variable for dlopen option' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: add static ibverbs linkage with meson' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: workaround static " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' " luca.boccassi
2020-02-17 17:50 ` Luca Boccassi
2020-02-17 18:07 ` Thomas Monjalon
2020-02-18 9:15 ` Luca Boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: check message header size read' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: allocate interface name from heap' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: delay driver setup' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/vhost: fix probing in secondary process' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/vhost_blk: fix check of device path' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: fix inflight resubmit check' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'vhost: protect log address translation in IOTLB update' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/testpmd: update Rx offload after setting MTU' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/ice: fix unchecked Tx cleanup error' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'net/octeontx2: fix flow control initial state' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'event/dpaa2: set number of order sequences' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix error checking' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'app/eventdev: fix pipeline test with meson build' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'examples/l2fwd-event: fix core allocation in poll mode' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'test: fix build without ring PMD' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' " luca.boccassi
2020-02-17 17:45 ` [dpdk-stable] patch 'usertools: fix telemetry client with python 3' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'test/ipsec: fix a typo in function name' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: extend inline session to non AES-GCM' " luca.boccassi
2020-02-28 4:24 ` [dpdk-stable] [EXT] " Anoob Joseph
2020-02-28 4:33 ` Akhil Goyal
2020-02-28 5:37 ` Anoob Joseph
2020-02-28 11:07 ` Luca Boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/fips_validation: fix string token for CT length' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix blocking system events' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: fix VF reload' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/qede: do not stop vport if not started' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/octeontx2: fix PTP' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: check for illegal Tx packets' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix tunnel flow priority' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix matching for ICMP fragments' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ixgbe: fix flow control mode setting' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: fix setup error path' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: add module EEPROM dump to mlx5 features' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite action validation' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix flow match on GRE key' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix GENEVE tunnel flow validation' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix hairpin queue capacity' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix L3 VXLAN RSS expansion' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/sfc: fix log format specifiers' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/fm10k: fix non-x86 build' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'ci: fix Travis config warnings' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'examples/tep_term: remove redundant info get' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/ice: fix queue MSI-X interrupt binding' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix crash in port stop while handling events' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/bnxt: fix race condition when port is stopped' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'app/testpmd: fix identifier size for port attach' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID action offset' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer validation with decapsulation' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix layer type in header modify action' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix match on ethertype and CVLAN tag' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer type in header modify action"' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'Revert "net/mlx5: fix layer validation with decapsulation"' " luca.boccassi
2020-02-27 11:06 ` Luca Boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix running without Rx queue' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix metadata split with encap action' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'net/mlx5: fix inline packet size for ConnectX-4 Lx' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix devargs in OCTEON TX2 event device guide' " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix quiescent state description in RCU " luca.boccassi
2020-02-27 9:33 ` [dpdk-stable] patch 'doc: fix multi-producer enqueue figure in ring " luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix naming of Mellanox devices' " luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'doc: fix typos in 19.11 release notes' " luca.boccassi
2020-02-27 9:34 ` [dpdk-stable] patch 'devtools: add fixes flag to commit listing' " luca.boccassi
2020-02-27 10:26 ` Kevin Traynor
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).