patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7
@ 2020-02-07 15:12 Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " Kevin Traynor
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5febee7b601ecb874a06f2460afc7725264ce967

Thanks.

Kevin.

---
From 5febee7b601ecb874a06f2460afc7725264ce967 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/linuxapp/eal/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 102a9549ea..c2517a9a0a 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -965,5 +965,5 @@ 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 */
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.613151567 +0000
+++ 0001-eal-linux-fix-uninitialized-data-valgrind-warning.patch	2020-02-07 15:08:17.488063295 +0000
@@ -1 +1 @@
-From e0ab8020ac2a5b379bb91fbe882ac3b08d333586 Mon Sep 17 00:00:00 2001
+From 5febee7b601ecb874a06f2460afc7725264ce967 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e0ab8020ac2a5b379bb91fbe882ac3b08d333586 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
+ lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
@@ -20,5 +21,5 @@
-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
-@@ -1046,5 +1046,5 @@ static __attribute__((noreturn)) void *
+diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+index 102a9549ea..c2517a9a0a 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
++++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+@@ -965,5 +965,5 @@ static __attribute__((noreturn)) void *


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " Kevin Traynor
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5519591f1f7fa31c5d4644865ac3675f79f99eb3

Thanks.

Kevin.

---
From 5519591f1f7fa31c5d4644865ac3675f79f99eb3 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/linuxapp/eal/eal_interrupts.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index c2517a9a0a..0ba3e93f4c 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -965,6 +965,4 @@ static __attribute__((noreturn)) void *
 eal_intr_thread_main(__rte_unused void *arg)
 {
-	struct epoll_event ev = { };
-
 	/* host thread, never break out */
 	for (;;) {
@@ -998,6 +996,9 @@ eal_intr_thread_main(__rte_unused void *arg)
 
 		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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.665511439 +0000
+++ 0002-eal-linux-fix-build-error-on-RHEL-7.6.patch	2020-02-07 15:08:17.490063268 +0000
@@ -1 +1 @@
-From aef1d0733179afb56916e95058a4f1398b81af04 Mon Sep 17 00:00:00 2001
+From 5519591f1f7fa31c5d4644865ac3675f79f99eb3 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit aef1d0733179afb56916e95058a4f1398b81af04 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
- lib/librte_eal/linux/eal/eal_interrupts.c | 5 +++--
+ lib/librte_eal/linuxapp/eal/eal_interrupts.c | 5 +++--
@@ -38,5 +39,5 @@
-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
-@@ -1046,6 +1046,4 @@ static __attribute__((noreturn)) void *
+diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+index c2517a9a0a..0ba3e93f4c 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
++++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+@@ -965,6 +965,4 @@ static __attribute__((noreturn)) void *
@@ -49 +50 @@
-@@ -1079,6 +1077,9 @@ eal_intr_thread_main(__rte_unused void *arg)
+@@ -998,6 +996,9 @@ eal_intr_thread_main(__rte_unused void *arg)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'doc: fix build with python 3.8' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " Kevin Traynor
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6a8af8ff1ca031077828582d9bbf314ab3063f4f

Thanks.

Kevin.

---
From 6a8af8ff1ca031077828582d9bbf314ab3063f4f 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 94b97dc351..2ebbf50c60 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -242,5 +242,5 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl
                 continue
 
-            if value is not '':
+            if value:
                 # Get the first letter only.
                 ini_data[ini_filename][name] = value[0]
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.714409068 +0000
+++ 0003-doc-fix-build-with-python-3.8.patch	2020-02-07 15:08:17.491063255 +0000
@@ -1 +1 @@
-From 878f99d1142d861ad9e301a461ed7a05b32b7900 Mon Sep 17 00:00:00 2001
+From 6a8af8ff1ca031077828582d9bbf314ab3063f4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 878f99d1142d861ad9e301a461ed7a05b32b7900 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index e2b52e2df9..0892c06dec 100644
+index 94b97dc351..2ebbf50c60 100644
@@ -31 +32 @@
-@@ -238,5 +238,5 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl
+@@ -242,5 +242,5 @@ def generate_overview_table(output_filename, table_id, section, table_name, titl


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'build: explicitly enable sse4 for meson' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " Kevin Traynor
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/cd487d1409e2ef4a7181327ab042f48c46039101

Thanks.

Kevin.

---
From cd487d1409e2ef4a7181327ab042f48c46039101 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 50a9edc411..c2be66811f 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -16,9 +16,7 @@ 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
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.763874922 +0000
+++ 0004-build-explicitly-enable-sse4-for-meson.patch	2020-02-07 15:08:17.491063255 +0000
@@ -1 +1 @@
-From 10060dba6455461088d24e03d3cfeba639d53022 Mon Sep 17 00:00:00 2001
+From cd487d1409e2ef4a7181327ab042f48c46039101 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10060dba6455461088d24e03d3cfeba639d53022 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +21 @@
-index 8b0fa3e6f1..adc857ba28 100644
+index 50a9edc411..c2be66811f 100644


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'kni: fix meson warning about console keyword' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (2 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix warning with meson' " Kevin Traynor
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/3568c63ceb23e1d86d5a3180affd91eee6a4bd55

Thanks.

Kevin.

---
From 3568c63ceb23e1d86d5a3180affd91eee6a4bd55 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 e6822f49c6..bd2b0b0f3a 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -29,5 +29,4 @@ custom_target('rte_kni',
 		'modules'],
 	depends: kni_mkfile,
-	console: true,
 	install: true,
 	install_dir: kernel_dir + '/extra/dpdk',
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.812358364 +0000
+++ 0005-kni-fix-meson-warning-about-console-keyword.patch	2020-02-07 15:08:17.491063255 +0000
@@ -1 +1 @@
-From 4a4ccf8a22ac39cc91f211edae0917de88d0160c Mon Sep 17 00:00:00 2001
+From 3568c63ceb23e1d86d5a3180affd91eee6a4bd55 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a4ccf8a22ac39cc91f211edae0917de88d0160c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 955eec9496..f93e97fa09 100644
+index e6822f49c6..bd2b0b0f3a 100644
@@ -24 +25 @@
-@@ -24,5 +24,4 @@ custom_target('rte_kni',
+@@ -29,5 +29,4 @@ custom_target('rte_kni',


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'doc: fix warning with meson' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (3 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " Kevin Traynor
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/21d2e1a6041fa95e6fe399a7701032066c09a600

Thanks.

Kevin.

---
From 21d2e1a6041fa95e6fe399a7701032066c09a600 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
@@ -39,6 +39,5 @@ 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',
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.861787053 +0000
+++ 0006-doc-fix-warning-with-meson.patch	2020-02-07 15:08:17.492063242 +0000
@@ -1 +1 @@
-From b1e1bd379afb89495b7d72a4edad89292c21d17a Mon Sep 17 00:00:00 2001
+From 21d2e1a6041fa95e6fe399a7701032066c09a600 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1e1bd379afb89495b7d72a4edad89292c21d17a ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'doc: reduce whitespace in meson build file' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (4 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix warning with meson' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce indentation " Kevin Traynor
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/42c459bc25ab65d7cf6f7d775ac20df84a33c5bc

Thanks.

Kevin.

---
From 42c459bc25ab65d7cf6f7d775ac20df84a33c5bc 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
@@ -4,25 +4,27 @@
 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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.908106220 +0000
+++ 0007-doc-reduce-whitespace-in-meson-build-file.patch	2020-02-07 15:08:17.492063242 +0000
@@ -1 +1 @@
-From affc17c821e37e53d786a1d0b7c179f533684ac1 Mon Sep 17 00:00:00 2001
+From 42c459bc25ab65d7cf6f7d775ac20df84a33c5bc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit affc17c821e37e53d786a1d0b7c179f533684ac1 ]
+
@@ -8,2 +9,0 @@
-
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'doc: reduce indentation in meson build file' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (5 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " Kevin Traynor
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/a4b2868c21da1cfd5b70d287452eab4330689da3

Thanks.

Kevin.

---
From a4b2868c21da1cfd5b70d287452eab4330689da3 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
@@ -4,51 +4,53 @@
 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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:17.957769547 +0000
+++ 0008-doc-reduce-indentation-in-meson-build-file.patch	2020-02-07 15:08:17.492063242 +0000
@@ -1 +1 @@
-From bbfc94efcafab236339cd1ec73bb523275d52c60 Mon Sep 17 00:00:00 2001
+From a4b2868c21da1cfd5b70d287452eab4330689da3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbfc94efcafab236339cd1ec73bb523275d52c60 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (6 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce indentation " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " Kevin Traynor
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2bc50a1089a7c6085f8acc47d7d1c5a78b76fb62

Thanks.

Kevin.

---
From 2bc50a1089a7c6085f8acc47d7d1c5a78b76fb62 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
@@ -1048,4 +1048,5 @@ 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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.005769784 +0000
+++ 0009-event-dsw-flush-buffers-immediately-on-zero-sized-en.patch	2020-02-07 15:08:17.494063215 +0000
@@ -1 +1 @@
-From 5747c83257306ad8e546e456fcfe8e89dac48bf9 Mon Sep 17 00:00:00 2001
+From 2bc50a1089a7c6085f8acc47d7d1c5a78b76fb62 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 5747c83257306ad8e546e456fcfe8e89dac48bf9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (7 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " Kevin Traynor
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/1caa6035fa2a96f7de79d24d15b07b6f598d1697

Thanks.

Kevin.

---
From 1caa6035fa2a96f7de79d24d15b07b6f598d1697 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
@@ -1019,10 +1019,10 @@ 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;
@@ -1048,11 +1048,8 @@ 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);
 
@@ -1110,6 +1107,11 @@ 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);
 }
 
@@ -1118,6 +1120,12 @@ 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);
 }
 
@@ -1126,6 +1134,12 @@ 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);
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.054801011 +0000
+++ 0010-event-dsw-avoid-credit-leak-on-oversized-enqueue-bur.patch	2020-02-07 15:08:17.495063202 +0000
@@ -1 +1 @@
-From 0c4155c7b5b51a60f676c1d7279bfcd1b14acd38 Mon Sep 17 00:00:00 2001
+From 1caa6035fa2a96f7de79d24d15b07b6f598d1697 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0c4155c7b5b51a60f676c1d7279bfcd1b14acd38 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (8 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " Kevin Traynor
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Phil Yang, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c6f92f38969a664ffd4ce174db38a32949929ded

Thanks.

Kevin.

---
From c6f92f38969a664ffd4ce174db38a32949929ded 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
@@ -33,9 +33,8 @@ struct fsl_mc_io {
 #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))
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.103461043 +0000
+++ 0011-bus-fslmc-remove-conflicting-memory-barrier-macro.patch	2020-02-07 15:08:17.495063202 +0000
@@ -1 +1 @@
-From 24ffb8c58963c86be5a53ce61896934a96a83234 Mon Sep 17 00:00:00 2001
+From c6f92f38969a664ffd4ce174db38a32949929ded Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24ffb8c58963c86be5a53ce61896934a96a83234 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (9 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " Kevin Traynor
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Savinay Dharmappa; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f8d86d7b427dc21da922d33428c008bcdc638050

Thanks.

Kevin.

---
From f8d86d7b427dc21da922d33428c008bcdc638050 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 30d1fb22d1..b303cb169b 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -307,4 +307,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				"input \"%s\"", tokens[ti]);
 
+			if (status->status < 0)
+				return;
+
 			rule->cipher_algo = algo->algo;
 			rule->block_size = algo->block_size;
@@ -371,4 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				"input \"%s\"", tokens[ti]);
 
+			if (status->status < 0)
+				return;
+
 			rule->auth_algo = algo->algo;
 			rule->auth_key_len = algo->key_len;
@@ -426,4 +432,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 				"input \"%s\"", tokens[ti]);
 
+			if (status->status < 0)
+				return;
+
 			rule->aead_algo = algo->algo;
 			rule->cipher_key_len = algo->key_len;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.153584384 +0000
+++ 0012-examples-ipsec-secgw-fix-crash-on-unsupported-algo.patch	2020-02-07 15:08:17.496063189 +0000
@@ -1 +1 @@
-From 71d9e6fb2a0d8709e97384b30d81b3bff35da16f Mon Sep 17 00:00:00 2001
+From f8d86d7b427dc21da922d33428c008bcdc638050 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 71d9e6fb2a0d8709e97384b30d81b3bff35da16f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7f046e3ed7..c75a5a15f5 100644
+index 30d1fb22d1..b303cb169b 100644
@@ -23 +24 @@
-@@ -315,4 +315,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -307,4 +307,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -31 +32 @@
-@@ -379,4 +382,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -371,4 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -39 +40 @@
-@@ -434,4 +440,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -426,4 +432,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (10 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " Kevin Traynor
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Ciara Power; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b89ae651fb3122b2fef06fde2771902b2638cdbc

Thanks.

Kevin.

---
From b89ae651fb3122b2fef06fde2771902b2638cdbc 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 6798f76974..6e9a2042c2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3490,4 +3490,12 @@ mcast_addr_pool_extend(struct rte_port *port)
 }
 
+static void
+mcast_addr_pool_append(struct rte_port *port, struct ether_addr *mc_addr)
+{
+	if (mcast_addr_pool_extend(port) != 0)
+		return;
+	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)
@@ -3508,5 +3516,5 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
 }
 
-static void
+static int
 eth_port_multicast_addr_list_set(portid_t port_id)
 {
@@ -3517,8 +3525,9 @@ eth_port_multicast_addr_list_set(portid_t 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;
 }
 
@@ -3545,8 +3554,8 @@ mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr)
 	}
 
-	if (mcast_addr_pool_extend(port) != 0)
-		return;
-	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);
 }
 
