patches for DPDK stable branches
 help / color / Atom feed
* [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(&param, false, false, false, func_id);
+		ret = hns3_cmd_set_promisc_mode(hw, &param);
+		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, &regs_num_32_bit, &regs_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, &regs_num_32_bit, &regs_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, &regs_num_32_bit, &regs_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(&param, 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(&param, 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, &param);
-- 
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 ("n