@@ -3575,5 +3584,7 @@ mcast_addr_remove(portid_t port_id, struct 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);
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.203164255 +0000
+++ 0013-app-testpmd-fix-device-mcast-list-error-handling.patch	2020-02-07 15:08:17.501063122 +0000
@@ -1 +1 @@
-From c11562a1215aaff6651f9c59ef91ad0a53292571 Mon Sep 17 00:00:00 2001
+From b89ae651fb3122b2fef06fde2771902b2638cdbc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c11562a1215aaff6651f9c59ef91ad0a53292571 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 4e1c3cab59..9da1ffb034 100644
+index 6798f76974..6e9a2042c2 100644
@@ -26 +27 @@
-@@ -3708,4 +3708,12 @@ mcast_addr_pool_extend(struct rte_port *port)
+@@ -3490,4 +3490,12 @@ mcast_addr_pool_extend(struct rte_port *port)
@@ -30 +31 @@
-+mcast_addr_pool_append(struct rte_port *port, struct rte_ether_addr *mc_addr)
++mcast_addr_pool_append(struct rte_port *port, struct ether_addr *mc_addr)
@@ -34 +35 @@
-+	rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[port->mc_addr_nb - 1]);
++	ether_addr_copy(mc_addr, &port->mc_addr_pool[port->mc_addr_nb - 1]);
@@ -39 +40 @@
-@@ -3726,5 +3734,5 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
+@@ -3508,5 +3516,5 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
@@ -46 +47 @@
-@@ -3735,8 +3743,9 @@ eth_port_multicast_addr_list_set(portid_t port_id)
+@@ -3517,8 +3525,9 @@ eth_port_multicast_addr_list_set(portid_t port_id)
@@ -60 +61 @@
-@@ -3763,8 +3772,8 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
+@@ -3545,8 +3554,8 @@ mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr)
@@ -65 +66 @@
--	rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
+-	ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
@@ -73 +74 @@
-@@ -3793,5 +3802,7 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)
+@@ -3575,5 +3584,7 @@ mcast_addr_remove(portid_t port_id, struct ether_addr *mc_addr)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (11 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " Kevin Traynor
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Lu Qiuwen; +Cc: Xiao Wang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/4165ec90d635d041a9beaaa12954285a4011838f

Thanks.

Kevin.

---
From 4165ec90d635d041a9beaaa12954285a4011838f 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 cd5231c9fb..ec201f0665 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -585,4 +585,6 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
 	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;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.256107568 +0000
+++ 0014-net-fm10k-fix-descriptor-VLAN-field-filling-in-Tx.patch	2020-02-07 15:08:17.502063109 +0000
@@ -1 +1 @@
-From 6aab203435040461f585fe9423e3dbdc0729c9fc Mon Sep 17 00:00:00 2001
+From 4165ec90d635d041a9beaaa12954285a4011838f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6aab203435040461f585fe9423e3dbdc0729c9fc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5c31121839..4accaa2cd6 100644
+index cd5231c9fb..ec201f0665 100644
@@ -24 +25 @@
-@@ -612,4 +612,6 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)
+@@ -585,4 +585,6 @@ static inline void tx_xmit_pkt(struct fm10k_tx_queue *q, struct rte_mbuf *mb)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix Rx total stats' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (12 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " Kevin Traynor
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Jiaqi Min; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bd421261d446f11a290da3b2fb9ea18939312d93

Thanks.

Kevin.

---
From bd421261d446f11a290da3b2fb9ea18939312d93 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/avf/avf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 9739dc9bb6..e67621e4a9 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -988,5 +988,5 @@ avf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	if (ret == 0) {
 		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;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.304263338 +0000
+++ 0015-net-iavf-fix-Rx-total-stats.patch	2020-02-07 15:08:17.504063082 +0000
@@ -1 +1 @@
-From e71ffcc1008eeb67d585174dfb10066e9e3df2f7 Mon Sep 17 00:00:00 2001
+From bd421261d446f11a290da3b2fb9ea18939312d93 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e71ffcc1008eeb67d585174dfb10066e9e3df2f7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/iavf/iavf_ethdev.c | 2 +-
+ drivers/net/avf/avf_ethdev.c | 2 +-
@@ -18,6 +19,6 @@
-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
-@@ -1069,5 +1069,5 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
- 		iavf_update_stats(vsi, pstats);
+diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
+index 9739dc9bb6..e67621e4a9 100644
+--- a/drivers/net/avf/avf_ethdev.c
++++ b/drivers/net/avf/avf_ethdev.c
+@@ -988,5 +988,5 @@ avf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+ 	if (ret == 0) {


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (13 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Tao Zhu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/725e38ff2da00ed65ef8823f76cc8fcd03c24ff4

Thanks.

Kevin.

---
From 725e38ff2da00ed65ef8823f76cc8fcd03c24ff4 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/avf/avf_rxtx.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
index ffc835d448..32fa7cf6e0 100644
--- a/drivers/net/avf/avf_rxtx.h
+++ b/drivers/net/avf/avf_rxtx.h
@@ -28,4 +28,5 @@
 		DEV_TX_OFFLOAD_SCTP_CKSUM |		 \
 		DEV_TX_OFFLOAD_UDP_CKSUM |		 \
+		DEV_TX_OFFLOAD_TCP_TSO |		 \
 		DEV_TX_OFFLOAD_TCP_CKSUM)
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.355342444 +0000
+++ 0016-net-iavf-add-TSO-offload-use-basic-path.patch	2020-02-07 15:08:17.505063069 +0000
@@ -1 +1 @@
-From b1b73eaee2f184799a02dbff4c48a6a04c19cf5b Mon Sep 17 00:00:00 2001
+From 725e38ff2da00ed65ef8823f76cc8fcd03c24ff4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1b73eaee2f184799a02dbff4c48a6a04c19cf5b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/net/iavf/iavf_rxtx.h | 1 +
+ drivers/net/avf/avf_rxtx.h | 1 +
@@ -18,5 +19,5 @@
-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
-@@ -29,4 +29,5 @@
+diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
+index ffc835d448..32fa7cf6e0 100644
+--- a/drivers/net/avf/avf_rxtx.h
++++ b/drivers/net/avf/avf_rxtx.h
+@@ -28,4 +28,5 @@


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix link status' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (14 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " Kevin Traynor
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Lunyuan Cui; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/03b69d3c415f084b14833ed911ac9aa2e470b409

Thanks.

Kevin.

---
From 03b69d3c415f084b14833ed911ac9aa2e470b409 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 25460b0724..2092051940 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4120,7 +4120,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	}
 
-	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) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.403179994 +0000
+++ 0017-net-ixgbe-fix-link-status.patch	2020-02-07 15:08:17.515062936 +0000
@@ -1 +1 @@
-From ff8162cb9571528c006f265a32730a463fd0b886 Mon Sep 17 00:00:00 2001
+From 03b69d3c415f084b14833ed911ac9aa2e470b409 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff8162cb9571528c006f265a32730a463fd0b886 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2c6fd0f131..a3f550c534 100644
+index 25460b0724..2092051940 100644
@@ -22 +23 @@
-@@ -4156,7 +4156,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4120,7 +4120,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (15 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " Kevin Traynor
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Lunyuan Cui; +Cc: Xiaolong Ye, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7224d8b173a814aedfa59fa4fcd17479c7de739f

Thanks.

Kevin.

---
From 7224d8b173a814aedfa59fa4fcd17479c7de739f 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 2092051940..fc7fc68120 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -375,4 +375,5 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 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);
 
 /*
@@ -2832,4 +2833,9 @@ skip_link_setup:
 			    "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
@@ -4079,4 +4085,34 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
 }
 
+/*
+ * 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
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.460363007 +0000
+++ 0018-net-ixgbe-fix-link-up-in-FreeBSD.patch	2020-02-07 15:08:17.526062790 +0000
@@ -1 +1 @@
-From ba7b12dd64e4e08f52ce9dd62f7c52f6fc455e10 Mon Sep 17 00:00:00 2001
+From 7224d8b173a814aedfa59fa4fcd17479c7de739f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ba7b12dd64e4e08f52ce9dd62f7c52f6fc455e10 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a3f550c534..fba8c51595 100644
+index 2092051940..fc7fc68120 100644
@@ -26 +27 @@
-@@ -379,4 +379,5 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
+@@ -375,4 +375,5 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
@@ -32 +33 @@
-@@ -2802,4 +2803,9 @@ skip_link_setup:
+@@ -2832,4 +2833,9 @@ skip_link_setup:
@@ -42 +43 @@
-@@ -4115,4 +4121,34 @@ ixgbe_dev_setup_link_alarm_handler(void *param)
+@@ -4079,4 +4085,34 @@ ixgbe_dev_setup_link_alarm_handler(void *param)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (16 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " Kevin Traynor
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 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 LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ee7c6ac8635d308d3d2b719742fae2bfba3fde26

Thanks.

Kevin.

---
From ee7c6ac8635d308d3d2b719742fae2bfba3fde26 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/avf/base/avf_adminq.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/avf/base/avf_adminq.c b/drivers/net/avf/base/avf_adminq.c
index 616e2a9cce..71f18b3477 100644
--- a/drivers/net/avf/base/avf_adminq.c
+++ b/drivers/net/avf/base/avf_adminq.c
@@ -114,4 +114,5 @@ enum avf_status_code avf_alloc_adminq_arq_ring(struct avf_hw *hw)
 void avf_free_adminq_asq(struct avf_hw *hw)
 {
+	avf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
 	avf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
 }
@@ -397,5 +398,5 @@ enum avf_status_code avf_init_asq(struct avf_hw *hw)
 	ret_code = avf_config_asq_regs(hw);
 	if (ret_code != AVF_SUCCESS)
-		goto init_adminq_free_rings;
+		goto init_config_regs;
 
 	/* success! */
@@ -405,4 +406,8 @@ enum avf_status_code avf_init_asq(struct avf_hw *hw)
 init_adminq_free_rings:
 	avf_free_adminq_asq(hw);
+	return ret_code;
+
+init_config_regs:
+	avf_free_asq_bufs(hw);
 
 init_adminq_exit:
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.518657985 +0000
+++ 0019-net-iavf-base-fix-command-buffer-memory-leak.patch	2020-02-07 15:08:17.527062777 +0000
@@ -1 +1 @@
-From 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 Mon Sep 17 00:00:00 2001
+From ee7c6ac8635d308d3d2b719742fae2bfba3fde26 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87aca6d8d8a452ce0d3534dd80bab28ff8e66b58 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/net/iavf/base/iavf_adminq.c | 7 ++++++-
+ drivers/net/avf/base/avf_adminq.c | 7 ++++++-
@@ -20,6 +21,6 @@
-diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
-index ef352ac4c4..298e77277e 100644
---- a/drivers/net/iavf/base/iavf_adminq.c
-+++ b/drivers/net/iavf/base/iavf_adminq.c
-@@ -83,4 +83,5 @@ enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
- void iavf_free_adminq_asq(struct iavf_hw *hw)
+diff --git a/drivers/net/avf/base/avf_adminq.c b/drivers/net/avf/base/avf_adminq.c
+index 616e2a9cce..71f18b3477 100644
+--- a/drivers/net/avf/base/avf_adminq.c
++++ b/drivers/net/avf/base/avf_adminq.c
+@@ -114,4 +114,5 @@ enum avf_status_code avf_alloc_adminq_arq_ring(struct avf_hw *hw)
+ void avf_free_adminq_asq(struct avf_hw *hw)
@@ -27,2 +28,2 @@
-+	iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
- 	iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
++	avf_free_virt_mem(hw, &hw->aq.asq.cmd_buf);
+ 	avf_free_dma_mem(hw, &hw->aq.asq.desc_buf);
@@ -30,3 +31,3 @@
-@@ -354,5 +355,5 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
- 	ret_code = iavf_config_asq_regs(hw);
- 	if (ret_code != IAVF_SUCCESS)
+@@ -397,5 +398,5 @@ enum avf_status_code avf_init_asq(struct avf_hw *hw)
+ 	ret_code = avf_config_asq_regs(hw);
+ 	if (ret_code != AVF_SUCCESS)
@@ -37 +38 @@
-@@ -362,4 +363,8 @@ enum iavf_status iavf_init_asq(struct iavf_hw *hw)
+@@ -405,4 +406,8 @@ enum avf_status_code avf_init_asq(struct avf_hw *hw)
@@ -39 +40 @@
- 	iavf_free_adminq_asq(hw);
+ 	avf_free_adminq_asq(hw);
@@ -43 +44 @@
-+	iavf_free_asq_bufs(hw);
++	avf_free_asq_bufs(hw);


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/iavf/base: fix adminq return' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (17 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix virtual channel " Kevin Traynor
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/cf69b94980b721dbbc3ccc828584a322a23adcc5

Thanks.

Kevin.

---
From cf69b94980b721dbbc3ccc828584a322a23adcc5 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/avf/base/avf_adminq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/avf/base/avf_adminq.c b/drivers/net/avf/base/avf_adminq.c
index 71f18b3477..2dc98797f7 100644
--- a/drivers/net/avf/base/avf_adminq.c
+++ b/drivers/net/avf/base/avf_adminq.c
@@ -852,4 +852,6 @@ enum avf_status_code avf_asq_send_command(struct avf_hw *hw,
 		if ((enum avf_admin_queue_err)retval == AVF_AQ_RC_OK)
 			status = AVF_SUCCESS;
+		else if ((enum avf_admin_queue_err)retval == AVF_AQ_RC_EBUSY)
+			status = AVF_ERR_NOT_READY;
 		else
 			status = AVF_ERR_ADMIN_QUEUE_ERROR;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.567052647 +0000
+++ 0020-net-iavf-base-fix-adminq-return.patch	2020-02-07 15:08:17.528062764 +0000
@@ -1 +1 @@
-From 013d5e879fe357176e0ade1cb6561917a7d46864 Mon Sep 17 00:00:00 2001
+From cf69b94980b721dbbc3ccc828584a322a23adcc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 013d5e879fe357176e0ade1cb6561917a7d46864 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- drivers/net/iavf/base/iavf_adminq.c | 2 ++
+ drivers/net/avf/base/avf_adminq.c | 2 ++
@@ -19,9 +20,9 @@
-diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
-index 0a5b2b281b..c1668d2287 100644
---- a/drivers/net/iavf/base/iavf_adminq.c
-+++ b/drivers/net/iavf/base/iavf_adminq.c
-@@ -804,4 +804,6 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
- 		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;
+diff --git a/drivers/net/avf/base/avf_adminq.c b/drivers/net/avf/base/avf_adminq.c
+index 71f18b3477..2dc98797f7 100644
+--- a/drivers/net/avf/base/avf_adminq.c
++++ b/drivers/net/avf/base/avf_adminq.c
+@@ -852,4 +852,6 @@ enum avf_status_code avf_asq_send_command(struct avf_hw *hw,
+ 		if ((enum avf_admin_queue_err)retval == AVF_AQ_RC_OK)
+ 			status = AVF_SUCCESS;
++		else if ((enum avf_admin_queue_err)retval == AVF_AQ_RC_EBUSY)
++			status = AVF_ERR_NOT_READY;
@@ -29 +30 @@
- 			status = IAVF_ERR_ADMIN_QUEUE_ERROR;
+ 			status = AVF_ERR_ADMIN_QUEUE_ERROR;


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix virtual channel return' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (18 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " Kevin Traynor
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Yahui Cao; +Cc: Qi Zhang, Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/74937a80186a5f227181b303db51d4099124e53b

Thanks.

Kevin.

---
From 74937a80186a5f227181b303db51d4099124e53b 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/avf/avf.h       | 11 +++++++++++
 drivers/net/avf/avf_vchnl.c |  9 +++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/net/avf/avf.h b/drivers/net/avf/avf.h
index dcf8d1c727..bef66a258c 100644
--- a/drivers/net/avf/avf.h
+++ b/drivers/net/avf/avf.h
@@ -168,4 +168,15 @@ struct avf_cmd_info {
 };
 
+/* notify current command done. Only call in case execute
+ * _atomic_set_cmd successfully.
+ */
+static inline void
+_notify_cmd(struct avf_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/avf/avf_vchnl.c b/drivers/net/avf/avf_vchnl.c
index fd90cc2c34..276b406f91 100644
--- a/drivers/net/avf/avf_vchnl.c
+++ b/drivers/net/avf/avf_vchnl.c
@@ -211,10 +211,7 @@ avf_handle_virtchnl_msg(struct rte_eth_dev *dev)
 			} 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",
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.619862819 +0000
+++ 0021-net-iavf-fix-virtual-channel-return.patch	2020-02-07 15:08:17.530062737 +0000
@@ -1 +1 @@
-From be5466e4e9cc547f7792f04bee1f1d593d8072b8 Mon Sep 17 00:00:00 2001
+From 74937a80186a5f227181b303db51d4099124e53b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be5466e4e9cc547f7792f04bee1f1d593d8072b8 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -39,2 +40,2 @@
- drivers/net/iavf/iavf.h       | 11 +++++++++++
- drivers/net/iavf/iavf_vchnl.c |  9 +++------
+ drivers/net/avf/avf.h       | 11 +++++++++++
+ drivers/net/avf/avf_vchnl.c |  9 +++------
@@ -43,5 +44,5 @@
-diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
-index 77b7068939..9466808917 100644
---- a/drivers/net/iavf/iavf.h
-+++ b/drivers/net/iavf/iavf.h
-@@ -175,4 +175,15 @@ struct iavf_cmd_info {
+diff --git a/drivers/net/avf/avf.h b/drivers/net/avf/avf.h
+index dcf8d1c727..bef66a258c 100644
+--- a/drivers/net/avf/avf.h
++++ b/drivers/net/avf/avf.h
+@@ -168,4 +168,15 @@ struct avf_cmd_info {
@@ -54 +55 @@
-+_notify_cmd(struct iavf_info *vf, uint32_t msg_ret)
++_notify_cmd(struct avf_info *vf, uint32_t msg_ret)
@@ -63,5 +64,5 @@
-diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index bf87ab6115..303b515386 100644
---- a/drivers/net/iavf/iavf_vchnl.c
-+++ b/drivers/net/iavf/iavf_vchnl.c
-@@ -211,10 +211,7 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
+diff --git a/drivers/net/avf/avf_vchnl.c b/drivers/net/avf/avf_vchnl.c
+index fd90cc2c34..276b406f91 100644
+--- a/drivers/net/avf/avf_vchnl.c
++++ b/drivers/net/avf/avf_vchnl.c
+@@ -211,10 +211,7 @@ avf_handle_virtchnl_msg(struct rte_eth_dev *dev)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (19 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix virtual channel " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " Kevin Traynor
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/950dfee75576b7955b288833764c8c33c5406ba4

Thanks.

Kevin.

---
From 950dfee75576b7955b288833764c8c33c5406ba4 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 9de88a9ccb..1642cf4948 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1003,4 +1003,22 @@ i40e_set_tso_ctx(struct rte_mbuf *mbuf, union i40e_tx_offload tx_offload)
 }
 
+/* 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)
@@ -1060,6 +1078,13 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		 * 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);
 
@@ -1174,4 +1199,22 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			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"
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.671087249 +0000
+++ 0022-net-i40e-fix-Tx-when-TSO-is-enabled.patch	2020-02-07 15:08:17.534062684 +0000
@@ -1 +1 @@
-From 29b2ba82c4c94df1975d0cb9c5c23feef99cf6a3 Mon Sep 17 00:00:00 2001
+From 950dfee75576b7955b288833764c8c33c5406ba4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29b2ba82c4c94df1975d0cb9c5c23feef99cf6a3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 17dc8c78f7..bbdba39b3c 100644
+index 9de88a9ccb..1642cf4948 100644
@@ -25 +26 @@
-@@ -990,4 +990,22 @@ i40e_set_tso_ctx(struct rte_mbuf *mbuf, union i40e_tx_offload tx_offload)
+@@ -1003,4 +1003,22 @@ i40e_set_tso_ctx(struct rte_mbuf *mbuf, union i40e_tx_offload tx_offload)
@@ -48 +49 @@
-@@ -1047,6 +1065,13 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1060,6 +1078,13 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
@@ -63 +64 @@
-@@ -1161,4 +1186,22 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1174,4 +1199,22 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix link during port toggle' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (20 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: call cleanup on exit' " Kevin Traynor
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Santoshkumar Karanappa Rastapur; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/06c4b5b5bc13434c0d62d6da53181383be8d6711

Thanks.

Kevin.

---
From 06c4b5b5bc13434c0d62d6da53181383be8d6711 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 | 23 +++++++++++++++++------
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 425d425a68..33fef1b365 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -196,7 +196,8 @@ struct bnxt_pf_info {
 };
 
-/* 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;
@@ -413,5 +414,6 @@ 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);
 
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 4529080d11..08eeec096a 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -27,5 +27,5 @@ void bnxt_handle_async_event(struct bnxt *bp,
 	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:
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3c773eb1e1..ed7f1f44b9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -605,5 +605,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 		goto error;
 
-	bnxt_link_update_op(eth_dev, 1);
+	bnxt_link_update(eth_dev, 1, ETH_LINK_UP);
 
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
@@ -669,6 +669,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	}
 	bnxt_dev_set_link_down_op(eth_dev);
-	/* Wait for link to be reset and the async notification to process. */
-	rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
+
+	/* Wait for link to be reset and the async notification to process.
+	 * During reset recovery, there is no need to wait
+	 */
+	bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
 
 	/* Clean queue intr-vector mapping */
@@ -789,10 +792,12 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
 }
 
-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;
 
 	memset(&new, 0, sizeof(new));
@@ -808,5 +813,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 		}
 
-		if (!wait_to_complete || new.link_status)
+		if (!wait_to_complete || new.link_status == exp_link_status)
 			break;
 
@@ -830,4 +835,10 @@ out:
 }
 
+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 void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
 {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.723521858 +0000
+++ 0023-net-bnxt-fix-link-during-port-toggle.patch	2020-02-07 15:08:17.538062631 +0000
@@ -1 +1 @@
-From 074cacb9907aaae240a69eafc80018c873881d82 Mon Sep 17 00:00:00 2001
+From 06c4b5b5bc13434c0d62d6da53181383be8d6711 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 074cacb9907aaae240a69eafc80018c873881d82 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/bnxt/bnxt_ethdev.c | 18 +++++++++++++-----
- 3 files changed, 20 insertions(+), 10 deletions(-)
+ drivers/net/bnxt/bnxt_ethdev.c | 23 +++++++++++++++++------
+ 3 files changed, 24 insertions(+), 11 deletions(-)
@@ -22 +23 @@
-index ab18e8acd8..ab0b8dde1b 100644
+index 425d425a68..33fef1b365 100644
@@ -25 +26 @@
-@@ -232,7 +232,8 @@ struct bnxt_pf_info {
+@@ -196,7 +196,8 @@ struct bnxt_pf_info {
@@ -37 +38 @@
-@@ -657,5 +658,6 @@ struct bnxt {
+@@ -413,5 +414,6 @@ struct bnxt {
@@ -44 +45 @@
- int is_bnxt_in_error(struct bnxt *bp);
+ 
@@ -46 +47 @@
-index 2c3129fe28..bb316b9e05 100644
+index 4529080d11..08eeec096a 100644
@@ -49 +50 @@
-@@ -64,5 +64,5 @@ void bnxt_handle_async_event(struct bnxt *bp,
+@@ -27,5 +27,5 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -57 +58 @@
-index 1b4ed293d0..88df82b865 100644
+index 3c773eb1e1..ed7f1f44b9 100644
@@ -60,2 +61,2 @@
-@@ -857,5 +857,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
- 	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
+@@ -605,5 +605,5 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+ 		goto error;
@@ -67,5 +68,10 @@
-@@ -941,5 +941,5 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
- 	 */
- 	if (!is_bnxt_in_error(bp))
--		rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
-+		bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
+@@ -669,6 +669,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+ 	}
+ 	bnxt_dev_set_link_down_op(eth_dev);
+-	/* Wait for link to be reset and the async notification to process. */
+-	rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
++
++	/* Wait for link to be reset and the async notification to process.
++	 * During reset recovery, there is no need to wait
++	 */
++	bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
@@ -74 +80 @@
-@@ -1087,10 +1087,12 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
+@@ -789,10 +792,12 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
@@ -88,2 +94,2 @@
- 	rc = is_bnxt_in_error(bp);
-@@ -1110,5 +1112,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+ 	memset(&new, 0, sizeof(new));
+@@ -808,5 +813,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
@@ -96 +102 @@
-@@ -1132,4 +1134,10 @@ out:
+@@ -830,4 +835,10 @@ out:
@@ -105 +111 @@
- static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
+ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'app/testpmd: call cleanup on exit' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (21 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/vhost: check creation failure' " Kevin Traynor
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ad2076ec30fb881f75e56cd81f556fc9e3b6ffee

Thanks.

Kevin.

---
From ad2076ec30fb881f75e56cd81f556fc9e3b6ffee Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 7 Jan 2020 10:59:42 -0800
Subject: [PATCH] app/testpmd: call cleanup on exit

[ upstream commit 5e516c89830aacae67968490dbd8c542b9ffc430 ]

The rte_eal_cleanup code is not exercised by testpmd which
is the most used DPDK test tool. Add a call at end of program.

This helps exercise free and close paths which can
be checked with tools like valgrind.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 98fe2f8f7d..31d559494d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3297,4 +3297,9 @@ main(int argc, char** argv)
 	}
 
-	return 0;
+	ret = rte_eal_cleanup();
+	if (ret != 0)
+		rte_exit(EXIT_FAILURE,
+			 "EAL cleanup failed: %s\n", strerror(-ret));
+
+	return EXIT_SUCCESS;
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.776037828 +0000
+++ 0024-app-testpmd-call-cleanup-on-exit.patch	2020-02-07 15:08:17.541062591 +0000
@@ -1 +1 @@
-From 5e516c89830aacae67968490dbd8c542b9ffc430 Mon Sep 17 00:00:00 2001
+From ad2076ec30fb881f75e56cd81f556fc9e3b6ffee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5e516c89830aacae67968490dbd8c542b9ffc430 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b374682236..2eec8afda1 100644
+index 98fe2f8f7d..31d559494d 100644
@@ -25 +26 @@
-@@ -3571,4 +3571,9 @@ main(int argc, char** argv)
+@@ -3297,4 +3297,9 @@ main(int argc, char** argv)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/vhost: check creation failure' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (22 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: call cleanup on exit' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " Kevin Traynor
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/59e1f980a43d801e202dc5b03e1d14f6abcb7281

Thanks.

Kevin.

---
From 59e1f980a43d801e202dc5b03e1d14f6abcb7281 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 b70b9152f8..47d0102e0e 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1287,5 +1287,5 @@ 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:
@@ -1425,6 +1425,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 		dev->device.numa_node = rte_socket_id();
 
-	eth_dev_vhost_create(dev, iface_name, queues, dev->device.numa_node,
-		flags);
+	ret = eth_dev_vhost_create(dev, iface_name, queues,
+				   dev->device.numa_node, flags);
+	if (ret == -1)
+		VHOST_LOG(ERR, "Failed to create %s\n", name);
 
 out_free:
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.829379030 +0000
+++ 0025-net-vhost-check-creation-failure.patch	2020-02-07 15:08:17.543062564 +0000
@@ -1 +1 @@
-From f04513bc89d90c2ad425f1be1e4716bb3c790fb2 Mon Sep 17 00:00:00 2001
+From 59e1f980a43d801e202dc5b03e1d14f6abcb7281 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 46f01a7f46..a63588986f 100644
+index b70b9152f8..47d0102e0e 100644
@@ -22 +23 @@
-@@ -1303,5 +1303,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
+@@ -1287,5 +1287,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
@@ -29 +30 @@
-@@ -1456,6 +1456,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
+@@ -1425,6 +1425,8 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
@@ -33 +34 @@
--		flags, disable_flags);
+-		flags);
@@ -35 +36 @@
-+				   dev->device.numa_node, flags, disable_flags);
++				   dev->device.numa_node, flags);


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (23 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/vhost: check creation failure' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'vhost: fix socket initial value' " Kevin Traynor
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/a3f5b5bbf79af44738fa2dafefaaa09409418f3e

Thanks.

Kevin.

---
From a3f5b5bbf79af44738fa2dafefaaa09409418f3e 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 91536c667a..f6356eabc6 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -525,5 +525,6 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
 	}
 
-	close(dev->vhostfd);
+	if (dev->vhostfd >= 0)
+		close(dev->vhostfd);
 
 	if (dev->is_server && dev->listenfd >= 0) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.877065267 +0000
+++ 0026-net-virtio-user-check-file-descriptor-before-closing.patch	2020-02-07 15:08:17.544062551 +0000
@@ -1 +1 @@
-From b56c12acf20585ad46faf9455b4b9aeb30450ef0 Mon Sep 17 00:00:00 2001
+From a3f5b5bbf79af44738fa2dafefaaa09409418f3e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b56c12acf20585ad46faf9455b4b9aeb30450ef0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ea016e85d8..ffbaa75b7e 100644
+index 91536c667a..f6356eabc6 100644
@@ -22 +23 @@
-@@ -538,5 +538,6 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
+@@ -525,5 +525,6 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'vhost: fix socket initial value' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (24 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " Kevin Traynor
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e87ed5bfce937cb67ec802f94c0cb696bee90f4b

Thanks.

Kevin.

---
From e87ed5bfce937cb67ec802f94c0cb696bee90f4b 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 5e422335c8..27bfd21fc4 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -856,4 +856,5 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 		goto out_free;
 	}
+	vsocket->vdpa_dev_id = -1;
 	vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.927110167 +0000
+++ 0027-vhost-fix-socket-initial-value.patch	2020-02-07 15:08:17.545062538 +0000
@@ -1 +1 @@
-From bf4fd5ba3e2edfe68888e83aef81f681756fc692 Mon Sep 17 00:00:00 2001
+From e87ed5bfce937cb67ec802f94c0cb696bee90f4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf4fd5ba3e2edfe68888e83aef81f681756fc692 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ece9d5d1d8..8bc1e3a03c 100644
+index 5e422335c8..27bfd21fc4 100644
@@ -22 +23 @@
-@@ -878,4 +878,5 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
+@@ -856,4 +856,5 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
@@ -27 +28 @@
- 	vsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;
+ 


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/i40e/base: fix buffer address' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (25 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'vhost: fix socket initial value' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix error message' " Kevin Traynor
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Piotr Azarewicz, Qi Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/d913587a43dfc928891cdec5cc7ec5f83aff2157

Thanks.

Kevin.

---
From d913587a43dfc928891cdec5cc7ec5f83aff2157 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 8a98afff12..87fa7e183f 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -4303,5 +4303,5 @@ 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));
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:18.976222654 +0000
+++ 0028-net-i40e-base-fix-buffer-address.patch	2020-02-07 15:08:17.552062445 +0000
@@ -1 +1 @@
-From 8f33cbcfa17bd578c7c614981ef574b33e09af72 Mon Sep 17 00:00:00 2001
+From d913587a43dfc928891cdec5cc7ec5f83aff2157 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f33cbcfa17bd578c7c614981ef574b33e09af72 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index cee6de2a80..0b26f86c55 100644
+index 8a98afff12..87fa7e183f 100644
@@ -25 +26 @@
-@@ -4312,5 +4312,5 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,
+@@ -4303,5 +4303,5 @@ enum i40e_status_code i40e_aq_set_lldp_mib(struct i40e_hw *hw,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/i40e/base: fix error message' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (26 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " Kevin Traynor
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Carolyn Wyborny, Qi Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e69485f94d039d83eecc2c2ba07991bc5ab852d7

Thanks.

Kevin.

---
From e69485f94d039d83eecc2c2ba07991bc5ab852d7 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Mon, 13 Jan 2020 10:39:17 +0800
Subject: [PATCH] net/i40e/base: fix error message

[ upstream commit 4b3da9415941050ab01ebafbdf9bcd9c3937fd95 ]

This patch changes an error code for an admin queue head overrun to use
I40E_ERR_ADMIN_QUEUE_FULL instead of I40E_ERR_QUEUE_EMPTY.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@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_adminq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 38214a3731..b2fc6f5900 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -836,5 +836,5 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,
 		i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
 			   "AQTX: head overrun at %d\n", val);
-		status = I40E_ERR_QUEUE_EMPTY;
+		status = I40E_ERR_ADMIN_QUEUE_FULL;
 		goto asq_send_command_error;
 	}
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.034919110 +0000
+++ 0029-net-i40e-base-fix-error-message.patch	2020-02-07 15:08:17.554062418 +0000
@@ -1 +1 @@
-From 4b3da9415941050ab01ebafbdf9bcd9c3937fd95 Mon Sep 17 00:00:00 2001
+From e69485f94d039d83eecc2c2ba07991bc5ab852d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b3da9415941050ab01ebafbdf9bcd9c3937fd95 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (27 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix error message' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " Kevin Traynor
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 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 LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5244701b5c68f2eaf1b2cd6e9ead06109b80b12b

Thanks.

Kevin.

---
From 5244701b5c68f2eaf1b2cd6e9ead06109b80b12b 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 7ba62cc121..1a637e40e8 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -80,6 +80,6 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);
 #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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.084382128 +0000
+++ 0030-net-i40e-base-fix-Tx-descriptors-number.patch	2020-02-07 15:08:17.556062392 +0000
@@ -1 +1 @@
-From 79bfe7808788c8a9fb7be87cb864dba2bcbab80d Mon Sep 17 00:00:00 2001
+From 5244701b5c68f2eaf1b2cd6e9ead06109b80b12b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79bfe7808788c8a9fb7be87cb864dba2bcbab80d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 8d257e00af..f0e4b667aa 100644
+index 7ba62cc121..1a637e40e8 100644


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/i40e/base: fix retrying logic' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (28 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " Kevin Traynor
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Marcin Formela, Qi Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/601bb85f687ca547208063dd208008183f5eaa6c

Thanks.

Kevin.

---
From 601bb85f687ca547208063dd208008183f5eaa6c 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 87fa7e183f..1f8bb603df 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1703,17 +1703,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
 					       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)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.135625203 +0000
+++ 0031-net-i40e-base-fix-retrying-logic.patch	2020-02-07 15:08:17.564062285 +0000
@@ -1 +1 @@
-From 50126939c66692d5b74922e12a9bf0dacfb6618b Mon Sep 17 00:00:00 2001
+From 601bb85f687ca547208063dd208008183f5eaa6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ]
+
@@ -20 +22 @@
-index 4f87ec9fad..a37e70599d 100644
+index 87fa7e183f..1f8bb603df 100644
@@ -23 +25 @@
-@@ -1715,17 +1715,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
+@@ -1703,17 +1703,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (29 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " Kevin Traynor
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Ricardo Roldan; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bc5c69b58a8a96e62ec46811055796ce1d08ca73

Thanks.

Kevin.

---
From bc5c69b58a8a96e62ec46811055796ce1d08ca73 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 a5df3e562e..51954456c2 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3461,5 +3461,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 
 			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.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.192408000 +0000
+++ 0032-ethdev-fix-callback-unregister-with-wildcard-argumen.patch	2020-02-07 15:08:17.568062232 +0000
@@ -1 +1 @@
-From ba1e69f121b97b4c8673a48c98072accdbc5af46 Mon Sep 17 00:00:00 2001
+From bc5c69b58a8a96e62ec46811055796ce1d08ca73 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ba1e69f121b97b4c8673a48c98072accdbc5af46 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6e9cb243ea..aec2d0f704 100644
+index a5df3e562e..51954456c2 100644
@@ -22 +23 @@
-@@ -4040,5 +4040,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
+@@ -3461,5 +3461,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (30 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " Kevin Traynor
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/65a6abfcd80d67e1c0483274d3460c4aec767fe8

Thanks.

Kevin.

---
From 65a6abfcd80d67e1c0483274d3460c4aec767fe8 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 | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index c2cf0afc84..085a3f6350 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -241,4 +241,7 @@ static void hn_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->max_tx_queues = hv->max_queues;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return;
+
 	hn_rndis_get_offload(hv, dev_info);
 	hn_vf_info_get(hv, dev_info);
@@ -722,14 +725,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	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];
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.244531833 +0000
+++ 0033-net-netvsc-fix-crash-in-secondary-process.patch	2020-02-07 15:08:17.569062219 +0000
@@ -1 +1 @@
-From f8279f47dd89c026d760ebce99452393d1270849 Mon Sep 17 00:00:00 2001
+From 65a6abfcd80d67e1c0483274d3460c4aec767fe8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- drivers/net/netvsc/hn_ethdev.c | 25 +++++++++++++------------
- 1 file changed, 13 insertions(+), 12 deletions(-)
+ drivers/net/netvsc/hn_ethdev.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
@@ -19 +20 @@
-index 159116f7f6..c79f924379 100644
+index c2cf0afc84..085a3f6350 100644
@@ -22 +23 @@
-@@ -258,13 +258,14 @@ static int hn_dev_info_get(struct rte_eth_dev *dev,
+@@ -241,4 +241,7 @@ static void hn_dev_info_get(struct rte_eth_dev *dev,
@@ -26 +27 @@
-+		return 0;
++		return;
@@ -28,15 +29,3 @@
-+	/* 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);
- }
- 
-@@ -930,14 +931,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
+ 	hn_rndis_get_offload(hv, dev_info);
+ 	hn_vf_info_get(hv, dev_info);
+@@ -722,14 +725,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (31 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'service: avoid false sharing on core state' " Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " Kevin Traynor
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7e4cdeccb0790b8f53d2b34761719def7a0200e6

Thanks.

Kevin.

---
From 7e4cdeccb0790b8f53d2b34761719def7a0200e6 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 cf2621344a..b6c5e03095 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -40,5 +40,6 @@
 			   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 | \
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.294032772 +0000
+++ 0034-net-cxgbe-announce-Tx-multi-segments-offload.patch	2020-02-07 15:08:17.570062206 +0000
@@ -1 +1 @@
-From acbe92bdb2d25f47a690c917f577a0918ba562a1 Mon Sep 17 00:00:00 2001
+From 7e4cdeccb0790b8f53d2b34761719def7a0200e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acbe92bdb2d25f47a690c917f577a0918ba562a1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6c1f73ac4b..75a2e9931b 100644
+index cf2621344a..b6c5e03095 100644
@@ -23 +24 @@
-@@ -41,5 +41,6 @@
+@@ -40,5 +40,6 @@


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'service: avoid false sharing on core state' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (32 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  2020-02-07 15:12 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " Kevin Traynor
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: Gage Eads, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e07f5531f86e3dfadda1f52129cc2b61370e3e74

Thanks.

Kevin.

---
From e07f5531f86e3dfadda1f52129cc2b61370e3e74 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Mon, 16 Sep 2019 15:31:02 +0530
Subject: [PATCH] service: avoid false sharing on core state

[ upstream commit e484ccddbe1b41886fef1e445ef2fdfa55086198 ]

For a valid service, the core mask of the service
is checked against the current core and the corresponding
entry in the active_on_lcore array is set or reset.

Upto 8 cores share the same cache line for their
service active_on_lcore array entries since each entry is a uint8_t.
Some number of these entries also share the cache line with
the internal_flags member of struct rte_service_spec_impl,
hence this false sharing also makes the service_valid() check
expensive.

Eliminate false sharing by moving the active_on_lcore array to
a per-core data structure. The array is now indexed by service id.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index e7d3e51443..97449460dc 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -53,5 +53,4 @@ struct rte_service_spec_impl {
 	uint64_t calls;
 	uint64_t cycles_spent;
-	uint8_t active_on_lcore[RTE_MAX_LCORE];
 } __rte_cache_aligned;
 
@@ -62,5 +61,5 @@ struct core_state {
 	uint8_t runstate; /* running or stopped */
 	uint8_t is_service_core; /* set if core is currently a service core */
-
+	uint8_t service_active_on_lcore[RTE_SERVICE_NUM_MAX];
 	uint64_t loops;
 	uint64_t calls_per_service[RTE_SERVICE_NUM_MAX];
@@ -346,5 +345,5 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
 
 static inline int32_t
-service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
+service_run(uint32_t i, struct core_state *cs, uint64_t service_mask)
 {
 	if (!service_valid(i))
@@ -354,9 +353,9 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
 			s->app_runstate != RUNSTATE_RUNNING ||
 			!(service_mask & (UINT64_C(1) << i))) {
-		s->active_on_lcore[lcore] = 0;
+		cs->service_active_on_lcore[i] = 0;
 		return -ENOEXEC;
 	}
 
-	s->active_on_lcore[lcore] = 1;
+	cs->service_active_on_lcore[i] = 1;
 
 	/* check do we need cmpset, if MT safe or <= 1 core
@@ -381,5 +380,4 @@ rte_service_may_be_active(uint32_t id)
 {
 	uint32_t ids[RTE_MAX_LCORE] = {0};
-	struct rte_service_spec_impl *s = &rte_services[id];
 	int32_t lcore_count = rte_service_lcore_list(ids, RTE_MAX_LCORE);
 	int i;
@@ -389,5 +387,5 @@ rte_service_may_be_active(uint32_t id)
 
 	for (i = 0; i < lcore_count; i++) {
-		if (s->active_on_lcore[ids[i]])
+		if (lcore_states[i].service_active_on_lcore[id])
 			return 1;
 	}
@@ -420,5 +418,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 	}
 
-	int ret = service_run(id, rte_lcore_id(), cs, UINT64_MAX);
+	int ret = service_run(id, cs, UINT64_MAX);
 
 	if (serialize_mt_unsafe)
@@ -441,5 +439,5 @@ rte_service_runner_func(void *arg)
 		for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
 			/* return value ignored as no change to code flow */
-			service_run(i, lcore, cs, service_mask);
+			service_run(i, cs, service_mask);
 		}
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.343140553 +0000
+++ 0035-service-avoid-false-sharing-on-core-state.patch	2020-02-07 15:08:17.571062192 +0000
@@ -1 +1 @@
-From e484ccddbe1b41886fef1e445ef2fdfa55086198 Mon Sep 17 00:00:00 2001
+From e07f5531f86e3dfadda1f52129cc2b61370e3e74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e484ccddbe1b41886fef1e445ef2fdfa55086198 ]
+
@@ -28 +30 @@
-index fe09077200..beb9691b23 100644
+index e7d3e51443..97449460dc 100644
@@ -31 +33 @@
-@@ -52,5 +52,4 @@ struct rte_service_spec_impl {
+@@ -53,5 +53,4 @@ struct rte_service_spec_impl {
@@ -37 +39 @@
-@@ -61,5 +60,5 @@ struct core_state {
+@@ -62,5 +61,5 @@ struct core_state {
@@ -44 +46 @@
-@@ -345,5 +344,5 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
+@@ -346,5 +345,5 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
@@ -51 +53 @@
-@@ -353,9 +352,9 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
+@@ -354,9 +353,9 @@ service_run(uint32_t i, int lcore, struct core_state *cs, uint64_t service_mask)
@@ -63 +65 @@
-@@ -380,5 +379,4 @@ rte_service_may_be_active(uint32_t id)
+@@ -381,5 +380,4 @@ rte_service_may_be_active(uint32_t id)
@@ -69 +71 @@
-@@ -388,5 +386,5 @@ rte_service_may_be_active(uint32_t id)
+@@ -389,5 +387,5 @@ rte_service_may_be_active(uint32_t id)
@@ -76 +78 @@
-@@ -419,5 +417,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
+@@ -420,5 +418,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
@@ -83 +85 @@
-@@ -440,5 +438,5 @@ rte_service_runner_func(void *arg)
+@@ -441,5 +439,5 @@ rte_service_runner_func(void *arg)


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-stable] patch 'service: don't walk out of bounds when checking services' has been queued to LTS release 18.11.7
  2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (33 preceding siblings ...)
  2020-02-07 15:12 ` [dpdk-stable] patch 'service: avoid false sharing on core state' " Kevin Traynor
@ 2020-02-07 15:12 ` Kevin Traynor
  34 siblings, 0 replies; 36+ messages in thread
From: Kevin Traynor @ 2020-02-07 15:12 UTC (permalink / raw)
  To: Aaron Conole; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/dd4c770c5e356915e9ee134f0baba286ce3784cc

Thanks.

Kevin.

---
From dd4c770c5e356915e9ee134f0baba286ce3784cc 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 97449460dc..53dd6a7bbf 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -137,4 +137,10 @@ service_valid(uint32_t id)
 }
 
+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 {          \
@@ -344,10 +350,12 @@ 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 ||
@@ -383,5 +391,5 @@ rte_service_may_be_active(uint32_t id)
 	int i;
 
-	if (!service_valid(id))
+	if (id >= RTE_SERVICE_NUM_MAX || !service_valid(id))
 		return -EINVAL;
 
@@ -397,10 +405,8 @@ 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
@@ -418,5 +424,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 	}
 
-	int ret = service_run(id, cs, UINT64_MAX);
+	int ret = service_run(id, cs, UINT64_MAX, s);
 
 	if (serialize_mt_unsafe)
@@ -438,6 +444,8 @@ rte_service_runner_func(void *arg)
 
 		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));
 		}
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.393876737 +0000
+++ 0036-service-don-t-walk-out-of-bounds-when-checking-servi.patch	2020-02-07 15:08:17.572062179 +0000
@@ -1 +1 @@
-From 2e088e6f94b773233c06440763c1be43d0d705b3 Mon Sep 17 00:00:00 2001
+From dd4c770c5e356915e9ee134f0baba286ce3784cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e088e6f94b773233c06440763c1be43d0d705b3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 79235c03f8..7e537b8cd2 100644
+index 97449460dc..53dd6a7bbf 100644
@@ -29 +30 @@
-@@ -138,4 +138,10 @@ service_valid(uint32_t id)
+@@ -137,4 +137,10 @@ service_valid(uint32_t id)
@@ -40 +41 @@
-@@ -345,10 +351,12 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
+@@ -344,10 +350,12 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
@@ -57 +58 @@
-@@ -384,5 +392,5 @@ rte_service_may_be_active(uint32_t id)
+@@ -383,5 +391,5 @@ rte_service_may_be_active(uint32_t id)
@@ -64 +65 @@
-@@ -398,10 +406,8 @@ int32_t
+@@ -397,10 +405,8 @@ int32_t
@@ -78 +79 @@
-@@ -419,5 +425,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
+@@ -418,5 +424,5 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
@@ -85 +86 @@
-@@ -439,6 +445,8 @@ rte_service_runner_func(void *arg)
+@@ -438,6 +444,8 @@ rte_service_runner_func(void *arg)


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2020-02-07 15:14 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 15:12 [dpdk-stable] patch 'eal/linux: fix uninitialized data valgrind warning' has been queued to LTS release 18.11.7 Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'eal/linux: fix build error on RHEL 7.6' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix build with python 3.8' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'build: explicitly enable sse4 for meson' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'kni: fix meson warning about console keyword' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'doc: fix warning with meson' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce whitespace in meson build file' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'doc: reduce indentation " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: flush buffers immediately on zero-sized enqueue' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'event/dsw: avoid credit leak on oversized enqueue bursts' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'bus/fslmc: remove conflicting memory barrier macro' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: fix device mcast list error handling' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/fm10k: fix descriptor VLAN field filling in Tx' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix Rx total stats' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: add TSO offload use basic path' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link status' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/ixgbe: fix link up in FreeBSD' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix command buffer memory leak' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf/base: fix adminq return' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/iavf: fix virtual channel " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e: fix Tx when TSO is enabled' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/bnxt: fix link during port toggle' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'app/testpmd: call cleanup on exit' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/vhost: check creation failure' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'vhost: fix socket initial value' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix buffer address' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix error message' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix Tx descriptors number' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/i40e/base: fix retrying logic' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'ethdev: fix callback unregister with wildcard argument list' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'net/cxgbe: announce Tx multi-segments offload' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'service: avoid false sharing on core state' " Kevin Traynor
2020-02-07 15:12 ` [dpdk-stable] patch 'service: don't walk out of bounds when checking services' " Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).